generated-configure.sh revision 809:feb4f2d97042
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637FIXPATH
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE2_LIB_PATH
655USING_SYSTEM_FT_LIB
656FREETYPE2_LIBS
657FREETYPE2_CFLAGS
658CUPS_CFLAGS
659OPENWIN_HOME
660X_EXTRA_LIBS
661X_LIBS
662X_PRE_LIBS
663X_CFLAGS
664XMKMF
665CXXFLAGS_DEBUG_SYMBOLS
666CFLAGS_DEBUG_SYMBOLS
667ZIP_DEBUGINFO_FILES
668ENABLE_DEBUG_SYMBOLS
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719MCS
720STRIP
721GNM
722NM
723AS
724CXXCPP
725CPP
726COMPILER_TYPE
727RC_FLAGS
728DUMPBIN
729WINAR
730HOTSPOT_RC
731HOTSPOT_MT
732RC
733MT
734WINLD
735HOTSPOT_LD
736HOTSPOT_CXX
737ARFLAGS
738AR
739LDEXECXX
740LDCXX
741LDEXE
742LD
743ac_ct_OBJC
744OBJCFLAGS
745OBJC
746ac_ct_CXX
747CXXFLAGS
748CXX
749ac_ct_PROPER_COMPILER_CXX
750PROPER_COMPILER_CXX
751POTENTIAL_CXX
752TOOLS_DIR_CXX
753OBJEXT
754EXEEXT
755ac_ct_CC
756CPPFLAGS
757LDFLAGS
758CFLAGS
759CC
760ac_ct_PROPER_COMPILER_CC
761PROPER_COMPILER_CC
762POTENTIAL_CC
763TOOLS_DIR_CC
764BUILD_LD
765BUILD_CXX
766BUILD_CC
767MSVCR_DLL
768VS_PATH
769VS_LIB
770VS_INCLUDE
771CYGWIN_LINK
772AR_OUT_OPTION
773LD_OUT_OPTION
774EXE_OUT_OPTION
775CC_OUT_OPTION
776BUILD_HOTSPOT
777HOTSPOT_DIST
778BUILD_OUTPUT
779OVERRIDE_SRC_ROOT
780ADD_SRC_ROOT
781JDK_TOPDIR
782NASHORN_TOPDIR
783HOTSPOT_TOPDIR
784JAXWS_TOPDIR
785JAXP_TOPDIR
786CORBA_TOPDIR
787LANGTOOLS_TOPDIR
788BOOT_JDK_JVMARGS
789JAVAC_FLAGS
790BOOT_JDK_SOURCETARGET
791BOOT_JDK
792BOOT_TOOLSJAR
793BOOT_RTJAR
794JAVA_CHECK
795JAVAC_CHECK
796COOKED_BUILD_NUMBER
797JDK_VERSION
798COPYRIGHT_YEAR
799MACOSX_BUNDLE_ID_BASE
800MACOSX_BUNDLE_NAME_BASE
801COMPANY_NAME
802JDK_RC_PLATFORM_NAME
803PRODUCT_SUFFIX
804PRODUCT_NAME
805LAUNCHER_NAME
806MILESTONE
807JDK_BUILD_NUMBER
808JDK_UPDATE_VERSION
809JDK_MICRO_VERSION
810JDK_MINOR_VERSION
811JDK_MAJOR_VERSION
812USER_RELEASE_SUFFIX
813COMPRESS_JARS
814UNLIMITED_CRYPTO
815CACERTS_FILE
816TEST_IN_BUILD
817BUILD_HEADLESS
818SUPPORT_HEADFUL
819SUPPORT_HEADLESS
820BDEPS_FTP
821BDEPS_UNZIP
822OS_VERSION_MICRO
823OS_VERSION_MINOR
824OS_VERSION_MAJOR
825PKG_CONFIG
826CODESIGN
827XATTR
828IS_GNU_TIME
829TIME
830STAT
831HG
832READELF
833OTOOL
834LDD
835ZIP
836UNZIP
837FIND_DELETE
838MAKE
839CHECK_TOOLSDIR_MAKE
840CHECK_TOOLSDIR_GMAKE
841CHECK_MAKE
842CHECK_GMAKE
843PKGHANDLER
844OUTPUT_ROOT
845CONF_NAME
846SPEC
847BUILD_VARIANT_RELEASE
848DEBUG_CLASSFILES
849FASTDEBUG
850VARIANT
851DEBUG_LEVEL
852MACOSX_UNIVERSAL
853INCLUDE_SA
854JVM_VARIANT_ZEROSHARK
855JVM_VARIANT_ZERO
856JVM_VARIANT_KERNEL
857JVM_VARIANT_MINIMAL1
858JVM_VARIANT_CLIENT
859JVM_VARIANT_SERVER
860JVM_VARIANTS
861JDK_VARIANT
862SET_OPENJDK
863BUILD_LOG_WRAPPER
864BUILD_LOG_PREVIOUS
865BUILD_LOG
866SYS_ROOT
867PATH_SEP
868SRC_ROOT
869ZERO_ARCHDEF
870DEFINE_CROSS_COMPILE_ARCH
871LP64
872OPENJDK_TARGET_OS_API_DIR
873OPENJDK_TARGET_CPU_JLI_CFLAGS
874OPENJDK_TARGET_CPU_OSARCH
875OPENJDK_TARGET_CPU_ISADIR
876OPENJDK_TARGET_CPU_LIBDIR
877OPENJDK_TARGET_CPU_LEGACY_LIB
878OPENJDK_TARGET_CPU_LEGACY
879REQUIRED_OS_VERSION
880REQUIRED_OS_NAME
881COMPILE_TYPE
882OPENJDK_TARGET_CPU_ENDIAN
883OPENJDK_TARGET_CPU_BITS
884OPENJDK_TARGET_CPU_ARCH
885OPENJDK_TARGET_CPU
886OPENJDK_TARGET_OS_API
887OPENJDK_TARGET_OS
888OPENJDK_BUILD_CPU_ENDIAN
889OPENJDK_BUILD_CPU_BITS
890OPENJDK_BUILD_CPU_ARCH
891OPENJDK_BUILD_CPU
892OPENJDK_BUILD_OS_API
893OPENJDK_BUILD_OS
894OPENJDK_BUILD_AUTOCONF_NAME
895OPENJDK_TARGET_AUTOCONF_NAME
896target_os
897target_vendor
898target_cpu
899target
900host_os
901host_vendor
902host_cpu
903host
904build_os
905build_vendor
906build_cpu
907build
908SETFILE
909DF
910READLINK
911CYGPATH
912NAWK
913SED
914FGREP
915EGREP
916GREP
917AWK
918XARGS
919WHICH
920WC
921UNIQ
922UNAME
923TR
924TOUCH
925TEE
926TAR
927TAIL
928SORT
929SH
930RM
931PRINTF
932MV
933MKTEMP
934MKDIR
935LS
936LN
937HEAD
938FIND
939FILE
940EXPR
941ECHO
942DIRNAME
943DIFF
944DATE
945CUT
946CPIO
947CP
948COMM
949CMP
950CHMOD
951CAT
952BASH
953BASENAME
954DATE_WHEN_CONFIGURED
955CONFIGURE_COMMAND_LINE
956CUSTOM_MAKE_DIR
957target_alias
958host_alias
959build_alias
960LIBS
961ECHO_T
962ECHO_N
963ECHO_C
964DEFS
965mandir
966localedir
967libdir
968psdir
969pdfdir
970dvidir
971htmldir
972infodir
973docdir
974oldincludedir
975includedir
976localstatedir
977sharedstatedir
978sysconfdir
979datadir
980datarootdir
981libexecdir
982sbindir
983bindir
984program_transform_name
985prefix
986exec_prefix
987PACKAGE_URL
988PACKAGE_BUGREPORT
989PACKAGE_STRING
990PACKAGE_VERSION
991PACKAGE_TARNAME
992PACKAGE_NAME
993PATH_SEPARATOR
994SHELL'
995ac_subst_files=''
996ac_user_opts='
997enable_option_checking
998with_custom_make_dir
999with_target_bits
1000with_sys_root
1001with_tools_dir
1002with_devkit
1003enable_openjdk_only
1004with_jdk_variant
1005with_jvm_variants
1006enable_debug
1007with_debug_level
1008with_conf_name
1009with_builddeps_conf
1010with_builddeps_server
1011with_builddeps_dir
1012with_builddeps_group
1013enable_headful
1014enable_hotspot_test_in_build
1015with_cacerts_file
1016enable_unlimited_crypto
1017with_milestone
1018with_update_version
1019with_build_number
1020with_user_release_suffix
1021with_boot_jdk
1022with_boot_jdk_jvmargs
1023with_add_source_root
1024with_override_source_root
1025with_adds_and_overrides
1026with_override_langtools
1027with_override_corba
1028with_override_jaxp
1029with_override_jaxws
1030with_override_hotspot
1031with_override_nashorn
1032with_override_jdk
1033with_import_hotspot
1034with_msvcr_dll
1035with_dxsdk
1036with_dxsdk_lib
1037with_dxsdk_include
1038with_jtreg
1039with_extra_cflags
1040with_extra_cxxflags
1041with_extra_ldflags
1042enable_debug_symbols
1043enable_zip_debug_info
1044enable_macosx_runtime_support
1045with_x
1046with_cups
1047with_cups_include
1048with_freetype
1049with_alsa
1050with_alsa_include
1051with_alsa_lib
1052with_giflib
1053with_zlib
1054with_stdc__lib
1055with_num_cores
1056with_memory_size
1057with_jobs
1058with_sjavac_server_java
1059enable_sjavac
1060enable_precompiled_headers
1061enable_ccache
1062with_ccache_dir
1063'
1064      ac_precious_vars='build_alias
1065host_alias
1066target_alias
1067PKG_CONFIG
1068CC
1069CFLAGS
1070LDFLAGS
1071LIBS
1072CPPFLAGS
1073CXX
1074CXXFLAGS
1075CCC
1076OBJC
1077OBJCFLAGS
1078CPP
1079CXXCPP
1080XMKMF
1081FREETYPE2_CFLAGS
1082FREETYPE2_LIBS
1083ALSA_CFLAGS
1084ALSA_LIBS
1085LIBFFI_CFLAGS
1086LIBFFI_LIBS'
1087
1088
1089# Initialize some variables set by options.
1090ac_init_help=
1091ac_init_version=false
1092ac_unrecognized_opts=
1093ac_unrecognized_sep=
1094# The variables have the same names as the options, with
1095# dashes changed to underlines.
1096cache_file=/dev/null
1097exec_prefix=NONE
1098no_create=
1099no_recursion=
1100prefix=NONE
1101program_prefix=NONE
1102program_suffix=NONE
1103program_transform_name=s,x,x,
1104silent=
1105site=
1106srcdir=
1107verbose=
1108x_includes=NONE
1109x_libraries=NONE
1110
1111# Installation directory options.
1112# These are left unexpanded so users can "make install exec_prefix=/foo"
1113# and all the variables that are supposed to be based on exec_prefix
1114# by default will actually change.
1115# Use braces instead of parens because sh, perl, etc. also accept them.
1116# (The list follows the same order as the GNU Coding Standards.)
1117bindir='${exec_prefix}/bin'
1118sbindir='${exec_prefix}/sbin'
1119libexecdir='${exec_prefix}/libexec'
1120datarootdir='${prefix}/share'
1121datadir='${datarootdir}'
1122sysconfdir='${prefix}/etc'
1123sharedstatedir='${prefix}/com'
1124localstatedir='${prefix}/var'
1125includedir='${prefix}/include'
1126oldincludedir='/usr/include'
1127docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1128infodir='${datarootdir}/info'
1129htmldir='${docdir}'
1130dvidir='${docdir}'
1131pdfdir='${docdir}'
1132psdir='${docdir}'
1133libdir='${exec_prefix}/lib'
1134localedir='${datarootdir}/locale'
1135mandir='${datarootdir}/man'
1136
1137ac_prev=
1138ac_dashdash=
1139for ac_option
1140do
1141  # If the previous option needs an argument, assign it.
1142  if test -n "$ac_prev"; then
1143    eval $ac_prev=\$ac_option
1144    ac_prev=
1145    continue
1146  fi
1147
1148  case $ac_option in
1149  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1150  *=)   ac_optarg= ;;
1151  *)    ac_optarg=yes ;;
1152  esac
1153
1154  # Accept the important Cygnus configure options, so we can diagnose typos.
1155
1156  case $ac_dashdash$ac_option in
1157  --)
1158    ac_dashdash=yes ;;
1159
1160  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1161    ac_prev=bindir ;;
1162  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1163    bindir=$ac_optarg ;;
1164
1165  -build | --build | --buil | --bui | --bu)
1166    ac_prev=build_alias ;;
1167  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1168    build_alias=$ac_optarg ;;
1169
1170  -cache-file | --cache-file | --cache-fil | --cache-fi \
1171  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1172    ac_prev=cache_file ;;
1173  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1174  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1175    cache_file=$ac_optarg ;;
1176
1177  --config-cache | -C)
1178    cache_file=config.cache ;;
1179
1180  -datadir | --datadir | --datadi | --datad)
1181    ac_prev=datadir ;;
1182  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1183    datadir=$ac_optarg ;;
1184
1185  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1186  | --dataroo | --dataro | --datar)
1187    ac_prev=datarootdir ;;
1188  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1189  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1190    datarootdir=$ac_optarg ;;
1191
1192  -disable-* | --disable-*)
1193    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1194    # Reject names that are not valid shell variable names.
1195    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1196      as_fn_error $? "invalid feature name: $ac_useropt"
1197    ac_useropt_orig=$ac_useropt
1198    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199    case $ac_user_opts in
1200      *"
1201"enable_$ac_useropt"
1202"*) ;;
1203      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1204	 ac_unrecognized_sep=', ';;
1205    esac
1206    eval enable_$ac_useropt=no ;;
1207
1208  -docdir | --docdir | --docdi | --doc | --do)
1209    ac_prev=docdir ;;
1210  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1211    docdir=$ac_optarg ;;
1212
1213  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1214    ac_prev=dvidir ;;
1215  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1216    dvidir=$ac_optarg ;;
1217
1218  -enable-* | --enable-*)
1219    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1220    # Reject names that are not valid shell variable names.
1221    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1222      as_fn_error $? "invalid feature name: $ac_useropt"
1223    ac_useropt_orig=$ac_useropt
1224    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225    case $ac_user_opts in
1226      *"
1227"enable_$ac_useropt"
1228"*) ;;
1229      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1230	 ac_unrecognized_sep=', ';;
1231    esac
1232    eval enable_$ac_useropt=\$ac_optarg ;;
1233
1234  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1235  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1236  | --exec | --exe | --ex)
1237    ac_prev=exec_prefix ;;
1238  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1239  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1240  | --exec=* | --exe=* | --ex=*)
1241    exec_prefix=$ac_optarg ;;
1242
1243  -gas | --gas | --ga | --g)
1244    # Obsolete; use --with-gas.
1245    with_gas=yes ;;
1246
1247  -help | --help | --hel | --he | -h)
1248    ac_init_help=long ;;
1249  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1250    ac_init_help=recursive ;;
1251  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1252    ac_init_help=short ;;
1253
1254  -host | --host | --hos | --ho)
1255    ac_prev=host_alias ;;
1256  -host=* | --host=* | --hos=* | --ho=*)
1257    host_alias=$ac_optarg ;;
1258
1259  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1260    ac_prev=htmldir ;;
1261  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1262  | --ht=*)
1263    htmldir=$ac_optarg ;;
1264
1265  -includedir | --includedir | --includedi | --included | --include \
1266  | --includ | --inclu | --incl | --inc)
1267    ac_prev=includedir ;;
1268  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1269  | --includ=* | --inclu=* | --incl=* | --inc=*)
1270    includedir=$ac_optarg ;;
1271
1272  -infodir | --infodir | --infodi | --infod | --info | --inf)
1273    ac_prev=infodir ;;
1274  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1275    infodir=$ac_optarg ;;
1276
1277  -libdir | --libdir | --libdi | --libd)
1278    ac_prev=libdir ;;
1279  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1280    libdir=$ac_optarg ;;
1281
1282  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1283  | --libexe | --libex | --libe)
1284    ac_prev=libexecdir ;;
1285  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1286  | --libexe=* | --libex=* | --libe=*)
1287    libexecdir=$ac_optarg ;;
1288
1289  -localedir | --localedir | --localedi | --localed | --locale)
1290    ac_prev=localedir ;;
1291  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1292    localedir=$ac_optarg ;;
1293
1294  -localstatedir | --localstatedir | --localstatedi | --localstated \
1295  | --localstate | --localstat | --localsta | --localst | --locals)
1296    ac_prev=localstatedir ;;
1297  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1298  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1299    localstatedir=$ac_optarg ;;
1300
1301  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1302    ac_prev=mandir ;;
1303  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1304    mandir=$ac_optarg ;;
1305
1306  -nfp | --nfp | --nf)
1307    # Obsolete; use --without-fp.
1308    with_fp=no ;;
1309
1310  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1311  | --no-cr | --no-c | -n)
1312    no_create=yes ;;
1313
1314  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1315  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1316    no_recursion=yes ;;
1317
1318  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1319  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1320  | --oldin | --oldi | --old | --ol | --o)
1321    ac_prev=oldincludedir ;;
1322  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1323  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1324  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1325    oldincludedir=$ac_optarg ;;
1326
1327  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1328    ac_prev=prefix ;;
1329  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1330    prefix=$ac_optarg ;;
1331
1332  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1333  | --program-pre | --program-pr | --program-p)
1334    ac_prev=program_prefix ;;
1335  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1336  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1337    program_prefix=$ac_optarg ;;
1338
1339  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1340  | --program-suf | --program-su | --program-s)
1341    ac_prev=program_suffix ;;
1342  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1343  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1344    program_suffix=$ac_optarg ;;
1345
1346  -program-transform-name | --program-transform-name \
1347  | --program-transform-nam | --program-transform-na \
1348  | --program-transform-n | --program-transform- \
1349  | --program-transform | --program-transfor \
1350  | --program-transfo | --program-transf \
1351  | --program-trans | --program-tran \
1352  | --progr-tra | --program-tr | --program-t)
1353    ac_prev=program_transform_name ;;
1354  -program-transform-name=* | --program-transform-name=* \
1355  | --program-transform-nam=* | --program-transform-na=* \
1356  | --program-transform-n=* | --program-transform-=* \
1357  | --program-transform=* | --program-transfor=* \
1358  | --program-transfo=* | --program-transf=* \
1359  | --program-trans=* | --program-tran=* \
1360  | --progr-tra=* | --program-tr=* | --program-t=*)
1361    program_transform_name=$ac_optarg ;;
1362
1363  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1364    ac_prev=pdfdir ;;
1365  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1366    pdfdir=$ac_optarg ;;
1367
1368  -psdir | --psdir | --psdi | --psd | --ps)
1369    ac_prev=psdir ;;
1370  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1371    psdir=$ac_optarg ;;
1372
1373  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1374  | -silent | --silent | --silen | --sile | --sil)
1375    silent=yes ;;
1376
1377  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1378    ac_prev=sbindir ;;
1379  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1380  | --sbi=* | --sb=*)
1381    sbindir=$ac_optarg ;;
1382
1383  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1384  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1385  | --sharedst | --shareds | --shared | --share | --shar \
1386  | --sha | --sh)
1387    ac_prev=sharedstatedir ;;
1388  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1389  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1390  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1391  | --sha=* | --sh=*)
1392    sharedstatedir=$ac_optarg ;;
1393
1394  -site | --site | --sit)
1395    ac_prev=site ;;
1396  -site=* | --site=* | --sit=*)
1397    site=$ac_optarg ;;
1398
1399  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1400    ac_prev=srcdir ;;
1401  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1402    srcdir=$ac_optarg ;;
1403
1404  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1405  | --syscon | --sysco | --sysc | --sys | --sy)
1406    ac_prev=sysconfdir ;;
1407  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1408  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1409    sysconfdir=$ac_optarg ;;
1410
1411  -target | --target | --targe | --targ | --tar | --ta | --t)
1412    ac_prev=target_alias ;;
1413  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1414    target_alias=$ac_optarg ;;
1415
1416  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1417    verbose=yes ;;
1418
1419  -version | --version | --versio | --versi | --vers | -V)
1420    ac_init_version=: ;;
1421
1422  -with-* | --with-*)
1423    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1424    # Reject names that are not valid shell variable names.
1425    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1426      as_fn_error $? "invalid package name: $ac_useropt"
1427    ac_useropt_orig=$ac_useropt
1428    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1429    case $ac_user_opts in
1430      *"
1431"with_$ac_useropt"
1432"*) ;;
1433      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1434	 ac_unrecognized_sep=', ';;
1435    esac
1436    eval with_$ac_useropt=\$ac_optarg ;;
1437
1438  -without-* | --without-*)
1439    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1440    # Reject names that are not valid shell variable names.
1441    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1442      as_fn_error $? "invalid package name: $ac_useropt"
1443    ac_useropt_orig=$ac_useropt
1444    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1445    case $ac_user_opts in
1446      *"
1447"with_$ac_useropt"
1448"*) ;;
1449      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1450	 ac_unrecognized_sep=', ';;
1451    esac
1452    eval with_$ac_useropt=no ;;
1453
1454  --x)
1455    # Obsolete; use --with-x.
1456    with_x=yes ;;
1457
1458  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1459  | --x-incl | --x-inc | --x-in | --x-i)
1460    ac_prev=x_includes ;;
1461  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1462  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1463    x_includes=$ac_optarg ;;
1464
1465  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1466  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1467    ac_prev=x_libraries ;;
1468  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1469  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1470    x_libraries=$ac_optarg ;;
1471
1472  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1473Try \`$0 --help' for more information"
1474    ;;
1475
1476  *=*)
1477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1478    # Reject names that are not valid shell variable names.
1479    case $ac_envvar in #(
1480      '' | [0-9]* | *[!_$as_cr_alnum]* )
1481      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1482    esac
1483    eval $ac_envvar=\$ac_optarg
1484    export $ac_envvar ;;
1485
1486  *)
1487    # FIXME: should be removed in autoconf 3.0.
1488    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1490      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1491    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1492    ;;
1493
1494  esac
1495done
1496
1497if test -n "$ac_prev"; then
1498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1499  as_fn_error $? "missing argument to $ac_option"
1500fi
1501
1502if test -n "$ac_unrecognized_opts"; then
1503  case $enable_option_checking in
1504    no) ;;
1505    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1506    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1507  esac
1508fi
1509
1510# Check all directory arguments for consistency.
1511for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1512		datadir sysconfdir sharedstatedir localstatedir includedir \
1513		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1514		libdir localedir mandir
1515do
1516  eval ac_val=\$$ac_var
1517  # Remove trailing slashes.
1518  case $ac_val in
1519    */ )
1520      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1521      eval $ac_var=\$ac_val;;
1522  esac
1523  # Be sure to have absolute directory names.
1524  case $ac_val in
1525    [\\/$]* | ?:[\\/]* )  continue;;
1526    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1527  esac
1528  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1529done
1530
1531# There might be people who depend on the old broken behavior: `$host'
1532# used to hold the argument of --host etc.
1533# FIXME: To remove some day.
1534build=$build_alias
1535host=$host_alias
1536target=$target_alias
1537
1538# FIXME: To remove some day.
1539if test "x$host_alias" != x; then
1540  if test "x$build_alias" = x; then
1541    cross_compiling=maybe
1542  elif test "x$build_alias" != "x$host_alias"; then
1543    cross_compiling=yes
1544  fi
1545fi
1546
1547ac_tool_prefix=
1548test -n "$host_alias" && ac_tool_prefix=$host_alias-
1549
1550test "$silent" = yes && exec 6>/dev/null
1551
1552
1553ac_pwd=`pwd` && test -n "$ac_pwd" &&
1554ac_ls_di=`ls -di .` &&
1555ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1556  as_fn_error $? "working directory cannot be determined"
1557test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1558  as_fn_error $? "pwd does not report name of working directory"
1559
1560
1561# Find the source files, if location was not specified.
1562if test -z "$srcdir"; then
1563  ac_srcdir_defaulted=yes
1564  # Try the directory containing this script, then the parent directory.
1565  ac_confdir=`$as_dirname -- "$as_myself" ||
1566$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1567	 X"$as_myself" : 'X\(//\)[^/]' \| \
1568	 X"$as_myself" : 'X\(//\)$' \| \
1569	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1570$as_echo X"$as_myself" |
1571    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1572	    s//\1/
1573	    q
1574	  }
1575	  /^X\(\/\/\)[^/].*/{
1576	    s//\1/
1577	    q
1578	  }
1579	  /^X\(\/\/\)$/{
1580	    s//\1/
1581	    q
1582	  }
1583	  /^X\(\/\).*/{
1584	    s//\1/
1585	    q
1586	  }
1587	  s/.*/./; q'`
1588  srcdir=$ac_confdir
1589  if test ! -r "$srcdir/$ac_unique_file"; then
1590    srcdir=..
1591  fi
1592else
1593  ac_srcdir_defaulted=no
1594fi
1595if test ! -r "$srcdir/$ac_unique_file"; then
1596  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1597  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1598fi
1599ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1600ac_abs_confdir=`(
1601	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1602	pwd)`
1603# When building in place, set srcdir=.
1604if test "$ac_abs_confdir" = "$ac_pwd"; then
1605  srcdir=.
1606fi
1607# Remove unnecessary trailing slashes from srcdir.
1608# Double slashes in file names in object file debugging info
1609# mess up M-x gdb in Emacs.
1610case $srcdir in
1611*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1612esac
1613for ac_var in $ac_precious_vars; do
1614  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1615  eval ac_env_${ac_var}_value=\$${ac_var}
1616  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1617  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1618done
1619
1620#
1621# Report the --help message.
1622#
1623if test "$ac_init_help" = "long"; then
1624  # Omit some internal or obsolete options to make the list less imposing.
1625  # This message is too long to be a string in the A/UX 3.1 sh.
1626  cat <<_ACEOF
1627\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1628
1629Usage: $0 [OPTION]... [VAR=VALUE]...
1630
1631To assign environment variables (e.g., CC, CFLAGS...), specify them as
1632VAR=VALUE.  See below for descriptions of some of the useful variables.
1633
1634Defaults for the options are specified in brackets.
1635
1636Configuration:
1637  -h, --help              display this help and exit
1638      --help=short        display options specific to this package
1639      --help=recursive    display the short help of all the included packages
1640  -V, --version           display version information and exit
1641  -q, --quiet, --silent   do not print \`checking ...' messages
1642      --cache-file=FILE   cache test results in FILE [disabled]
1643  -C, --config-cache      alias for \`--cache-file=config.cache'
1644  -n, --no-create         do not create output files
1645      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1646
1647Installation directories:
1648  --prefix=PREFIX         install architecture-independent files in PREFIX
1649                          [$ac_default_prefix]
1650  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1651                          [PREFIX]
1652
1653By default, \`make install' will install all the files in
1654\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1655an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1656for instance \`--prefix=\$HOME'.
1657
1658For better control, use the options below.
1659
1660Fine tuning of the installation directories:
1661  --bindir=DIR            user executables [EPREFIX/bin]
1662  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1663  --libexecdir=DIR        program executables [EPREFIX/libexec]
1664  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1665  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1666  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1667  --libdir=DIR            object code libraries [EPREFIX/lib]
1668  --includedir=DIR        C header files [PREFIX/include]
1669  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1670  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1671  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1672  --infodir=DIR           info documentation [DATAROOTDIR/info]
1673  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1674  --mandir=DIR            man documentation [DATAROOTDIR/man]
1675  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1676  --htmldir=DIR           html documentation [DOCDIR]
1677  --dvidir=DIR            dvi documentation [DOCDIR]
1678  --pdfdir=DIR            pdf documentation [DOCDIR]
1679  --psdir=DIR             ps documentation [DOCDIR]
1680_ACEOF
1681
1682  cat <<\_ACEOF
1683
1684X features:
1685  --x-includes=DIR    X include files are in DIR
1686  --x-libraries=DIR   X library files are in DIR
1687
1688System types:
1689  --build=BUILD     configure for building on BUILD [guessed]
1690  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1691  --target=TARGET   configure for building compilers for TARGET [HOST]
1692_ACEOF
1693fi
1694
1695if test -n "$ac_init_help"; then
1696  case $ac_init_help in
1697     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1698   esac
1699  cat <<\_ACEOF
1700
1701Optional Features:
1702  --disable-option-checking  ignore unrecognized --enable/--with options
1703  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1704  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1705  --enable-openjdk-only   suppress building custom source even if present
1706                          [disabled]
1707  --enable-debug          set the debug level to fastdebug (shorthand for
1708                          --with-debug-level=fastdebug) [disabled]
1709  --disable-headful       disable building headful support (graphical UI
1710                          support) [enabled]
1711  --enable-hotspot-test-in-build
1712                          run the Queens test after Hotspot build [disabled]
1713  --enable-unlimited-crypto
1714                          Enable unlimited crypto policy [disabled]
1715  --disable-debug-symbols disable generation of debug symbols [enabled]
1716  --disable-zip-debug-info
1717                          disable zipping of debug-info files [enabled]
1718  --disable-macosx-runtime-support
1719                          disable the use of MacOSX Java runtime support
1720                          framework [enabled]
1721  --enable-sjavac         use sjavac to do fast incremental compiles
1722                          [disabled]
1723  --disable-precompiled-headers
1724                          disable using precompiled headers when compiling C++
1725                          [enabled]
1726  --disable-ccache        disable using ccache to speed up recompilations
1727                          [enabled]
1728
1729Optional Packages:
1730  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1731  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1732  --with-custom-make-dir  use this directory for custom build/make files
1733  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1734                          support it), e.g. --with-target-bits=32 [guessed]
1735  --with-sys-root         pass this sys-root to the compilers and tools (for
1736                          cross-compiling)
1737  --with-tools-dir        search this directory for compilers and tools (for
1738                          cross-compiling)
1739  --with-devkit           use this directory as base for tools-dir and
1740                          sys-root (for cross-compiling)
1741  --with-jdk-variant      JDK variant to build (normal) [normal]
1742  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1743                          client, minimal1, kernel, zero, zeroshark) [server]
1744  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1745                          [release]
1746  --with-conf-name        use this as the name of the configuration [generated
1747                          from important configuration options]
1748  --with-builddeps-conf   use this configuration file for the builddeps
1749  --with-builddeps-server download and use build dependencies from this server
1750                          url
1751  --with-builddeps-dir    store downloaded build dependencies here
1752                          [/localhome/builddeps]
1753  --with-builddeps-group  chgrp the downloaded build dependencies to this
1754                          group
1755  --with-cacerts-file     specify alternative cacerts file
1756  --with-milestone        Set milestone value for build [internal]
1757  --with-update-version   Set update version value for build [b00]
1758  --with-build-number     Set build number value for build [b00]
1759  --with-user-release-suffix
1760                          Add a custom string to the version string if build
1761                          number isn't set.[username_builddateb00]
1762  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1763  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1764                          invocations of the Boot JDK, overriding the default
1765                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1766                          -enableassertions"
1767  --with-add-source-root  for each and every source directory, look in this
1768                          additional source root for the same directory; if it
1769                          exists and have files in it, include it in the build
1770  --with-override-source-root
1771                          for each and every source directory, look in this
1772                          override source root for the same directory; if it
1773                          exists, use that directory instead and ignore the
1774                          directory in the original source root
1775  --with-adds-and-overrides
1776                          use the subdirs 'adds' and 'overrides' in the
1777                          specified directory as add-source-root and
1778                          override-source-root
1779  --with-override-langtools
1780                          use this langtools dir for the build
1781  --with-override-corba   use this corba dir for the build
1782  --with-override-jaxp    use this jaxp dir for the build
1783  --with-override-jaxws   use this jaxws dir for the build
1784  --with-override-hotspot use this hotspot dir for the build
1785  --with-override-nashorn use this nashorn dir for the build
1786  --with-override-jdk     use this jdk dir for the build
1787  --with-import-hotspot   import hotspot binaries from this jdk image or
1788                          hotspot build dist dir instead of building from
1789                          source
1790  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1791                          only) [probed]
1792  --with-dxsdk            Deprecated. Option is kept for backwards
1793                          compatibility and is ignored
1794  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1795                          compatibility and is ignored
1796  --with-dxsdk-include    Deprecated. Option is kept for backwards
1797                          compatibility and is ignored
1798  --with-jtreg            Regression Test Harness [probed]
1799  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1800  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1801  --with-extra-ldflags    extra flags to be used when linking jdk
1802  --with-x                use the X Window System
1803  --with-cups             specify prefix directory for the cups package
1804                          (expecting the headers under PATH/include)
1805  --with-cups-include     specify directory for the cups include files
1806  --with-freetype         specify prefix directory for the freetype2 package
1807                          (expecting the libraries under PATH/lib and the
1808                          headers under PATH/include)
1809  --with-alsa             specify prefix directory for the alsa package
1810                          (expecting the libraries under PATH/lib and the
1811                          headers under PATH/include)
1812  --with-alsa-include     specify directory for the alsa include files
1813  --with-alsa-lib         specify directory for the alsa library
1814  --with-giflib           use giflib from build system or OpenJDK source
1815                          (system, bundled) [bundled]
1816  --with-zlib             use zlib from build system or OpenJDK source
1817                          (system, bundled) [bundled]
1818  --with-stdc++lib=<static>,<dynamic>,<default>
1819                          force linking of the C++ runtime on Linux to either
1820                          static or dynamic, default is static with dynamic as
1821                          fallback
1822  --with-num-cores        number of cores in the build system, e.g.
1823                          --with-num-cores=8 [probed]
1824  --with-memory-size      memory (in MB) available in the build system, e.g.
1825                          --with-memory-size=1024 [probed]
1826  --with-jobs             number of parallel jobs to let make run [calculated
1827                          based on cores and memory]
1828  --with-sjavac-server-java
1829                          use this java binary for running the sjavac
1830                          background server [Boot JDK java]
1831  --with-ccache-dir       where to store ccache files [~/.ccache]
1832
1833Some influential environment variables:
1834  PKG_CONFIG  path to pkg-config utility
1835  CC          C compiler command
1836  CFLAGS      C compiler flags
1837  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1838              nonstandard directory <lib dir>
1839  LIBS        libraries to pass to the linker, e.g. -l<library>
1840  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1841              you have headers in a nonstandard directory <include dir>
1842  CXX         C++ compiler command
1843  CXXFLAGS    C++ compiler flags
1844  OBJC        Objective C compiler command
1845  OBJCFLAGS   Objective C compiler flags
1846  CPP         C preprocessor
1847  CXXCPP      C++ preprocessor
1848  XMKMF       Path to xmkmf, Makefile generator for X Window System
1849  FREETYPE2_CFLAGS
1850              C compiler flags for FREETYPE2, overriding pkg-config
1851  FREETYPE2_LIBS
1852              linker flags for FREETYPE2, overriding pkg-config
1853  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1854  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1855  LIBFFI_CFLAGS
1856              C compiler flags for LIBFFI, overriding pkg-config
1857  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1858
1859Use these variables to override the choices made by `configure' or to help
1860it to find libraries and programs with nonstandard names/locations.
1861
1862Report bugs to <build-dev@openjdk.java.net>.
1863OpenJDK home page: <http://openjdk.java.net>.
1864_ACEOF
1865ac_status=$?
1866fi
1867
1868if test "$ac_init_help" = "recursive"; then
1869  # If there are subdirs, report their specific --help.
1870  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1871    test -d "$ac_dir" ||
1872      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1873      continue
1874    ac_builddir=.
1875
1876case "$ac_dir" in
1877.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1878*)
1879  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1880  # A ".." for each directory in $ac_dir_suffix.
1881  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1882  case $ac_top_builddir_sub in
1883  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1884  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1885  esac ;;
1886esac
1887ac_abs_top_builddir=$ac_pwd
1888ac_abs_builddir=$ac_pwd$ac_dir_suffix
1889# for backward compatibility:
1890ac_top_builddir=$ac_top_build_prefix
1891
1892case $srcdir in
1893  .)  # We are building in place.
1894    ac_srcdir=.
1895    ac_top_srcdir=$ac_top_builddir_sub
1896    ac_abs_top_srcdir=$ac_pwd ;;
1897  [\\/]* | ?:[\\/]* )  # Absolute name.
1898    ac_srcdir=$srcdir$ac_dir_suffix;
1899    ac_top_srcdir=$srcdir
1900    ac_abs_top_srcdir=$srcdir ;;
1901  *) # Relative name.
1902    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1903    ac_top_srcdir=$ac_top_build_prefix$srcdir
1904    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1905esac
1906ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1907
1908    cd "$ac_dir" || { ac_status=$?; continue; }
1909    # Check for guested configure.
1910    if test -f "$ac_srcdir/configure.gnu"; then
1911      echo &&
1912      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1913    elif test -f "$ac_srcdir/configure"; then
1914      echo &&
1915      $SHELL "$ac_srcdir/configure" --help=recursive
1916    else
1917      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1918    fi || ac_status=$?
1919    cd "$ac_pwd" || { ac_status=$?; break; }
1920  done
1921fi
1922
1923test -n "$ac_init_help" && exit $ac_status
1924if $ac_init_version; then
1925  cat <<\_ACEOF
1926OpenJDK configure jdk8
1927generated by GNU Autoconf 2.69
1928
1929Copyright (C) 2012 Free Software Foundation, Inc.
1930This configure script is free software; the Free Software Foundation
1931gives unlimited permission to copy, distribute and modify it.
1932_ACEOF
1933  exit
1934fi
1935
1936## ------------------------ ##
1937## Autoconf initialization. ##
1938## ------------------------ ##
1939
1940# ac_fn_c_try_compile LINENO
1941# --------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_c_try_compile ()
1944{
1945  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946  rm -f conftest.$ac_objext
1947  if { { ac_try="$ac_compile"
1948case "(($ac_try" in
1949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950  *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954  (eval "$ac_compile") 2>conftest.err
1955  ac_status=$?
1956  if test -s conftest.err; then
1957    grep -v '^ *+' conftest.err >conftest.er1
1958    cat conftest.er1 >&5
1959    mv -f conftest.er1 conftest.err
1960  fi
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; } && {
1963	 test -z "$ac_c_werror_flag" ||
1964	 test ! -s conftest.err
1965       } && test -s conftest.$ac_objext; then :
1966  ac_retval=0
1967else
1968  $as_echo "$as_me: failed program was:" >&5
1969sed 's/^/| /' conftest.$ac_ext >&5
1970
1971	ac_retval=1
1972fi
1973  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_c_try_compile
1977
1978# ac_fn_cxx_try_compile LINENO
1979# ----------------------------
1980# Try to compile conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_cxx_try_compile ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  rm -f conftest.$ac_objext
1985  if { { ac_try="$ac_compile"
1986case "(($ac_try" in
1987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1988  *) ac_try_echo=$ac_try;;
1989esac
1990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1991$as_echo "$ac_try_echo"; } >&5
1992  (eval "$ac_compile") 2>conftest.err
1993  ac_status=$?
1994  if test -s conftest.err; then
1995    grep -v '^ *+' conftest.err >conftest.er1
1996    cat conftest.er1 >&5
1997    mv -f conftest.er1 conftest.err
1998  fi
1999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2000  test $ac_status = 0; } && {
2001	 test -z "$ac_cxx_werror_flag" ||
2002	 test ! -s conftest.err
2003       } && test -s conftest.$ac_objext; then :
2004  ac_retval=0
2005else
2006  $as_echo "$as_me: failed program was:" >&5
2007sed 's/^/| /' conftest.$ac_ext >&5
2008
2009	ac_retval=1
2010fi
2011  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012  as_fn_set_status $ac_retval
2013
2014} # ac_fn_cxx_try_compile
2015
2016# ac_fn_objc_try_compile LINENO
2017# -----------------------------
2018# Try to compile conftest.$ac_ext, and return whether this succeeded.
2019ac_fn_objc_try_compile ()
2020{
2021  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022  rm -f conftest.$ac_objext
2023  if { { ac_try="$ac_compile"
2024case "(($ac_try" in
2025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026  *) ac_try_echo=$ac_try;;
2027esac
2028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029$as_echo "$ac_try_echo"; } >&5
2030  (eval "$ac_compile") 2>conftest.err
2031  ac_status=$?
2032  if test -s conftest.err; then
2033    grep -v '^ *+' conftest.err >conftest.er1
2034    cat conftest.er1 >&5
2035    mv -f conftest.er1 conftest.err
2036  fi
2037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038  test $ac_status = 0; } && {
2039	 test -z "$ac_objc_werror_flag" ||
2040	 test ! -s conftest.err
2041       } && test -s conftest.$ac_objext; then :
2042  ac_retval=0
2043else
2044  $as_echo "$as_me: failed program was:" >&5
2045sed 's/^/| /' conftest.$ac_ext >&5
2046
2047	ac_retval=1
2048fi
2049  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050  as_fn_set_status $ac_retval
2051
2052} # ac_fn_objc_try_compile
2053
2054# ac_fn_c_try_cpp LINENO
2055# ----------------------
2056# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2057ac_fn_c_try_cpp ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if { { ac_try="$ac_cpp conftest.$ac_ext"
2061case "(($ac_try" in
2062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2063  *) ac_try_echo=$ac_try;;
2064esac
2065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2066$as_echo "$ac_try_echo"; } >&5
2067  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2068  ac_status=$?
2069  if test -s conftest.err; then
2070    grep -v '^ *+' conftest.err >conftest.er1
2071    cat conftest.er1 >&5
2072    mv -f conftest.er1 conftest.err
2073  fi
2074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2075  test $ac_status = 0; } > conftest.i && {
2076	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2077	 test ! -s conftest.err
2078       }; then :
2079  ac_retval=0
2080else
2081  $as_echo "$as_me: failed program was:" >&5
2082sed 's/^/| /' conftest.$ac_ext >&5
2083
2084    ac_retval=1
2085fi
2086  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2087  as_fn_set_status $ac_retval
2088
2089} # ac_fn_c_try_cpp
2090
2091# ac_fn_cxx_try_cpp LINENO
2092# ------------------------
2093# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2094ac_fn_cxx_try_cpp ()
2095{
2096  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2097  if { { ac_try="$ac_cpp conftest.$ac_ext"
2098case "(($ac_try" in
2099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2100  *) ac_try_echo=$ac_try;;
2101esac
2102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2103$as_echo "$ac_try_echo"; } >&5
2104  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2105  ac_status=$?
2106  if test -s conftest.err; then
2107    grep -v '^ *+' conftest.err >conftest.er1
2108    cat conftest.er1 >&5
2109    mv -f conftest.er1 conftest.err
2110  fi
2111  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2112  test $ac_status = 0; } > conftest.i && {
2113	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2114	 test ! -s conftest.err
2115       }; then :
2116  ac_retval=0
2117else
2118  $as_echo "$as_me: failed program was:" >&5
2119sed 's/^/| /' conftest.$ac_ext >&5
2120
2121    ac_retval=1
2122fi
2123  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2124  as_fn_set_status $ac_retval
2125
2126} # ac_fn_cxx_try_cpp
2127
2128# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2129# ---------------------------------------------------------
2130# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2131# the include files in INCLUDES and setting the cache variable VAR
2132# accordingly.
2133ac_fn_cxx_check_header_mongrel ()
2134{
2135  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136  if eval \${$3+:} false; then :
2137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2138$as_echo_n "checking for $2... " >&6; }
2139if eval \${$3+:} false; then :
2140  $as_echo_n "(cached) " >&6
2141fi
2142eval ac_res=\$$3
2143	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2144$as_echo "$ac_res" >&6; }
2145else
2146  # Is the header compilable?
2147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2148$as_echo_n "checking $2 usability... " >&6; }
2149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h.  */
2151$4
2152#include <$2>
2153_ACEOF
2154if ac_fn_cxx_try_compile "$LINENO"; then :
2155  ac_header_compiler=yes
2156else
2157  ac_header_compiler=no
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2161$as_echo "$ac_header_compiler" >&6; }
2162
2163# Is the header present?
2164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2165$as_echo_n "checking $2 presence... " >&6; }
2166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h.  */
2168#include <$2>
2169_ACEOF
2170if ac_fn_cxx_try_cpp "$LINENO"; then :
2171  ac_header_preproc=yes
2172else
2173  ac_header_preproc=no
2174fi
2175rm -f conftest.err conftest.i conftest.$ac_ext
2176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2177$as_echo "$ac_header_preproc" >&6; }
2178
2179# So?  What about this header?
2180case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2181  yes:no: )
2182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2183$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2185$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2186    ;;
2187  no:yes:* )
2188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2189$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2191$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2193$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2195$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2197$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2198( $as_echo "## ----------------------------------------- ##
2199## Report this to build-dev@openjdk.java.net ##
2200## ----------------------------------------- ##"
2201     ) | sed "s/^/$as_me: WARNING:     /" >&2
2202    ;;
2203esac
2204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
2206if eval \${$3+:} false; then :
2207  $as_echo_n "(cached) " >&6
2208else
2209  eval "$3=\$ac_header_compiler"
2210fi
2211eval ac_res=\$$3
2212	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213$as_echo "$ac_res" >&6; }
2214fi
2215  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216
2217} # ac_fn_cxx_check_header_mongrel
2218
2219# ac_fn_cxx_try_run LINENO
2220# ------------------------
2221# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2222# that executables *can* be run.
2223ac_fn_cxx_try_run ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  if { { ac_try="$ac_link"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_link") 2>&5
2234  ac_status=$?
2235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2237  { { case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_try") 2>&5
2244  ac_status=$?
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; }; }; then :
2247  ac_retval=0
2248else
2249  $as_echo "$as_me: program exited with status $ac_status" >&5
2250       $as_echo "$as_me: failed program was:" >&5
2251sed 's/^/| /' conftest.$ac_ext >&5
2252
2253       ac_retval=$ac_status
2254fi
2255  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2256  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257  as_fn_set_status $ac_retval
2258
2259} # ac_fn_cxx_try_run
2260
2261# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2262# ---------------------------------------------------------
2263# Tests whether HEADER exists and can be compiled using the include files in
2264# INCLUDES, setting the cache variable VAR accordingly.
2265ac_fn_cxx_check_header_compile ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2269$as_echo_n "checking for $2... " >&6; }
2270if eval \${$3+:} false; then :
2271  $as_echo_n "(cached) " >&6
2272else
2273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h.  */
2275$4
2276#include <$2>
2277_ACEOF
2278if ac_fn_cxx_try_compile "$LINENO"; then :
2279  eval "$3=yes"
2280else
2281  eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_cxx_check_header_compile
2291
2292# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2293# ----------------------------------------------
2294# Tries to find the compile-time value of EXPR in a program that includes
2295# INCLUDES, setting VAR accordingly. Returns whether the value could be
2296# computed
2297ac_fn_cxx_compute_int ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if test "$cross_compiling" = yes; then
2301    # Depending upon the size, compute the lo and hi bounds.
2302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305int
2306main ()
2307{
2308static int test_array [1 - 2 * !(($2) >= 0)];
2309test_array [0] = 0;
2310return test_array [0];
2311
2312  ;
2313  return 0;
2314}
2315_ACEOF
2316if ac_fn_cxx_try_compile "$LINENO"; then :
2317  ac_lo=0 ac_mid=0
2318  while :; do
2319    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h.  */
2321$4
2322int
2323main ()
2324{
2325static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2326test_array [0] = 0;
2327return test_array [0];
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_hi=$ac_mid; break
2335else
2336  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2337			if test $ac_lo -le $ac_mid; then
2338			  ac_lo= ac_hi=
2339			  break
2340			fi
2341			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344  done
2345else
2346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h.  */
2348$4
2349int
2350main ()
2351{
2352static int test_array [1 - 2 * !(($2) < 0)];
2353test_array [0] = 0;
2354return test_array [0];
2355
2356  ;
2357  return 0;
2358}
2359_ACEOF
2360if ac_fn_cxx_try_compile "$LINENO"; then :
2361  ac_hi=-1 ac_mid=-1
2362  while :; do
2363    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main ()
2368{
2369static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2370test_array [0] = 0;
2371return test_array [0];
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_lo=$ac_mid; break
2379else
2380  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2381			if test $ac_mid -le $ac_hi; then
2382			  ac_lo= ac_hi=
2383			  break
2384			fi
2385			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388  done
2389else
2390  ac_lo= ac_hi=
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395# Binary search between lo and hi bounds.
2396while test "x$ac_lo" != "x$ac_hi"; do
2397  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h.  */
2400$4
2401int
2402main ()
2403{
2404static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2405test_array [0] = 0;
2406return test_array [0];
2407
2408  ;
2409  return 0;
2410}
2411_ACEOF
2412if ac_fn_cxx_try_compile "$LINENO"; then :
2413  ac_hi=$ac_mid
2414else
2415  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2416fi
2417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2418done
2419case $ac_lo in #((
2420?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2421'') ac_retval=1 ;;
2422esac
2423  else
2424    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425/* end confdefs.h.  */
2426$4
2427static long int longval () { return $2; }
2428static unsigned long int ulongval () { return $2; }
2429#include <stdio.h>
2430#include <stdlib.h>
2431int
2432main ()
2433{
2434
2435  FILE *f = fopen ("conftest.val", "w");
2436  if (! f)
2437    return 1;
2438  if (($2) < 0)
2439    {
2440      long int i = longval ();
2441      if (i != ($2))
2442	return 1;
2443      fprintf (f, "%ld", i);
2444    }
2445  else
2446    {
2447      unsigned long int i = ulongval ();
2448      if (i != ($2))
2449	return 1;
2450      fprintf (f, "%lu", i);
2451    }
2452  /* Do not output a trailing newline, as this causes \r\n confusion
2453     on some platforms.  */
2454  return ferror (f) || fclose (f) != 0;
2455
2456  ;
2457  return 0;
2458}
2459_ACEOF
2460if ac_fn_cxx_try_run "$LINENO"; then :
2461  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2462else
2463  ac_retval=1
2464fi
2465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2466  conftest.$ac_objext conftest.beam conftest.$ac_ext
2467rm -f conftest.val
2468
2469  fi
2470  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471  as_fn_set_status $ac_retval
2472
2473} # ac_fn_cxx_compute_int
2474
2475# ac_fn_cxx_try_link LINENO
2476# -------------------------
2477# Try to link conftest.$ac_ext, and return whether this succeeded.
2478ac_fn_cxx_try_link ()
2479{
2480  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481  rm -f conftest.$ac_objext conftest$ac_exeext
2482  if { { ac_try="$ac_link"
2483case "(($ac_try" in
2484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2485  *) ac_try_echo=$ac_try;;
2486esac
2487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2488$as_echo "$ac_try_echo"; } >&5
2489  (eval "$ac_link") 2>conftest.err
2490  ac_status=$?
2491  if test -s conftest.err; then
2492    grep -v '^ *+' conftest.err >conftest.er1
2493    cat conftest.er1 >&5
2494    mv -f conftest.er1 conftest.err
2495  fi
2496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2497  test $ac_status = 0; } && {
2498	 test -z "$ac_cxx_werror_flag" ||
2499	 test ! -s conftest.err
2500       } && test -s conftest$ac_exeext && {
2501	 test "$cross_compiling" = yes ||
2502	 test -x conftest$ac_exeext
2503       }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: failed program was:" >&5
2507sed 's/^/| /' conftest.$ac_ext >&5
2508
2509	ac_retval=1
2510fi
2511  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2512  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2513  # interfere with the next link command; also delete a directory that is
2514  # left behind by Apple's compiler.  We do this before executing the actions.
2515  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2516  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2517  as_fn_set_status $ac_retval
2518
2519} # ac_fn_cxx_try_link
2520
2521# ac_fn_cxx_check_func LINENO FUNC VAR
2522# ------------------------------------
2523# Tests whether FUNC exists, setting the cache variable VAR accordingly
2524ac_fn_cxx_check_func ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2535   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2536#define $2 innocuous_$2
2537
2538/* System header to define __stub macros and hopefully few prototypes,
2539    which can conflict with char $2 (); below.
2540    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2541    <limits.h> exists even on freestanding compilers.  */
2542
2543#ifdef __STDC__
2544# include <limits.h>
2545#else
2546# include <assert.h>
2547#endif
2548
2549#undef $2
2550
2551/* Override any GCC internal prototype to avoid an error.
2552   Use char because int might match the return type of a GCC
2553   builtin and then its argument prototype would still apply.  */
2554#ifdef __cplusplus
2555extern "C"
2556#endif
2557char $2 ();
2558/* The GNU C library defines this for functions which it implements
2559    to always fail with ENOSYS.  Some functions are actually named
2560    something starting with __ and the normal name is an alias.  */
2561#if defined __stub_$2 || defined __stub___$2
2562choke me
2563#endif
2564
2565int
2566main ()
2567{
2568return $2 ();
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_link "$LINENO"; then :
2574  eval "$3=yes"
2575else
2576  eval "$3=no"
2577fi
2578rm -f core conftest.err conftest.$ac_objext \
2579    conftest$ac_exeext conftest.$ac_ext
2580fi
2581eval ac_res=\$$3
2582	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583$as_echo "$ac_res" >&6; }
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585
2586} # ac_fn_cxx_check_func
2587
2588# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2589# -------------------------------------------------------
2590# Tests whether HEADER exists and can be compiled using the include files in
2591# INCLUDES, setting the cache variable VAR accordingly.
2592ac_fn_c_check_header_compile ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2596$as_echo_n "checking for $2... " >&6; }
2597if eval \${$3+:} false; then :
2598  $as_echo_n "(cached) " >&6
2599else
2600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2601/* end confdefs.h.  */
2602$4
2603#include <$2>
2604_ACEOF
2605if ac_fn_c_try_compile "$LINENO"; then :
2606  eval "$3=yes"
2607else
2608  eval "$3=no"
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611fi
2612eval ac_res=\$$3
2613	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614$as_echo "$ac_res" >&6; }
2615  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2616
2617} # ac_fn_c_check_header_compile
2618cat >config.log <<_ACEOF
2619This file contains any messages produced by compilers while
2620running configure, to aid debugging if configure makes a mistake.
2621
2622It was created by OpenJDK $as_me jdk8, which was
2623generated by GNU Autoconf 2.69.  Invocation command line was
2624
2625  $ $0 $@
2626
2627_ACEOF
2628exec 5>>config.log
2629{
2630cat <<_ASUNAME
2631## --------- ##
2632## Platform. ##
2633## --------- ##
2634
2635hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2636uname -m = `(uname -m) 2>/dev/null || echo unknown`
2637uname -r = `(uname -r) 2>/dev/null || echo unknown`
2638uname -s = `(uname -s) 2>/dev/null || echo unknown`
2639uname -v = `(uname -v) 2>/dev/null || echo unknown`
2640
2641/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2642/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2643
2644/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2645/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2646/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2647/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2648/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2649/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2650/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2651
2652_ASUNAME
2653
2654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2655for as_dir in $PATH
2656do
2657  IFS=$as_save_IFS
2658  test -z "$as_dir" && as_dir=.
2659    $as_echo "PATH: $as_dir"
2660  done
2661IFS=$as_save_IFS
2662
2663} >&5
2664
2665cat >&5 <<_ACEOF
2666
2667
2668## ----------- ##
2669## Core tests. ##
2670## ----------- ##
2671
2672_ACEOF
2673
2674
2675# Keep a trace of the command line.
2676# Strip out --no-create and --no-recursion so they do not pile up.
2677# Strip out --silent because we don't want to record it for future runs.
2678# Also quote any args containing shell meta-characters.
2679# Make two passes to allow for proper duplicate-argument suppression.
2680ac_configure_args=
2681ac_configure_args0=
2682ac_configure_args1=
2683ac_must_keep_next=false
2684for ac_pass in 1 2
2685do
2686  for ac_arg
2687  do
2688    case $ac_arg in
2689    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2690    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2691    | -silent | --silent | --silen | --sile | --sil)
2692      continue ;;
2693    *\'*)
2694      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2695    esac
2696    case $ac_pass in
2697    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2698    2)
2699      as_fn_append ac_configure_args1 " '$ac_arg'"
2700      if test $ac_must_keep_next = true; then
2701	ac_must_keep_next=false # Got value, back to normal.
2702      else
2703	case $ac_arg in
2704	  *=* | --config-cache | -C | -disable-* | --disable-* \
2705	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2706	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2707	  | -with-* | --with-* | -without-* | --without-* | --x)
2708	    case "$ac_configure_args0 " in
2709	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2710	    esac
2711	    ;;
2712	  -* ) ac_must_keep_next=true ;;
2713	esac
2714      fi
2715      as_fn_append ac_configure_args " '$ac_arg'"
2716      ;;
2717    esac
2718  done
2719done
2720{ ac_configure_args0=; unset ac_configure_args0;}
2721{ ac_configure_args1=; unset ac_configure_args1;}
2722
2723# When interrupted or exit'd, cleanup temporary files, and complete
2724# config.log.  We remove comments because anyway the quotes in there
2725# would cause problems or look ugly.
2726# WARNING: Use '\'' to represent an apostrophe within the trap.
2727# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2728trap 'exit_status=$?
2729  # Save into config.log some information that might help in debugging.
2730  {
2731    echo
2732
2733    $as_echo "## ---------------- ##
2734## Cache variables. ##
2735## ---------------- ##"
2736    echo
2737    # The following way of writing the cache mishandles newlines in values,
2738(
2739  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2740    eval ac_val=\$$ac_var
2741    case $ac_val in #(
2742    *${as_nl}*)
2743      case $ac_var in #(
2744      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2745$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2746      esac
2747      case $ac_var in #(
2748      _ | IFS | as_nl) ;; #(
2749      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2750      *) { eval $ac_var=; unset $ac_var;} ;;
2751      esac ;;
2752    esac
2753  done
2754  (set) 2>&1 |
2755    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2756    *${as_nl}ac_space=\ *)
2757      sed -n \
2758	"s/'\''/'\''\\\\'\'''\''/g;
2759	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2760      ;; #(
2761    *)
2762      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2763      ;;
2764    esac |
2765    sort
2766)
2767    echo
2768
2769    $as_echo "## ----------------- ##
2770## Output variables. ##
2771## ----------------- ##"
2772    echo
2773    for ac_var in $ac_subst_vars
2774    do
2775      eval ac_val=\$$ac_var
2776      case $ac_val in
2777      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2778      esac
2779      $as_echo "$ac_var='\''$ac_val'\''"
2780    done | sort
2781    echo
2782
2783    if test -n "$ac_subst_files"; then
2784      $as_echo "## ------------------- ##
2785## File substitutions. ##
2786## ------------------- ##"
2787      echo
2788      for ac_var in $ac_subst_files
2789      do
2790	eval ac_val=\$$ac_var
2791	case $ac_val in
2792	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2793	esac
2794	$as_echo "$ac_var='\''$ac_val'\''"
2795      done | sort
2796      echo
2797    fi
2798
2799    if test -s confdefs.h; then
2800      $as_echo "## ----------- ##
2801## confdefs.h. ##
2802## ----------- ##"
2803      echo
2804      cat confdefs.h
2805      echo
2806    fi
2807    test "$ac_signal" != 0 &&
2808      $as_echo "$as_me: caught signal $ac_signal"
2809    $as_echo "$as_me: exit $exit_status"
2810  } >&5
2811  rm -f core *.core core.conftest.* &&
2812    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2813    exit $exit_status
2814' 0
2815for ac_signal in 1 2 13 15; do
2816  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2817done
2818ac_signal=0
2819
2820# confdefs.h avoids OS command line length limits that DEFS can exceed.
2821rm -f -r conftest* confdefs.h
2822
2823$as_echo "/* confdefs.h */" > confdefs.h
2824
2825# Predefined preprocessor variables.
2826
2827cat >>confdefs.h <<_ACEOF
2828#define PACKAGE_NAME "$PACKAGE_NAME"
2829_ACEOF
2830
2831cat >>confdefs.h <<_ACEOF
2832#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2833_ACEOF
2834
2835cat >>confdefs.h <<_ACEOF
2836#define PACKAGE_VERSION "$PACKAGE_VERSION"
2837_ACEOF
2838
2839cat >>confdefs.h <<_ACEOF
2840#define PACKAGE_STRING "$PACKAGE_STRING"
2841_ACEOF
2842
2843cat >>confdefs.h <<_ACEOF
2844#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2845_ACEOF
2846
2847cat >>confdefs.h <<_ACEOF
2848#define PACKAGE_URL "$PACKAGE_URL"
2849_ACEOF
2850
2851
2852# Let the site file select an alternate cache file if it wants to.
2853# Prefer an explicitly selected file to automatically selected ones.
2854ac_site_file1=NONE
2855ac_site_file2=NONE
2856if test -n "$CONFIG_SITE"; then
2857  # We do not want a PATH search for config.site.
2858  case $CONFIG_SITE in #((
2859    -*)  ac_site_file1=./$CONFIG_SITE;;
2860    */*) ac_site_file1=$CONFIG_SITE;;
2861    *)   ac_site_file1=./$CONFIG_SITE;;
2862  esac
2863elif test "x$prefix" != xNONE; then
2864  ac_site_file1=$prefix/share/config.site
2865  ac_site_file2=$prefix/etc/config.site
2866else
2867  ac_site_file1=$ac_default_prefix/share/config.site
2868  ac_site_file2=$ac_default_prefix/etc/config.site
2869fi
2870for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2871do
2872  test "x$ac_site_file" = xNONE && continue
2873  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2874    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2875$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2876    sed 's/^/| /' "$ac_site_file" >&5
2877    . "$ac_site_file" \
2878      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2880as_fn_error $? "failed to load site script $ac_site_file
2881See \`config.log' for more details" "$LINENO" 5; }
2882  fi
2883done
2884
2885if test -r "$cache_file"; then
2886  # Some versions of bash will fail to source /dev/null (special files
2887  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2888  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2889    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2890$as_echo "$as_me: loading cache $cache_file" >&6;}
2891    case $cache_file in
2892      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2893      *)                      . "./$cache_file";;
2894    esac
2895  fi
2896else
2897  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2898$as_echo "$as_me: creating cache $cache_file" >&6;}
2899  >$cache_file
2900fi
2901
2902# Check that the precious variables saved in the cache have kept the same
2903# value.
2904ac_cache_corrupted=false
2905for ac_var in $ac_precious_vars; do
2906  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2907  eval ac_new_set=\$ac_env_${ac_var}_set
2908  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2909  eval ac_new_val=\$ac_env_${ac_var}_value
2910  case $ac_old_set,$ac_new_set in
2911    set,)
2912      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2913$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2914      ac_cache_corrupted=: ;;
2915    ,set)
2916      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2917$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2918      ac_cache_corrupted=: ;;
2919    ,);;
2920    *)
2921      if test "x$ac_old_val" != "x$ac_new_val"; then
2922	# differences in whitespace do not lead to failure.
2923	ac_old_val_w=`echo x $ac_old_val`
2924	ac_new_val_w=`echo x $ac_new_val`
2925	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2926	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2927$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2928	  ac_cache_corrupted=:
2929	else
2930	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2931$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2932	  eval $ac_var=\$ac_old_val
2933	fi
2934	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2935$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2936	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2937$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2938      fi;;
2939  esac
2940  # Pass precious variables to config.status.
2941  if test "$ac_new_set" = set; then
2942    case $ac_new_val in
2943    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2944    *) ac_arg=$ac_var=$ac_new_val ;;
2945    esac
2946    case " $ac_configure_args " in
2947      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2948      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2949    esac
2950  fi
2951done
2952if $ac_cache_corrupted; then
2953  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2955  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2956$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2957  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2958fi
2959## -------------------- ##
2960## Main body of script. ##
2961## -------------------- ##
2962
2963ac_ext=c
2964ac_cpp='$CPP $CPPFLAGS'
2965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2967ac_compiler_gnu=$ac_cv_c_compiler_gnu
2968
2969
2970
2971ac_aux_dir=
2972for ac_dir in build-aux "$srcdir"/build-aux; do
2973  if test -f "$ac_dir/install-sh"; then
2974    ac_aux_dir=$ac_dir
2975    ac_install_sh="$ac_aux_dir/install-sh -c"
2976    break
2977  elif test -f "$ac_dir/install.sh"; then
2978    ac_aux_dir=$ac_dir
2979    ac_install_sh="$ac_aux_dir/install.sh -c"
2980    break
2981  elif test -f "$ac_dir/shtool"; then
2982    ac_aux_dir=$ac_dir
2983    ac_install_sh="$ac_aux_dir/shtool install -c"
2984    break
2985  fi
2986done
2987if test -z "$ac_aux_dir"; then
2988  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2989fi
2990
2991# These three variables are undocumented and unsupported,
2992# and are intended to be withdrawn in a future Autoconf release.
2993# They can cause serious problems if a builder's source tree is in a directory
2994# whose full name contains unusual characters.
2995ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2996ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2997ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2998
2999
3000# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3001
3002#
3003# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3004# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3005#
3006# This code is free software; you can redistribute it and/or modify it
3007# under the terms of the GNU General Public License version 2 only, as
3008# published by the Free Software Foundation.  Oracle designates this
3009# particular file as subject to the "Classpath" exception as provided
3010# by Oracle in the LICENSE file that accompanied this code.
3011#
3012# This code is distributed in the hope that it will be useful, but WITHOUT
3013# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3014# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3015# version 2 for more details (a copy is included in the LICENSE file that
3016# accompanied this code).
3017#
3018# You should have received a copy of the GNU General Public License version
3019# 2 along with this work; if not, write to the Free Software Foundation,
3020# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3021#
3022# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3023# or visit www.oracle.com if you need additional information or have any
3024# questions.
3025#
3026
3027#
3028# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3029#
3030# This program is free software; you can redistribute it and/or modify
3031# it under the terms of the GNU General Public License as published by
3032# the Free Software Foundation; either version 2 of the License, or
3033# (at your option) any later version.
3034#
3035# This program is distributed in the hope that it will be useful, but
3036# WITHOUT ANY WARRANTY; without even the implied warranty of
3037# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3038# General Public License for more details.
3039#
3040# You should have received a copy of the GNU General Public License
3041# along with this program; if not, write to the Free Software
3042# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3043#
3044# As a special exception to the GNU General Public License, if you
3045# distribute this file as part of a program that contains a
3046# configuration script generated by Autoconf, you may include it under
3047# the same distribution terms that you use for the rest of that program.
3048
3049# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3050# ----------------------------------
3051# PKG_PROG_PKG_CONFIG
3052
3053# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3054#
3055# Check to see whether a particular set of modules exists.  Similar
3056# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3057#
3058#
3059# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3060# this or PKG_CHECK_MODULES is called, or make sure to call
3061# PKG_CHECK_EXISTS manually
3062# --------------------------------------------------------------
3063
3064
3065
3066# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3067# ---------------------------------------------
3068# _PKG_CONFIG
3069
3070# _PKG_SHORT_ERRORS_SUPPORTED
3071# -----------------------------
3072# _PKG_SHORT_ERRORS_SUPPORTED
3073
3074
3075# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3076# [ACTION-IF-NOT-FOUND])
3077#
3078#
3079# Note that if there is a possibility the first call to
3080# PKG_CHECK_MODULES might not happen, you should be sure to include an
3081# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3082#
3083#
3084# --------------------------------------------------------------
3085# PKG_CHECK_MODULES
3086
3087
3088# Include these first...
3089#
3090# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3092#
3093# This code is free software; you can redistribute it and/or modify it
3094# under the terms of the GNU General Public License version 2 only, as
3095# published by the Free Software Foundation.  Oracle designates this
3096# particular file as subject to the "Classpath" exception as provided
3097# by Oracle in the LICENSE file that accompanied this code.
3098#
3099# This code is distributed in the hope that it will be useful, but WITHOUT
3100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3102# version 2 for more details (a copy is included in the LICENSE file that
3103# accompanied this code).
3104#
3105# You should have received a copy of the GNU General Public License version
3106# 2 along with this work; if not, write to the Free Software Foundation,
3107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3108#
3109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3110# or visit www.oracle.com if you need additional information or have any
3111# questions.
3112#
3113
3114# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3115# If so, then append $1 to $2\
3116# Also set JVM_ARG_OK to true/false depending on outcome.
3117
3118
3119# Appends a string to a path variable, only adding the : when needed.
3120
3121
3122# This will make sure the given variable points to a full and proper
3123# path. This means:
3124# 1) There will be no spaces in the path. On posix platforms,
3125#    spaces in the path will result in an error. On Windows,
3126#    the path will be rewritten using short-style to be space-free.
3127# 2) The path will be absolute, and it will be in unix-style (on
3128#     cygwin).
3129# $1: The name of the variable to fix
3130
3131
3132# This will make sure the given variable points to a executable
3133# with a full and proper path. This means:
3134# 1) There will be no spaces in the path. On posix platforms,
3135#    spaces in the path will result in an error. On Windows,
3136#    the path will be rewritten using short-style to be space-free.
3137# 2) The path will be absolute, and it will be in unix-style (on
3138#     cygwin).
3139# Any arguments given to the executable is preserved.
3140# If the input variable does not have a directory specification, then
3141# it need to be in the PATH.
3142# $1: The name of the variable to fix
3143
3144
3145
3146
3147# Register a --with argument but mark it as deprecated
3148# $1: The name of the with argument to deprecate, not including --with-
3149
3150
3151
3152
3153# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3154# $1: variable to check
3155# $2: executable name to print in warning (optional)
3156
3157
3158# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3159# Arguments as AC_PATH_PROG:
3160# $1: variable to set
3161# $2: executable name to look for
3162
3163
3164# Setup the most fundamental tools that relies on not much else to set up,
3165# but is used by much of the early bootstrap code.
3166
3167
3168# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3169
3170
3171
3172
3173
3174
3175
3176#%%% Simple tools %%%
3177
3178# Check if we have found a usable version of make
3179# $1: the path to a potential make binary (or empty)
3180# $2: the description on how we found this
3181
3182
3183# Goes looking for a usable version of GNU make.
3184
3185
3186
3187
3188
3189
3190# Check if build directory is on local disk. If not possible to determine,
3191# we prefer to claim it's local.
3192# Argument 1: directory to test
3193# Argument 2: what to do if it is on local disk
3194# Argument 3: what to do otherwise (remote disk or failure)
3195
3196
3197# Check that source files have basic read permissions set. This might
3198# not be the case in cygwin in certain conditions.
3199
3200
3201
3202
3203#
3204# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3205# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3206#
3207# This code is free software; you can redistribute it and/or modify it
3208# under the terms of the GNU General Public License version 2 only, as
3209# published by the Free Software Foundation.  Oracle designates this
3210# particular file as subject to the "Classpath" exception as provided
3211# by Oracle in the LICENSE file that accompanied this code.
3212#
3213# This code is distributed in the hope that it will be useful, but WITHOUT
3214# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3215# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3216# version 2 for more details (a copy is included in the LICENSE file that
3217# accompanied this code).
3218#
3219# You should have received a copy of the GNU General Public License version
3220# 2 along with this work; if not, write to the Free Software Foundation,
3221# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3222#
3223# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3224# or visit www.oracle.com if you need additional information or have any
3225# questions.
3226#
3227
3228
3229
3230
3231
3232# Helper function which possibly converts a path using DOS-style short mode.
3233# If so, the updated path is stored in $new_path.
3234# $1: The path to check
3235
3236
3237# Helper function which possibly converts a path using DOS-style short mode.
3238# If so, the updated path is stored in $new_path.
3239# $1: The path to check
3240
3241
3242# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3243# and could probably be heavily simplified. However, all changes in this
3244# area tend to need lot of testing in different scenarios, and in lack of
3245# proper unit testing, cleaning this up has not been deemed worth the effort
3246# at the moment.
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3257
3258
3259
3260
3261#
3262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296# ... then the rest
3297#
3298# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3299# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3300#
3301# This code is free software; you can redistribute it and/or modify it
3302# under the terms of the GNU General Public License version 2 only, as
3303# published by the Free Software Foundation.  Oracle designates this
3304# particular file as subject to the "Classpath" exception as provided
3305# by Oracle in the LICENSE file that accompanied this code.
3306#
3307# This code is distributed in the hope that it will be useful, but WITHOUT
3308# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3309# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3310# version 2 for more details (a copy is included in the LICENSE file that
3311# accompanied this code).
3312#
3313# You should have received a copy of the GNU General Public License version
3314# 2 along with this work; if not, write to the Free Software Foundation,
3315# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3316#
3317# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3318# or visit www.oracle.com if you need additional information or have any
3319# questions.
3320#
3321
3322# Execute the check given as argument, and verify the result
3323# If the Boot JDK was previously found, do nothing
3324# $1 A command line (typically autoconf macro) to execute
3325
3326
3327# Test: Is bootjdk explicitely set by command line arguments?
3328
3329
3330# Test: Is bootjdk available from builddeps?
3331
3332
3333# Test: Is $JAVA_HOME set?
3334
3335
3336# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3337
3338
3339# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3340
3341
3342# Look for a jdk in the given path. If there are multiple, try to select the newest.
3343# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3344# $1 = Path to directory containing jdk installations.
3345# $2 = String to append to the found JDK directory to get the proper JDK home
3346
3347
3348# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3349# environmental variable as base for where to look.
3350# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3351
3352
3353# Test: Is there a JDK installed in default, well-known locations?
3354
3355
3356# Check that a command-line tool in the Boot JDK is correct
3357# $1 = name of variable to assign
3358# $2 = name of binary
3359
3360
3361###############################################################################
3362#
3363# We need a Boot JDK to bootstrap the build.
3364#
3365
3366
3367
3368
3369
3370#
3371# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3373#
3374# This code is free software; you can redistribute it and/or modify it
3375# under the terms of the GNU General Public License version 2 only, as
3376# published by the Free Software Foundation.  Oracle designates this
3377# particular file as subject to the "Classpath" exception as provided
3378# by Oracle in the LICENSE file that accompanied this code.
3379#
3380# This code is distributed in the hope that it will be useful, but WITHOUT
3381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3383# version 2 for more details (a copy is included in the LICENSE file that
3384# accompanied this code).
3385#
3386# You should have received a copy of the GNU General Public License version
3387# 2 along with this work; if not, write to the Free Software Foundation,
3388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3389#
3390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3391# or visit www.oracle.com if you need additional information or have any
3392# questions.
3393#
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414#
3415# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3416# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3417#
3418# This code is free software; you can redistribute it and/or modify it
3419# under the terms of the GNU General Public License version 2 only, as
3420# published by the Free Software Foundation.  Oracle designates this
3421# particular file as subject to the "Classpath" exception as provided
3422# by Oracle in the LICENSE file that accompanied this code.
3423#
3424# This code is distributed in the hope that it will be useful, but WITHOUT
3425# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3426# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3427# version 2 for more details (a copy is included in the LICENSE file that
3428# accompanied this code).
3429#
3430# You should have received a copy of the GNU General Public License version
3431# 2 along with this work; if not, write to the Free Software Foundation,
3432# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3433#
3434# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3435# or visit www.oracle.com if you need additional information or have any
3436# questions.
3437#
3438
3439
3440
3441
3442
3443cygwin_help() {
3444    case $1 in
3445    unzip)
3446        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3447    zip)
3448        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3449    make)
3450        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3451    * )
3452       break ;;
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    * )
3475       break ;;
3476    esac
3477}
3478
3479yum_help() {
3480    case $1 in
3481    devkit)
3482        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3483    openjdk)
3484        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3485    alsa)
3486        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3487    cups)
3488        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3489    freetype2)
3490        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3491    pulse)
3492        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3493    x11)
3494        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3495    ccache)
3496        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3497    * )
3498       break ;;
3499    esac
3500}
3501
3502port_help() {
3503    PKGHANDLER_COMMAND=""
3504}
3505
3506pkgutil_help() {
3507    PKGHANDLER_COMMAND=""
3508}
3509
3510pkgadd_help() {
3511    PKGHANDLER_COMMAND=""
3512}
3513
3514
3515
3516#
3517# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3518# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3519#
3520# This code is free software; you can redistribute it and/or modify it
3521# under the terms of the GNU General Public License version 2 only, as
3522# published by the Free Software Foundation.  Oracle designates this
3523# particular file as subject to the "Classpath" exception as provided
3524# by Oracle in the LICENSE file that accompanied this code.
3525#
3526# This code is distributed in the hope that it will be useful, but WITHOUT
3527# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3528# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3529# version 2 for more details (a copy is included in the LICENSE file that
3530# accompanied this code).
3531#
3532# You should have received a copy of the GNU General Public License version
3533# 2 along with this work; if not, write to the Free Software Foundation,
3534# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3535#
3536# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3537# or visit www.oracle.com if you need additional information or have any
3538# questions.
3539#
3540
3541
3542
3543
3544
3545
3546
3547
3548###############################################################################
3549#
3550# Should we build only OpenJDK even if closed sources are present?
3551#
3552
3553
3554
3555
3556###############################################################################
3557#
3558# Setup version numbers
3559#
3560
3561
3562
3563
3564
3565
3566# Support for customization of the build process. Some build files
3567# will include counterparts from this location, if they exist. This allows
3568# for a degree of customization of the build targets and the rules/recipes
3569# to create them
3570
3571# Check whether --with-custom-make-dir was given.
3572if test "${with_custom_make_dir+set}" = set; then :
3573  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3574fi
3575
3576
3577
3578#
3579# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3581#
3582# This code is free software; you can redistribute it and/or modify it
3583# under the terms of the GNU General Public License version 2 only, as
3584# published by the Free Software Foundation.  Oracle designates this
3585# particular file as subject to the "Classpath" exception as provided
3586# by Oracle in the LICENSE file that accompanied this code.
3587#
3588# This code is distributed in the hope that it will be useful, but WITHOUT
3589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3591# version 2 for more details (a copy is included in the LICENSE file that
3592# accompanied this code).
3593#
3594# You should have received a copy of the GNU General Public License version
3595# 2 along with this work; if not, write to the Free Software Foundation,
3596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3597#
3598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3599# or visit www.oracle.com if you need additional information or have any
3600# questions.
3601#
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617#
3618# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3619# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3620#
3621# This code is free software; you can redistribute it and/or modify it
3622# under the terms of the GNU General Public License version 2 only, as
3623# published by the Free Software Foundation.  Oracle designates this
3624# particular file as subject to the "Classpath" exception as provided
3625# by Oracle in the LICENSE file that accompanied this code.
3626#
3627# This code is distributed in the hope that it will be useful, but WITHOUT
3628# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3629# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3630# version 2 for more details (a copy is included in the LICENSE file that
3631# accompanied this code).
3632#
3633# You should have received a copy of the GNU General Public License version
3634# 2 along with this work; if not, write to the Free Software Foundation,
3635# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3636#
3637# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3638# or visit www.oracle.com if you need additional information or have any
3639# questions.
3640#
3641
3642# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3643# Converts autoconf style CPU name to OpenJDK style, into
3644# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3645
3646
3647# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3648# Converts autoconf style OS name to OpenJDK style, into
3649# VAR_OS and VAR_OS_API.
3650
3651
3652# Expects $host_os $host_cpu $build_os and $build_cpu
3653# and $with_target_bits to have been setup!
3654#
3655# Translate the standard triplet(quadruplet) definition
3656# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3657# OPENJDK_BUILD_OS, etc.
3658
3659
3660# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3661# accordingly. Must be done after setting up build and target system, but before
3662# doing anything else with these values.
3663
3664
3665    # Setup the legacy variables, for controlling the old makefiles.
3666    #
3667
3668
3669
3670
3671#%%% Build and target systems %%%
3672
3673
3674
3675
3676# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3677# Add -mX to various FLAGS variables.
3678
3679
3680
3681
3682
3683
3684#
3685# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3686# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3687#
3688# This code is free software; you can redistribute it and/or modify it
3689# under the terms of the GNU General Public License version 2 only, as
3690# published by the Free Software Foundation.  Oracle designates this
3691# particular file as subject to the "Classpath" exception as provided
3692# by Oracle in the LICENSE file that accompanied this code.
3693#
3694# This code is distributed in the hope that it will be useful, but WITHOUT
3695# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3696# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3697# version 2 for more details (a copy is included in the LICENSE file that
3698# accompanied this code).
3699#
3700# You should have received a copy of the GNU General Public License version
3701# 2 along with this work; if not, write to the Free Software Foundation,
3702# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3703#
3704# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3705# or visit www.oracle.com if you need additional information or have any
3706# questions.
3707#
3708
3709
3710
3711
3712
3713
3714
3715
3716#
3717# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3718# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3719#
3720# This code is free software; you can redistribute it and/or modify it
3721# under the terms of the GNU General Public License version 2 only, as
3722# published by the Free Software Foundation.  Oracle designates this
3723# particular file as subject to the "Classpath" exception as provided
3724# by Oracle in the LICENSE file that accompanied this code.
3725#
3726# This code is distributed in the hope that it will be useful, but WITHOUT
3727# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3728# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3729# version 2 for more details (a copy is included in the LICENSE file that
3730# accompanied this code).
3731#
3732# You should have received a copy of the GNU General Public License version
3733# 2 along with this work; if not, write to the Free Software Foundation,
3734# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3735#
3736# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3737# or visit www.oracle.com if you need additional information or have any
3738# questions.
3739#
3740
3741# $1 = compiler to test (CC or CXX)
3742# $2 = human readable name of compiler (C or C++)
3743
3744
3745
3746
3747
3748# $1 = compiler to test (CC or CXX)
3749# $2 = human readable name of compiler (C or C++)
3750# $3 = list of compiler names to search for
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3765#                                   [RUN-IF-FALSE])
3766# ------------------------------------------------------------
3767# Check that the c and c++ compilers support an argument
3768
3769
3770
3771
3772# Setup the JTREG paths
3773
3774
3775#
3776# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3777# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3778#
3779# This code is free software; you can redistribute it and/or modify it
3780# under the terms of the GNU General Public License version 2 only, as
3781# published by the Free Software Foundation.  Oracle designates this
3782# particular file as subject to the "Classpath" exception as provided
3783# by Oracle in the LICENSE file that accompanied this code.
3784#
3785# This code is distributed in the hope that it will be useful, but WITHOUT
3786# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3787# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3788# version 2 for more details (a copy is included in the LICENSE file that
3789# accompanied this code).
3790#
3791# You should have received a copy of the GNU General Public License version
3792# 2 along with this work; if not, write to the Free Software Foundation,
3793# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3794#
3795# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3796# or visit www.oracle.com if you need additional information or have any
3797# questions.
3798#
3799
3800
3801
3802
3803
3804
3805
3806# Check if the VS env variables were setup prior to running configure.
3807# If not, then find vcvarsall.bat and run it automatically, and integrate
3808# the set env variables into the spec file.
3809
3810
3811
3812
3813
3814
3815# This line needs to be here, verbatim, after all includes and the dummy hook
3816# definitions. It is replaced with custom functionality when building
3817# custom sources.
3818#CUSTOM_AUTOCONF_INCLUDE
3819
3820# Do not change or remove the following line, it is needed for consistency checks:
3821DATE_WHEN_GENERATED=1380792206
3822
3823###############################################################################
3824#
3825# Initialization / Boot-strapping
3826#
3827# The bootstrapping process needs to solve the "chicken or the egg" problem,
3828# thus it jumps back and forth, each time gaining something needed later on.
3829#
3830###############################################################################
3831
3832# Basic initialization that must happen first of all
3833
3834# Save the original command line. This is passed to us by the wrapper configure script.
3835
3836DATE_WHEN_CONFIGURED=`LANG=C date`
3837
3838{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3839$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3840{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3841$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3842
3843
3844
3845# Start with tools that do not need have cross compilation support
3846# and can be expected to be found in the default PATH. These tools are
3847# used by configure. Nor are these tools expected to be found in the
3848# devkit from the builddeps server either, since they are
3849# needed to download the devkit.
3850
3851# First are all the simple required tools.
3852
3853    for ac_prog in basename
3854do
3855  # Extract the first word of "$ac_prog", so it can be a program name with args.
3856set dummy $ac_prog; ac_word=$2
3857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3858$as_echo_n "checking for $ac_word... " >&6; }
3859if ${ac_cv_path_BASENAME+:} false; then :
3860  $as_echo_n "(cached) " >&6
3861else
3862  case $BASENAME in
3863  [\\/]* | ?:[\\/]*)
3864  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3865  ;;
3866  *)
3867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868for as_dir in $PATH
3869do
3870  IFS=$as_save_IFS
3871  test -z "$as_dir" && as_dir=.
3872    for ac_exec_ext in '' $ac_executable_extensions; do
3873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3874    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3876    break 2
3877  fi
3878done
3879  done
3880IFS=$as_save_IFS
3881
3882  ;;
3883esac
3884fi
3885BASENAME=$ac_cv_path_BASENAME
3886if test -n "$BASENAME"; then
3887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3888$as_echo "$BASENAME" >&6; }
3889else
3890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3891$as_echo "no" >&6; }
3892fi
3893
3894
3895  test -n "$BASENAME" && break
3896done
3897
3898
3899    if test "x$BASENAME" = x; then
3900        if test "xbasename" = x; then
3901          PROG_NAME=basename
3902        else
3903          PROG_NAME=basename
3904        fi
3905        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3906$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3907        as_fn_error $? "Cannot continue" "$LINENO" 5
3908    fi
3909
3910
3911
3912    for ac_prog in bash
3913do
3914  # Extract the first word of "$ac_prog", so it can be a program name with args.
3915set dummy $ac_prog; ac_word=$2
3916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3917$as_echo_n "checking for $ac_word... " >&6; }
3918if ${ac_cv_path_BASH+:} false; then :
3919  $as_echo_n "(cached) " >&6
3920else
3921  case $BASH in
3922  [\\/]* | ?:[\\/]*)
3923  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3924  ;;
3925  *)
3926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927for as_dir in $PATH
3928do
3929  IFS=$as_save_IFS
3930  test -z "$as_dir" && as_dir=.
3931    for ac_exec_ext in '' $ac_executable_extensions; do
3932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935    break 2
3936  fi
3937done
3938  done
3939IFS=$as_save_IFS
3940
3941  ;;
3942esac
3943fi
3944BASH=$ac_cv_path_BASH
3945if test -n "$BASH"; then
3946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3947$as_echo "$BASH" >&6; }
3948else
3949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3950$as_echo "no" >&6; }
3951fi
3952
3953
3954  test -n "$BASH" && break
3955done
3956
3957
3958    if test "x$BASH" = x; then
3959        if test "xbash" = x; then
3960          PROG_NAME=bash
3961        else
3962          PROG_NAME=bash
3963        fi
3964        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3965$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3966        as_fn_error $? "Cannot continue" "$LINENO" 5
3967    fi
3968
3969
3970
3971    for ac_prog in cat
3972do
3973  # Extract the first word of "$ac_prog", so it can be a program name with args.
3974set dummy $ac_prog; ac_word=$2
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3976$as_echo_n "checking for $ac_word... " >&6; }
3977if ${ac_cv_path_CAT+:} false; then :
3978  $as_echo_n "(cached) " >&6
3979else
3980  case $CAT in
3981  [\\/]* | ?:[\\/]*)
3982  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3983  ;;
3984  *)
3985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3986for as_dir in $PATH
3987do
3988  IFS=$as_save_IFS
3989  test -z "$as_dir" && as_dir=.
3990    for ac_exec_ext in '' $ac_executable_extensions; do
3991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3992    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3994    break 2
3995  fi
3996done
3997  done
3998IFS=$as_save_IFS
3999
4000  ;;
4001esac
4002fi
4003CAT=$ac_cv_path_CAT
4004if test -n "$CAT"; then
4005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4006$as_echo "$CAT" >&6; }
4007else
4008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009$as_echo "no" >&6; }
4010fi
4011
4012
4013  test -n "$CAT" && break
4014done
4015
4016
4017    if test "x$CAT" = x; then
4018        if test "xcat" = x; then
4019          PROG_NAME=cat
4020        else
4021          PROG_NAME=cat
4022        fi
4023        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4024$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4025        as_fn_error $? "Cannot continue" "$LINENO" 5
4026    fi
4027
4028
4029
4030    for ac_prog in chmod
4031do
4032  # Extract the first word of "$ac_prog", so it can be a program name with args.
4033set dummy $ac_prog; ac_word=$2
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4035$as_echo_n "checking for $ac_word... " >&6; }
4036if ${ac_cv_path_CHMOD+:} false; then :
4037  $as_echo_n "(cached) " >&6
4038else
4039  case $CHMOD in
4040  [\\/]* | ?:[\\/]*)
4041  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4042  ;;
4043  *)
4044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4045for as_dir in $PATH
4046do
4047  IFS=$as_save_IFS
4048  test -z "$as_dir" && as_dir=.
4049    for ac_exec_ext in '' $ac_executable_extensions; do
4050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4051    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4053    break 2
4054  fi
4055done
4056  done
4057IFS=$as_save_IFS
4058
4059  ;;
4060esac
4061fi
4062CHMOD=$ac_cv_path_CHMOD
4063if test -n "$CHMOD"; then
4064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4065$as_echo "$CHMOD" >&6; }
4066else
4067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4068$as_echo "no" >&6; }
4069fi
4070
4071
4072  test -n "$CHMOD" && break
4073done
4074
4075
4076    if test "x$CHMOD" = x; then
4077        if test "xchmod" = x; then
4078          PROG_NAME=chmod
4079        else
4080          PROG_NAME=chmod
4081        fi
4082        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4083$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4084        as_fn_error $? "Cannot continue" "$LINENO" 5
4085    fi
4086
4087
4088
4089    for ac_prog in cmp
4090do
4091  # Extract the first word of "$ac_prog", so it can be a program name with args.
4092set dummy $ac_prog; ac_word=$2
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4094$as_echo_n "checking for $ac_word... " >&6; }
4095if ${ac_cv_path_CMP+:} false; then :
4096  $as_echo_n "(cached) " >&6
4097else
4098  case $CMP in
4099  [\\/]* | ?:[\\/]*)
4100  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4101  ;;
4102  *)
4103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104for as_dir in $PATH
4105do
4106  IFS=$as_save_IFS
4107  test -z "$as_dir" && as_dir=.
4108    for ac_exec_ext in '' $ac_executable_extensions; do
4109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4110    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4112    break 2
4113  fi
4114done
4115  done
4116IFS=$as_save_IFS
4117
4118  ;;
4119esac
4120fi
4121CMP=$ac_cv_path_CMP
4122if test -n "$CMP"; then
4123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4124$as_echo "$CMP" >&6; }
4125else
4126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
4128fi
4129
4130
4131  test -n "$CMP" && break
4132done
4133
4134
4135    if test "x$CMP" = x; then
4136        if test "xcmp" = x; then
4137          PROG_NAME=cmp
4138        else
4139          PROG_NAME=cmp
4140        fi
4141        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4142$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4143        as_fn_error $? "Cannot continue" "$LINENO" 5
4144    fi
4145
4146
4147
4148    for ac_prog in comm
4149do
4150  # Extract the first word of "$ac_prog", so it can be a program name with args.
4151set dummy $ac_prog; ac_word=$2
4152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4153$as_echo_n "checking for $ac_word... " >&6; }
4154if ${ac_cv_path_COMM+:} false; then :
4155  $as_echo_n "(cached) " >&6
4156else
4157  case $COMM in
4158  [\\/]* | ?:[\\/]*)
4159  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4160  ;;
4161  *)
4162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163for as_dir in $PATH
4164do
4165  IFS=$as_save_IFS
4166  test -z "$as_dir" && as_dir=.
4167    for ac_exec_ext in '' $ac_executable_extensions; do
4168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171    break 2
4172  fi
4173done
4174  done
4175IFS=$as_save_IFS
4176
4177  ;;
4178esac
4179fi
4180COMM=$ac_cv_path_COMM
4181if test -n "$COMM"; then
4182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4183$as_echo "$COMM" >&6; }
4184else
4185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4186$as_echo "no" >&6; }
4187fi
4188
4189
4190  test -n "$COMM" && break
4191done
4192
4193
4194    if test "x$COMM" = x; then
4195        if test "xcomm" = x; then
4196          PROG_NAME=comm
4197        else
4198          PROG_NAME=comm
4199        fi
4200        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4201$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4202        as_fn_error $? "Cannot continue" "$LINENO" 5
4203    fi
4204
4205
4206
4207    for ac_prog in cp
4208do
4209  # Extract the first word of "$ac_prog", so it can be a program name with args.
4210set dummy $ac_prog; ac_word=$2
4211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4212$as_echo_n "checking for $ac_word... " >&6; }
4213if ${ac_cv_path_CP+:} false; then :
4214  $as_echo_n "(cached) " >&6
4215else
4216  case $CP in
4217  [\\/]* | ?:[\\/]*)
4218  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4219  ;;
4220  *)
4221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222for as_dir in $PATH
4223do
4224  IFS=$as_save_IFS
4225  test -z "$as_dir" && as_dir=.
4226    for ac_exec_ext in '' $ac_executable_extensions; do
4227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4228    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4230    break 2
4231  fi
4232done
4233  done
4234IFS=$as_save_IFS
4235
4236  ;;
4237esac
4238fi
4239CP=$ac_cv_path_CP
4240if test -n "$CP"; then
4241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4242$as_echo "$CP" >&6; }
4243else
4244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4245$as_echo "no" >&6; }
4246fi
4247
4248
4249  test -n "$CP" && break
4250done
4251
4252
4253    if test "x$CP" = x; then
4254        if test "xcp" = x; then
4255          PROG_NAME=cp
4256        else
4257          PROG_NAME=cp
4258        fi
4259        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4260$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4261        as_fn_error $? "Cannot continue" "$LINENO" 5
4262    fi
4263
4264
4265
4266    for ac_prog in cpio
4267do
4268  # Extract the first word of "$ac_prog", so it can be a program name with args.
4269set dummy $ac_prog; ac_word=$2
4270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4271$as_echo_n "checking for $ac_word... " >&6; }
4272if ${ac_cv_path_CPIO+:} false; then :
4273  $as_echo_n "(cached) " >&6
4274else
4275  case $CPIO in
4276  [\\/]* | ?:[\\/]*)
4277  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4278  ;;
4279  *)
4280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4281for as_dir in $PATH
4282do
4283  IFS=$as_save_IFS
4284  test -z "$as_dir" && as_dir=.
4285    for ac_exec_ext in '' $ac_executable_extensions; do
4286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4287    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4289    break 2
4290  fi
4291done
4292  done
4293IFS=$as_save_IFS
4294
4295  ;;
4296esac
4297fi
4298CPIO=$ac_cv_path_CPIO
4299if test -n "$CPIO"; then
4300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4301$as_echo "$CPIO" >&6; }
4302else
4303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4304$as_echo "no" >&6; }
4305fi
4306
4307
4308  test -n "$CPIO" && break
4309done
4310
4311
4312    if test "x$CPIO" = x; then
4313        if test "xcpio" = x; then
4314          PROG_NAME=cpio
4315        else
4316          PROG_NAME=cpio
4317        fi
4318        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4319$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4320        as_fn_error $? "Cannot continue" "$LINENO" 5
4321    fi
4322
4323
4324
4325    for ac_prog in cut
4326do
4327  # Extract the first word of "$ac_prog", so it can be a program name with args.
4328set dummy $ac_prog; ac_word=$2
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4330$as_echo_n "checking for $ac_word... " >&6; }
4331if ${ac_cv_path_CUT+:} false; then :
4332  $as_echo_n "(cached) " >&6
4333else
4334  case $CUT in
4335  [\\/]* | ?:[\\/]*)
4336  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4337  ;;
4338  *)
4339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4340for as_dir in $PATH
4341do
4342  IFS=$as_save_IFS
4343  test -z "$as_dir" && as_dir=.
4344    for ac_exec_ext in '' $ac_executable_extensions; do
4345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4346    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4348    break 2
4349  fi
4350done
4351  done
4352IFS=$as_save_IFS
4353
4354  ;;
4355esac
4356fi
4357CUT=$ac_cv_path_CUT
4358if test -n "$CUT"; then
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4360$as_echo "$CUT" >&6; }
4361else
4362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4363$as_echo "no" >&6; }
4364fi
4365
4366
4367  test -n "$CUT" && break
4368done
4369
4370
4371    if test "x$CUT" = x; then
4372        if test "xcut" = x; then
4373          PROG_NAME=cut
4374        else
4375          PROG_NAME=cut
4376        fi
4377        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4378$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4379        as_fn_error $? "Cannot continue" "$LINENO" 5
4380    fi
4381
4382
4383
4384    for ac_prog in date
4385do
4386  # Extract the first word of "$ac_prog", so it can be a program name with args.
4387set dummy $ac_prog; ac_word=$2
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389$as_echo_n "checking for $ac_word... " >&6; }
4390if ${ac_cv_path_DATE+:} false; then :
4391  $as_echo_n "(cached) " >&6
4392else
4393  case $DATE in
4394  [\\/]* | ?:[\\/]*)
4395  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4396  ;;
4397  *)
4398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399for as_dir in $PATH
4400do
4401  IFS=$as_save_IFS
4402  test -z "$as_dir" && as_dir=.
4403    for ac_exec_ext in '' $ac_executable_extensions; do
4404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4405    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4407    break 2
4408  fi
4409done
4410  done
4411IFS=$as_save_IFS
4412
4413  ;;
4414esac
4415fi
4416DATE=$ac_cv_path_DATE
4417if test -n "$DATE"; then
4418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4419$as_echo "$DATE" >&6; }
4420else
4421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422$as_echo "no" >&6; }
4423fi
4424
4425
4426  test -n "$DATE" && break
4427done
4428
4429
4430    if test "x$DATE" = x; then
4431        if test "xdate" = x; then
4432          PROG_NAME=date
4433        else
4434          PROG_NAME=date
4435        fi
4436        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4437$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4438        as_fn_error $? "Cannot continue" "$LINENO" 5
4439    fi
4440
4441
4442
4443    for ac_prog in gdiff diff
4444do
4445  # Extract the first word of "$ac_prog", so it can be a program name with args.
4446set dummy $ac_prog; ac_word=$2
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448$as_echo_n "checking for $ac_word... " >&6; }
4449if ${ac_cv_path_DIFF+:} false; then :
4450  $as_echo_n "(cached) " >&6
4451else
4452  case $DIFF in
4453  [\\/]* | ?:[\\/]*)
4454  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4455  ;;
4456  *)
4457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458for as_dir in $PATH
4459do
4460  IFS=$as_save_IFS
4461  test -z "$as_dir" && as_dir=.
4462    for ac_exec_ext in '' $ac_executable_extensions; do
4463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4464    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4466    break 2
4467  fi
4468done
4469  done
4470IFS=$as_save_IFS
4471
4472  ;;
4473esac
4474fi
4475DIFF=$ac_cv_path_DIFF
4476if test -n "$DIFF"; then
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4478$as_echo "$DIFF" >&6; }
4479else
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481$as_echo "no" >&6; }
4482fi
4483
4484
4485  test -n "$DIFF" && break
4486done
4487
4488
4489    if test "x$DIFF" = x; then
4490        if test "xgdiff diff" = x; then
4491          PROG_NAME=diff
4492        else
4493          PROG_NAME=gdiff diff
4494        fi
4495        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4496$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4497        as_fn_error $? "Cannot continue" "$LINENO" 5
4498    fi
4499
4500
4501
4502    for ac_prog in dirname
4503do
4504  # Extract the first word of "$ac_prog", so it can be a program name with args.
4505set dummy $ac_prog; ac_word=$2
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4507$as_echo_n "checking for $ac_word... " >&6; }
4508if ${ac_cv_path_DIRNAME+:} false; then :
4509  $as_echo_n "(cached) " >&6
4510else
4511  case $DIRNAME in
4512  [\\/]* | ?:[\\/]*)
4513  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4514  ;;
4515  *)
4516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517for as_dir in $PATH
4518do
4519  IFS=$as_save_IFS
4520  test -z "$as_dir" && as_dir=.
4521    for ac_exec_ext in '' $ac_executable_extensions; do
4522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4525    break 2
4526  fi
4527done
4528  done
4529IFS=$as_save_IFS
4530
4531  ;;
4532esac
4533fi
4534DIRNAME=$ac_cv_path_DIRNAME
4535if test -n "$DIRNAME"; then
4536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4537$as_echo "$DIRNAME" >&6; }
4538else
4539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540$as_echo "no" >&6; }
4541fi
4542
4543
4544  test -n "$DIRNAME" && break
4545done
4546
4547
4548    if test "x$DIRNAME" = x; then
4549        if test "xdirname" = x; then
4550          PROG_NAME=dirname
4551        else
4552          PROG_NAME=dirname
4553        fi
4554        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4555$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4556        as_fn_error $? "Cannot continue" "$LINENO" 5
4557    fi
4558
4559
4560
4561    for ac_prog in echo
4562do
4563  # Extract the first word of "$ac_prog", so it can be a program name with args.
4564set dummy $ac_prog; ac_word=$2
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4566$as_echo_n "checking for $ac_word... " >&6; }
4567if ${ac_cv_path_ECHO+:} false; then :
4568  $as_echo_n "(cached) " >&6
4569else
4570  case $ECHO in
4571  [\\/]* | ?:[\\/]*)
4572  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4573  ;;
4574  *)
4575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4576for as_dir in $PATH
4577do
4578  IFS=$as_save_IFS
4579  test -z "$as_dir" && as_dir=.
4580    for ac_exec_ext in '' $ac_executable_extensions; do
4581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4582    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4584    break 2
4585  fi
4586done
4587  done
4588IFS=$as_save_IFS
4589
4590  ;;
4591esac
4592fi
4593ECHO=$ac_cv_path_ECHO
4594if test -n "$ECHO"; then
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4596$as_echo "$ECHO" >&6; }
4597else
4598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599$as_echo "no" >&6; }
4600fi
4601
4602
4603  test -n "$ECHO" && break
4604done
4605
4606
4607    if test "x$ECHO" = x; then
4608        if test "xecho" = x; then
4609          PROG_NAME=echo
4610        else
4611          PROG_NAME=echo
4612        fi
4613        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4614$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4615        as_fn_error $? "Cannot continue" "$LINENO" 5
4616    fi
4617
4618
4619
4620    for ac_prog in expr
4621do
4622  # Extract the first word of "$ac_prog", so it can be a program name with args.
4623set dummy $ac_prog; ac_word=$2
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_EXPR+:} false; then :
4627  $as_echo_n "(cached) " >&6
4628else
4629  case $EXPR in
4630  [\\/]* | ?:[\\/]*)
4631  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4632  ;;
4633  *)
4634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in $PATH
4636do
4637  IFS=$as_save_IFS
4638  test -z "$as_dir" && as_dir=.
4639    for ac_exec_ext in '' $ac_executable_extensions; do
4640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643    break 2
4644  fi
4645done
4646  done
4647IFS=$as_save_IFS
4648
4649  ;;
4650esac
4651fi
4652EXPR=$ac_cv_path_EXPR
4653if test -n "$EXPR"; then
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4655$as_echo "$EXPR" >&6; }
4656else
4657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
4661
4662  test -n "$EXPR" && break
4663done
4664
4665
4666    if test "x$EXPR" = x; then
4667        if test "xexpr" = x; then
4668          PROG_NAME=expr
4669        else
4670          PROG_NAME=expr
4671        fi
4672        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4673$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4674        as_fn_error $? "Cannot continue" "$LINENO" 5
4675    fi
4676
4677
4678
4679    for ac_prog in file
4680do
4681  # Extract the first word of "$ac_prog", so it can be a program name with args.
4682set dummy $ac_prog; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_FILE+:} false; then :
4686  $as_echo_n "(cached) " >&6
4687else
4688  case $FILE in
4689  [\\/]* | ?:[\\/]*)
4690  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4691  ;;
4692  *)
4693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in $PATH
4695do
4696  IFS=$as_save_IFS
4697  test -z "$as_dir" && as_dir=.
4698    for ac_exec_ext in '' $ac_executable_extensions; do
4699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702    break 2
4703  fi
4704done
4705  done
4706IFS=$as_save_IFS
4707
4708  ;;
4709esac
4710fi
4711FILE=$ac_cv_path_FILE
4712if test -n "$FILE"; then
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4714$as_echo "$FILE" >&6; }
4715else
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721  test -n "$FILE" && break
4722done
4723
4724
4725    if test "x$FILE" = x; then
4726        if test "xfile" = x; then
4727          PROG_NAME=file
4728        else
4729          PROG_NAME=file
4730        fi
4731        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4732$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4733        as_fn_error $? "Cannot continue" "$LINENO" 5
4734    fi
4735
4736
4737
4738    for ac_prog in find
4739do
4740  # Extract the first word of "$ac_prog", so it can be a program name with args.
4741set dummy $ac_prog; ac_word=$2
4742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743$as_echo_n "checking for $ac_word... " >&6; }
4744if ${ac_cv_path_FIND+:} false; then :
4745  $as_echo_n "(cached) " >&6
4746else
4747  case $FIND in
4748  [\\/]* | ?:[\\/]*)
4749  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4750  ;;
4751  *)
4752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753for as_dir in $PATH
4754do
4755  IFS=$as_save_IFS
4756  test -z "$as_dir" && as_dir=.
4757    for ac_exec_ext in '' $ac_executable_extensions; do
4758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4759    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4761    break 2
4762  fi
4763done
4764  done
4765IFS=$as_save_IFS
4766
4767  ;;
4768esac
4769fi
4770FIND=$ac_cv_path_FIND
4771if test -n "$FIND"; then
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4773$as_echo "$FIND" >&6; }
4774else
4775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776$as_echo "no" >&6; }
4777fi
4778
4779
4780  test -n "$FIND" && break
4781done
4782
4783
4784    if test "x$FIND" = x; then
4785        if test "xfind" = x; then
4786          PROG_NAME=find
4787        else
4788          PROG_NAME=find
4789        fi
4790        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4791$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4792        as_fn_error $? "Cannot continue" "$LINENO" 5
4793    fi
4794
4795
4796
4797    for ac_prog in head
4798do
4799  # Extract the first word of "$ac_prog", so it can be a program name with args.
4800set dummy $ac_prog; ac_word=$2
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802$as_echo_n "checking for $ac_word... " >&6; }
4803if ${ac_cv_path_HEAD+:} false; then :
4804  $as_echo_n "(cached) " >&6
4805else
4806  case $HEAD in
4807  [\\/]* | ?:[\\/]*)
4808  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4809  ;;
4810  *)
4811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812for as_dir in $PATH
4813do
4814  IFS=$as_save_IFS
4815  test -z "$as_dir" && as_dir=.
4816    for ac_exec_ext in '' $ac_executable_extensions; do
4817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4818    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4820    break 2
4821  fi
4822done
4823  done
4824IFS=$as_save_IFS
4825
4826  ;;
4827esac
4828fi
4829HEAD=$ac_cv_path_HEAD
4830if test -n "$HEAD"; then
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4832$as_echo "$HEAD" >&6; }
4833else
4834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835$as_echo "no" >&6; }
4836fi
4837
4838
4839  test -n "$HEAD" && break
4840done
4841
4842
4843    if test "x$HEAD" = x; then
4844        if test "xhead" = x; then
4845          PROG_NAME=head
4846        else
4847          PROG_NAME=head
4848        fi
4849        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4850$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4851        as_fn_error $? "Cannot continue" "$LINENO" 5
4852    fi
4853
4854
4855
4856    for ac_prog in ln
4857do
4858  # Extract the first word of "$ac_prog", so it can be a program name with args.
4859set dummy $ac_prog; ac_word=$2
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4861$as_echo_n "checking for $ac_word... " >&6; }
4862if ${ac_cv_path_LN+:} false; then :
4863  $as_echo_n "(cached) " >&6
4864else
4865  case $LN in
4866  [\\/]* | ?:[\\/]*)
4867  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4868  ;;
4869  *)
4870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871for as_dir in $PATH
4872do
4873  IFS=$as_save_IFS
4874  test -z "$as_dir" && as_dir=.
4875    for ac_exec_ext in '' $ac_executable_extensions; do
4876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4877    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879    break 2
4880  fi
4881done
4882  done
4883IFS=$as_save_IFS
4884
4885  ;;
4886esac
4887fi
4888LN=$ac_cv_path_LN
4889if test -n "$LN"; then
4890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4891$as_echo "$LN" >&6; }
4892else
4893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894$as_echo "no" >&6; }
4895fi
4896
4897
4898  test -n "$LN" && break
4899done
4900
4901
4902    if test "x$LN" = x; then
4903        if test "xln" = x; then
4904          PROG_NAME=ln
4905        else
4906          PROG_NAME=ln
4907        fi
4908        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4909$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4910        as_fn_error $? "Cannot continue" "$LINENO" 5
4911    fi
4912
4913
4914
4915    for ac_prog in ls
4916do
4917  # Extract the first word of "$ac_prog", so it can be a program name with args.
4918set dummy $ac_prog; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_LS+:} false; then :
4922  $as_echo_n "(cached) " >&6
4923else
4924  case $LS in
4925  [\\/]* | ?:[\\/]*)
4926  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4927  ;;
4928  *)
4929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in $PATH
4931do
4932  IFS=$as_save_IFS
4933  test -z "$as_dir" && as_dir=.
4934    for ac_exec_ext in '' $ac_executable_extensions; do
4935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938    break 2
4939  fi
4940done
4941  done
4942IFS=$as_save_IFS
4943
4944  ;;
4945esac
4946fi
4947LS=$ac_cv_path_LS
4948if test -n "$LS"; then
4949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4950$as_echo "$LS" >&6; }
4951else
4952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956
4957  test -n "$LS" && break
4958done
4959
4960
4961    if test "x$LS" = x; then
4962        if test "xls" = x; then
4963          PROG_NAME=ls
4964        else
4965          PROG_NAME=ls
4966        fi
4967        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4968$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4969        as_fn_error $? "Cannot continue" "$LINENO" 5
4970    fi
4971
4972
4973
4974    for ac_prog in mkdir
4975do
4976  # Extract the first word of "$ac_prog", so it can be a program name with args.
4977set dummy $ac_prog; ac_word=$2
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
4980if ${ac_cv_path_MKDIR+:} false; then :
4981  $as_echo_n "(cached) " >&6
4982else
4983  case $MKDIR in
4984  [\\/]* | ?:[\\/]*)
4985  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4986  ;;
4987  *)
4988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in $PATH
4990do
4991  IFS=$as_save_IFS
4992  test -z "$as_dir" && as_dir=.
4993    for ac_exec_ext in '' $ac_executable_extensions; do
4994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997    break 2
4998  fi
4999done
5000  done
5001IFS=$as_save_IFS
5002
5003  ;;
5004esac
5005fi
5006MKDIR=$ac_cv_path_MKDIR
5007if test -n "$MKDIR"; then
5008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5009$as_echo "$MKDIR" >&6; }
5010else
5011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012$as_echo "no" >&6; }
5013fi
5014
5015
5016  test -n "$MKDIR" && break
5017done
5018
5019
5020    if test "x$MKDIR" = x; then
5021        if test "xmkdir" = x; then
5022          PROG_NAME=mkdir
5023        else
5024          PROG_NAME=mkdir
5025        fi
5026        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5027$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5028        as_fn_error $? "Cannot continue" "$LINENO" 5
5029    fi
5030
5031
5032
5033    for ac_prog in mktemp
5034do
5035  # Extract the first word of "$ac_prog", so it can be a program name with args.
5036set dummy $ac_prog; ac_word=$2
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_MKTEMP+:} false; then :
5040  $as_echo_n "(cached) " >&6
5041else
5042  case $MKTEMP in
5043  [\\/]* | ?:[\\/]*)
5044  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5045  ;;
5046  *)
5047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in $PATH
5049do
5050  IFS=$as_save_IFS
5051  test -z "$as_dir" && as_dir=.
5052    for ac_exec_ext in '' $ac_executable_extensions; do
5053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056    break 2
5057  fi
5058done
5059  done
5060IFS=$as_save_IFS
5061
5062  ;;
5063esac
5064fi
5065MKTEMP=$ac_cv_path_MKTEMP
5066if test -n "$MKTEMP"; then
5067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5068$as_echo "$MKTEMP" >&6; }
5069else
5070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
5072fi
5073
5074
5075  test -n "$MKTEMP" && break
5076done
5077
5078
5079    if test "x$MKTEMP" = x; then
5080        if test "xmktemp" = x; then
5081          PROG_NAME=mktemp
5082        else
5083          PROG_NAME=mktemp
5084        fi
5085        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5086$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5087        as_fn_error $? "Cannot continue" "$LINENO" 5
5088    fi
5089
5090
5091
5092    for ac_prog in mv
5093do
5094  # Extract the first word of "$ac_prog", so it can be a program name with args.
5095set dummy $ac_prog; ac_word=$2
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097$as_echo_n "checking for $ac_word... " >&6; }
5098if ${ac_cv_path_MV+:} false; then :
5099  $as_echo_n "(cached) " >&6
5100else
5101  case $MV in
5102  [\\/]* | ?:[\\/]*)
5103  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5104  ;;
5105  *)
5106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
5109  IFS=$as_save_IFS
5110  test -z "$as_dir" && as_dir=.
5111    for ac_exec_ext in '' $ac_executable_extensions; do
5112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115    break 2
5116  fi
5117done
5118  done
5119IFS=$as_save_IFS
5120
5121  ;;
5122esac
5123fi
5124MV=$ac_cv_path_MV
5125if test -n "$MV"; then
5126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5127$as_echo "$MV" >&6; }
5128else
5129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
5131fi
5132
5133
5134  test -n "$MV" && break
5135done
5136
5137
5138    if test "x$MV" = x; then
5139        if test "xmv" = x; then
5140          PROG_NAME=mv
5141        else
5142          PROG_NAME=mv
5143        fi
5144        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5145$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5146        as_fn_error $? "Cannot continue" "$LINENO" 5
5147    fi
5148
5149
5150
5151    for ac_prog in printf
5152do
5153  # Extract the first word of "$ac_prog", so it can be a program name with args.
5154set dummy $ac_prog; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_path_PRINTF+:} false; then :
5158  $as_echo_n "(cached) " >&6
5159else
5160  case $PRINTF in
5161  [\\/]* | ?:[\\/]*)
5162  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5163  ;;
5164  *)
5165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168  IFS=$as_save_IFS
5169  test -z "$as_dir" && as_dir=.
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180  ;;
5181esac
5182fi
5183PRINTF=$ac_cv_path_PRINTF
5184if test -n "$PRINTF"; then
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5186$as_echo "$PRINTF" >&6; }
5187else
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190fi
5191
5192
5193  test -n "$PRINTF" && break
5194done
5195
5196
5197    if test "x$PRINTF" = x; then
5198        if test "xprintf" = x; then
5199          PROG_NAME=printf
5200        else
5201          PROG_NAME=printf
5202        fi
5203        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5204$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5205        as_fn_error $? "Cannot continue" "$LINENO" 5
5206    fi
5207
5208
5209
5210    for ac_prog in rm
5211do
5212  # Extract the first word of "$ac_prog", so it can be a program name with args.
5213set dummy $ac_prog; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
5216if ${ac_cv_path_RM+:} false; then :
5217  $as_echo_n "(cached) " >&6
5218else
5219  case $RM in
5220  [\\/]* | ?:[\\/]*)
5221  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5222  ;;
5223  *)
5224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in $PATH
5226do
5227  IFS=$as_save_IFS
5228  test -z "$as_dir" && as_dir=.
5229    for ac_exec_ext in '' $ac_executable_extensions; do
5230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5231    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5233    break 2
5234  fi
5235done
5236  done
5237IFS=$as_save_IFS
5238
5239  ;;
5240esac
5241fi
5242RM=$ac_cv_path_RM
5243if test -n "$RM"; then
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5245$as_echo "$RM" >&6; }
5246else
5247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5248$as_echo "no" >&6; }
5249fi
5250
5251
5252  test -n "$RM" && break
5253done
5254
5255
5256    if test "x$RM" = x; then
5257        if test "xrm" = x; then
5258          PROG_NAME=rm
5259        else
5260          PROG_NAME=rm
5261        fi
5262        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5263$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5264        as_fn_error $? "Cannot continue" "$LINENO" 5
5265    fi
5266
5267
5268
5269    for ac_prog in sh
5270do
5271  # Extract the first word of "$ac_prog", so it can be a program name with args.
5272set dummy $ac_prog; ac_word=$2
5273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274$as_echo_n "checking for $ac_word... " >&6; }
5275if ${ac_cv_path_SH+:} false; then :
5276  $as_echo_n "(cached) " >&6
5277else
5278  case $SH in
5279  [\\/]* | ?:[\\/]*)
5280  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5281  ;;
5282  *)
5283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284for as_dir in $PATH
5285do
5286  IFS=$as_save_IFS
5287  test -z "$as_dir" && as_dir=.
5288    for ac_exec_ext in '' $ac_executable_extensions; do
5289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292    break 2
5293  fi
5294done
5295  done
5296IFS=$as_save_IFS
5297
5298  ;;
5299esac
5300fi
5301SH=$ac_cv_path_SH
5302if test -n "$SH"; then
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5304$as_echo "$SH" >&6; }
5305else
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
5308fi
5309
5310
5311  test -n "$SH" && break
5312done
5313
5314
5315    if test "x$SH" = x; then
5316        if test "xsh" = x; then
5317          PROG_NAME=sh
5318        else
5319          PROG_NAME=sh
5320        fi
5321        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5322$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5323        as_fn_error $? "Cannot continue" "$LINENO" 5
5324    fi
5325
5326
5327
5328    for ac_prog in sort
5329do
5330  # Extract the first word of "$ac_prog", so it can be a program name with args.
5331set dummy $ac_prog; ac_word=$2
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333$as_echo_n "checking for $ac_word... " >&6; }
5334if ${ac_cv_path_SORT+:} false; then :
5335  $as_echo_n "(cached) " >&6
5336else
5337  case $SORT in
5338  [\\/]* | ?:[\\/]*)
5339  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5340  ;;
5341  *)
5342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343for as_dir in $PATH
5344do
5345  IFS=$as_save_IFS
5346  test -z "$as_dir" && as_dir=.
5347    for ac_exec_ext in '' $ac_executable_extensions; do
5348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351    break 2
5352  fi
5353done
5354  done
5355IFS=$as_save_IFS
5356
5357  ;;
5358esac
5359fi
5360SORT=$ac_cv_path_SORT
5361if test -n "$SORT"; then
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5363$as_echo "$SORT" >&6; }
5364else
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366$as_echo "no" >&6; }
5367fi
5368
5369
5370  test -n "$SORT" && break
5371done
5372
5373
5374    if test "x$SORT" = x; then
5375        if test "xsort" = x; then
5376          PROG_NAME=sort
5377        else
5378          PROG_NAME=sort
5379        fi
5380        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5381$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5382        as_fn_error $? "Cannot continue" "$LINENO" 5
5383    fi
5384
5385
5386
5387    for ac_prog in tail
5388do
5389  # Extract the first word of "$ac_prog", so it can be a program name with args.
5390set dummy $ac_prog; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if ${ac_cv_path_TAIL+:} false; then :
5394  $as_echo_n "(cached) " >&6
5395else
5396  case $TAIL in
5397  [\\/]* | ?:[\\/]*)
5398  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5399  ;;
5400  *)
5401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402for as_dir in $PATH
5403do
5404  IFS=$as_save_IFS
5405  test -z "$as_dir" && as_dir=.
5406    for ac_exec_ext in '' $ac_executable_extensions; do
5407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410    break 2
5411  fi
5412done
5413  done
5414IFS=$as_save_IFS
5415
5416  ;;
5417esac
5418fi
5419TAIL=$ac_cv_path_TAIL
5420if test -n "$TAIL"; then
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5422$as_echo "$TAIL" >&6; }
5423else
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425$as_echo "no" >&6; }
5426fi
5427
5428
5429  test -n "$TAIL" && break
5430done
5431
5432
5433    if test "x$TAIL" = x; then
5434        if test "xtail" = x; then
5435          PROG_NAME=tail
5436        else
5437          PROG_NAME=tail
5438        fi
5439        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5440$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5441        as_fn_error $? "Cannot continue" "$LINENO" 5
5442    fi
5443
5444
5445
5446    for ac_prog in tar
5447do
5448  # Extract the first word of "$ac_prog", so it can be a program name with args.
5449set dummy $ac_prog; ac_word=$2
5450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5451$as_echo_n "checking for $ac_word... " >&6; }
5452if ${ac_cv_path_TAR+:} false; then :
5453  $as_echo_n "(cached) " >&6
5454else
5455  case $TAR in
5456  [\\/]* | ?:[\\/]*)
5457  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5458  ;;
5459  *)
5460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5461for as_dir in $PATH
5462do
5463  IFS=$as_save_IFS
5464  test -z "$as_dir" && as_dir=.
5465    for ac_exec_ext in '' $ac_executable_extensions; do
5466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5467    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5469    break 2
5470  fi
5471done
5472  done
5473IFS=$as_save_IFS
5474
5475  ;;
5476esac
5477fi
5478TAR=$ac_cv_path_TAR
5479if test -n "$TAR"; then
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5481$as_echo "$TAR" >&6; }
5482else
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5484$as_echo "no" >&6; }
5485fi
5486
5487
5488  test -n "$TAR" && break
5489done
5490
5491
5492    if test "x$TAR" = x; then
5493        if test "xtar" = x; then
5494          PROG_NAME=tar
5495        else
5496          PROG_NAME=tar
5497        fi
5498        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5499$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5500        as_fn_error $? "Cannot continue" "$LINENO" 5
5501    fi
5502
5503
5504
5505    for ac_prog in tee
5506do
5507  # Extract the first word of "$ac_prog", so it can be a program name with args.
5508set dummy $ac_prog; ac_word=$2
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510$as_echo_n "checking for $ac_word... " >&6; }
5511if ${ac_cv_path_TEE+:} false; then :
5512  $as_echo_n "(cached) " >&6
5513else
5514  case $TEE in
5515  [\\/]* | ?:[\\/]*)
5516  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5517  ;;
5518  *)
5519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520for as_dir in $PATH
5521do
5522  IFS=$as_save_IFS
5523  test -z "$as_dir" && as_dir=.
5524    for ac_exec_ext in '' $ac_executable_extensions; do
5525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528    break 2
5529  fi
5530done
5531  done
5532IFS=$as_save_IFS
5533
5534  ;;
5535esac
5536fi
5537TEE=$ac_cv_path_TEE
5538if test -n "$TEE"; then
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5540$as_echo "$TEE" >&6; }
5541else
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
5544fi
5545
5546
5547  test -n "$TEE" && break
5548done
5549
5550
5551    if test "x$TEE" = x; then
5552        if test "xtee" = x; then
5553          PROG_NAME=tee
5554        else
5555          PROG_NAME=tee
5556        fi
5557        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5558$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5559        as_fn_error $? "Cannot continue" "$LINENO" 5
5560    fi
5561
5562
5563
5564    for ac_prog in touch
5565do
5566  # Extract the first word of "$ac_prog", so it can be a program name with args.
5567set dummy $ac_prog; ac_word=$2
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5569$as_echo_n "checking for $ac_word... " >&6; }
5570if ${ac_cv_path_TOUCH+:} false; then :
5571  $as_echo_n "(cached) " >&6
5572else
5573  case $TOUCH in
5574  [\\/]* | ?:[\\/]*)
5575  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5576  ;;
5577  *)
5578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5579for as_dir in $PATH
5580do
5581  IFS=$as_save_IFS
5582  test -z "$as_dir" && as_dir=.
5583    for ac_exec_ext in '' $ac_executable_extensions; do
5584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5585    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5587    break 2
5588  fi
5589done
5590  done
5591IFS=$as_save_IFS
5592
5593  ;;
5594esac
5595fi
5596TOUCH=$ac_cv_path_TOUCH
5597if test -n "$TOUCH"; then
5598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5599$as_echo "$TOUCH" >&6; }
5600else
5601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5602$as_echo "no" >&6; }
5603fi
5604
5605
5606  test -n "$TOUCH" && break
5607done
5608
5609
5610    if test "x$TOUCH" = x; then
5611        if test "xtouch" = x; then
5612          PROG_NAME=touch
5613        else
5614          PROG_NAME=touch
5615        fi
5616        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5617$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5618        as_fn_error $? "Cannot continue" "$LINENO" 5
5619    fi
5620
5621
5622
5623    for ac_prog in tr
5624do
5625  # Extract the first word of "$ac_prog", so it can be a program name with args.
5626set dummy $ac_prog; ac_word=$2
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5628$as_echo_n "checking for $ac_word... " >&6; }
5629if ${ac_cv_path_TR+:} false; then :
5630  $as_echo_n "(cached) " >&6
5631else
5632  case $TR in
5633  [\\/]* | ?:[\\/]*)
5634  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5635  ;;
5636  *)
5637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5638for as_dir in $PATH
5639do
5640  IFS=$as_save_IFS
5641  test -z "$as_dir" && as_dir=.
5642    for ac_exec_ext in '' $ac_executable_extensions; do
5643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5644    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5646    break 2
5647  fi
5648done
5649  done
5650IFS=$as_save_IFS
5651
5652  ;;
5653esac
5654fi
5655TR=$ac_cv_path_TR
5656if test -n "$TR"; then
5657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5658$as_echo "$TR" >&6; }
5659else
5660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661$as_echo "no" >&6; }
5662fi
5663
5664
5665  test -n "$TR" && break
5666done
5667
5668
5669    if test "x$TR" = x; then
5670        if test "xtr" = x; then
5671          PROG_NAME=tr
5672        else
5673          PROG_NAME=tr
5674        fi
5675        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5676$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5677        as_fn_error $? "Cannot continue" "$LINENO" 5
5678    fi
5679
5680
5681
5682    for ac_prog in uname
5683do
5684  # Extract the first word of "$ac_prog", so it can be a program name with args.
5685set dummy $ac_prog; ac_word=$2
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687$as_echo_n "checking for $ac_word... " >&6; }
5688if ${ac_cv_path_UNAME+:} false; then :
5689  $as_echo_n "(cached) " >&6
5690else
5691  case $UNAME in
5692  [\\/]* | ?:[\\/]*)
5693  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5694  ;;
5695  *)
5696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697for as_dir in $PATH
5698do
5699  IFS=$as_save_IFS
5700  test -z "$as_dir" && as_dir=.
5701    for ac_exec_ext in '' $ac_executable_extensions; do
5702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5703    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705    break 2
5706  fi
5707done
5708  done
5709IFS=$as_save_IFS
5710
5711  ;;
5712esac
5713fi
5714UNAME=$ac_cv_path_UNAME
5715if test -n "$UNAME"; then
5716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5717$as_echo "$UNAME" >&6; }
5718else
5719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720$as_echo "no" >&6; }
5721fi
5722
5723
5724  test -n "$UNAME" && break
5725done
5726
5727
5728    if test "x$UNAME" = x; then
5729        if test "xuname" = x; then
5730          PROG_NAME=uname
5731        else
5732          PROG_NAME=uname
5733        fi
5734        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5735$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5736        as_fn_error $? "Cannot continue" "$LINENO" 5
5737    fi
5738
5739
5740
5741    for ac_prog in uniq
5742do
5743  # Extract the first word of "$ac_prog", so it can be a program name with args.
5744set dummy $ac_prog; ac_word=$2
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5746$as_echo_n "checking for $ac_word... " >&6; }
5747if ${ac_cv_path_UNIQ+:} false; then :
5748  $as_echo_n "(cached) " >&6
5749else
5750  case $UNIQ in
5751  [\\/]* | ?:[\\/]*)
5752  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5753  ;;
5754  *)
5755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758  IFS=$as_save_IFS
5759  test -z "$as_dir" && as_dir=.
5760    for ac_exec_ext in '' $ac_executable_extensions; do
5761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5762    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5764    break 2
5765  fi
5766done
5767  done
5768IFS=$as_save_IFS
5769
5770  ;;
5771esac
5772fi
5773UNIQ=$ac_cv_path_UNIQ
5774if test -n "$UNIQ"; then
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5776$as_echo "$UNIQ" >&6; }
5777else
5778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779$as_echo "no" >&6; }
5780fi
5781
5782
5783  test -n "$UNIQ" && break
5784done
5785
5786
5787    if test "x$UNIQ" = x; then
5788        if test "xuniq" = x; then
5789          PROG_NAME=uniq
5790        else
5791          PROG_NAME=uniq
5792        fi
5793        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5794$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5795        as_fn_error $? "Cannot continue" "$LINENO" 5
5796    fi
5797
5798
5799
5800    for ac_prog in wc
5801do
5802  # Extract the first word of "$ac_prog", so it can be a program name with args.
5803set dummy $ac_prog; ac_word=$2
5804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5805$as_echo_n "checking for $ac_word... " >&6; }
5806if ${ac_cv_path_WC+:} false; then :
5807  $as_echo_n "(cached) " >&6
5808else
5809  case $WC in
5810  [\\/]* | ?:[\\/]*)
5811  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5812  ;;
5813  *)
5814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815for as_dir in $PATH
5816do
5817  IFS=$as_save_IFS
5818  test -z "$as_dir" && as_dir=.
5819    for ac_exec_ext in '' $ac_executable_extensions; do
5820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5821    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5823    break 2
5824  fi
5825done
5826  done
5827IFS=$as_save_IFS
5828
5829  ;;
5830esac
5831fi
5832WC=$ac_cv_path_WC
5833if test -n "$WC"; then
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5835$as_echo "$WC" >&6; }
5836else
5837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5838$as_echo "no" >&6; }
5839fi
5840
5841
5842  test -n "$WC" && break
5843done
5844
5845
5846    if test "x$WC" = x; then
5847        if test "xwc" = x; then
5848          PROG_NAME=wc
5849        else
5850          PROG_NAME=wc
5851        fi
5852        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5853$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5854        as_fn_error $? "Cannot continue" "$LINENO" 5
5855    fi
5856
5857
5858
5859    for ac_prog in which
5860do
5861  # Extract the first word of "$ac_prog", so it can be a program name with args.
5862set dummy $ac_prog; ac_word=$2
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864$as_echo_n "checking for $ac_word... " >&6; }
5865if ${ac_cv_path_WHICH+:} false; then :
5866  $as_echo_n "(cached) " >&6
5867else
5868  case $WHICH in
5869  [\\/]* | ?:[\\/]*)
5870  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5871  ;;
5872  *)
5873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876  IFS=$as_save_IFS
5877  test -z "$as_dir" && as_dir=.
5878    for ac_exec_ext in '' $ac_executable_extensions; do
5879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882    break 2
5883  fi
5884done
5885  done
5886IFS=$as_save_IFS
5887
5888  ;;
5889esac
5890fi
5891WHICH=$ac_cv_path_WHICH
5892if test -n "$WHICH"; then
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5894$as_echo "$WHICH" >&6; }
5895else
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897$as_echo "no" >&6; }
5898fi
5899
5900
5901  test -n "$WHICH" && break
5902done
5903
5904
5905    if test "x$WHICH" = x; then
5906        if test "xwhich" = x; then
5907          PROG_NAME=which
5908        else
5909          PROG_NAME=which
5910        fi
5911        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5912$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5913        as_fn_error $? "Cannot continue" "$LINENO" 5
5914    fi
5915
5916
5917
5918    for ac_prog in xargs
5919do
5920  # Extract the first word of "$ac_prog", so it can be a program name with args.
5921set dummy $ac_prog; ac_word=$2
5922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5923$as_echo_n "checking for $ac_word... " >&6; }
5924if ${ac_cv_path_XARGS+:} false; then :
5925  $as_echo_n "(cached) " >&6
5926else
5927  case $XARGS in
5928  [\\/]* | ?:[\\/]*)
5929  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5930  ;;
5931  *)
5932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933for as_dir in $PATH
5934do
5935  IFS=$as_save_IFS
5936  test -z "$as_dir" && as_dir=.
5937    for ac_exec_ext in '' $ac_executable_extensions; do
5938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5939    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5941    break 2
5942  fi
5943done
5944  done
5945IFS=$as_save_IFS
5946
5947  ;;
5948esac
5949fi
5950XARGS=$ac_cv_path_XARGS
5951if test -n "$XARGS"; then
5952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5953$as_echo "$XARGS" >&6; }
5954else
5955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956$as_echo "no" >&6; }
5957fi
5958
5959
5960  test -n "$XARGS" && break
5961done
5962
5963
5964    if test "x$XARGS" = x; then
5965        if test "xxargs" = x; then
5966          PROG_NAME=xargs
5967        else
5968          PROG_NAME=xargs
5969        fi
5970        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5971$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5972        as_fn_error $? "Cannot continue" "$LINENO" 5
5973    fi
5974
5975
5976
5977# Then required tools that require some special treatment.
5978for ac_prog in gawk mawk nawk awk
5979do
5980  # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_prog_AWK+:} false; then :
5985  $as_echo_n "(cached) " >&6
5986else
5987  if test -n "$AWK"; then
5988  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5989else
5990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993  IFS=$as_save_IFS
5994  test -z "$as_dir" && as_dir=.
5995    for ac_exec_ext in '' $ac_executable_extensions; do
5996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997    ac_cv_prog_AWK="$ac_prog"
5998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999    break 2
6000  fi
6001done
6002  done
6003IFS=$as_save_IFS
6004
6005fi
6006fi
6007AWK=$ac_cv_prog_AWK
6008if test -n "$AWK"; then
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6010$as_echo "$AWK" >&6; }
6011else
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
6014fi
6015
6016
6017  test -n "$AWK" && break
6018done
6019
6020
6021    if test "x$AWK" = x; then
6022        if test "x" = x; then
6023          PROG_NAME=awk
6024        else
6025          PROG_NAME=
6026        fi
6027        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6028$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6029        as_fn_error $? "Cannot continue" "$LINENO" 5
6030    fi
6031
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6033$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6034if ${ac_cv_path_GREP+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  if test -z "$GREP"; then
6038  ac_path_GREP_found=false
6039  # Loop through the user's path and test for each of PROGNAME-LIST
6040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_prog in grep ggrep; do
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6048      as_fn_executable_p "$ac_path_GREP" || continue
6049# Check for GNU ac_path_GREP and select it if it is found.
6050  # Check for GNU $ac_path_GREP
6051case `"$ac_path_GREP" --version 2>&1` in
6052*GNU*)
6053  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6054*)
6055  ac_count=0
6056  $as_echo_n 0123456789 >"conftest.in"
6057  while :
6058  do
6059    cat "conftest.in" "conftest.in" >"conftest.tmp"
6060    mv "conftest.tmp" "conftest.in"
6061    cp "conftest.in" "conftest.nl"
6062    $as_echo 'GREP' >> "conftest.nl"
6063    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6064    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6065    as_fn_arith $ac_count + 1 && ac_count=$as_val
6066    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6067      # Best one so far, save it but keep looking for a better one
6068      ac_cv_path_GREP="$ac_path_GREP"
6069      ac_path_GREP_max=$ac_count
6070    fi
6071    # 10*(2^10) chars as input seems more than enough
6072    test $ac_count -gt 10 && break
6073  done
6074  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6075esac
6076
6077      $ac_path_GREP_found && break 3
6078    done
6079  done
6080  done
6081IFS=$as_save_IFS
6082  if test -z "$ac_cv_path_GREP"; then
6083    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6084  fi
6085else
6086  ac_cv_path_GREP=$GREP
6087fi
6088
6089fi
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6091$as_echo "$ac_cv_path_GREP" >&6; }
6092 GREP="$ac_cv_path_GREP"
6093
6094
6095
6096    if test "x$GREP" = x; then
6097        if test "x" = x; then
6098          PROG_NAME=grep
6099        else
6100          PROG_NAME=
6101        fi
6102        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6103$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6104        as_fn_error $? "Cannot continue" "$LINENO" 5
6105    fi
6106
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6108$as_echo_n "checking for egrep... " >&6; }
6109if ${ac_cv_path_EGREP+:} false; then :
6110  $as_echo_n "(cached) " >&6
6111else
6112  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6113   then ac_cv_path_EGREP="$GREP -E"
6114   else
6115     if test -z "$EGREP"; then
6116  ac_path_EGREP_found=false
6117  # Loop through the user's path and test for each of PROGNAME-LIST
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_prog in egrep; do
6124    for ac_exec_ext in '' $ac_executable_extensions; do
6125      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6126      as_fn_executable_p "$ac_path_EGREP" || continue
6127# Check for GNU ac_path_EGREP and select it if it is found.
6128  # Check for GNU $ac_path_EGREP
6129case `"$ac_path_EGREP" --version 2>&1` in
6130*GNU*)
6131  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6132*)
6133  ac_count=0
6134  $as_echo_n 0123456789 >"conftest.in"
6135  while :
6136  do
6137    cat "conftest.in" "conftest.in" >"conftest.tmp"
6138    mv "conftest.tmp" "conftest.in"
6139    cp "conftest.in" "conftest.nl"
6140    $as_echo 'EGREP' >> "conftest.nl"
6141    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6142    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6143    as_fn_arith $ac_count + 1 && ac_count=$as_val
6144    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6145      # Best one so far, save it but keep looking for a better one
6146      ac_cv_path_EGREP="$ac_path_EGREP"
6147      ac_path_EGREP_max=$ac_count
6148    fi
6149    # 10*(2^10) chars as input seems more than enough
6150    test $ac_count -gt 10 && break
6151  done
6152  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6153esac
6154
6155      $ac_path_EGREP_found && break 3
6156    done
6157  done
6158  done
6159IFS=$as_save_IFS
6160  if test -z "$ac_cv_path_EGREP"; then
6161    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6162  fi
6163else
6164  ac_cv_path_EGREP=$EGREP
6165fi
6166
6167   fi
6168fi
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6170$as_echo "$ac_cv_path_EGREP" >&6; }
6171 EGREP="$ac_cv_path_EGREP"
6172
6173
6174
6175    if test "x$EGREP" = x; then
6176        if test "x" = x; then
6177          PROG_NAME=egrep
6178        else
6179          PROG_NAME=
6180        fi
6181        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6182$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6183        as_fn_error $? "Cannot continue" "$LINENO" 5
6184    fi
6185
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6187$as_echo_n "checking for fgrep... " >&6; }
6188if ${ac_cv_path_FGREP+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6192   then ac_cv_path_FGREP="$GREP -F"
6193   else
6194     if test -z "$FGREP"; then
6195  ac_path_FGREP_found=false
6196  # Loop through the user's path and test for each of PROGNAME-LIST
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_prog in fgrep; do
6203    for ac_exec_ext in '' $ac_executable_extensions; do
6204      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6205      as_fn_executable_p "$ac_path_FGREP" || continue
6206# Check for GNU ac_path_FGREP and select it if it is found.
6207  # Check for GNU $ac_path_FGREP
6208case `"$ac_path_FGREP" --version 2>&1` in
6209*GNU*)
6210  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6211*)
6212  ac_count=0
6213  $as_echo_n 0123456789 >"conftest.in"
6214  while :
6215  do
6216    cat "conftest.in" "conftest.in" >"conftest.tmp"
6217    mv "conftest.tmp" "conftest.in"
6218    cp "conftest.in" "conftest.nl"
6219    $as_echo 'FGREP' >> "conftest.nl"
6220    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6221    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6222    as_fn_arith $ac_count + 1 && ac_count=$as_val
6223    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6224      # Best one so far, save it but keep looking for a better one
6225      ac_cv_path_FGREP="$ac_path_FGREP"
6226      ac_path_FGREP_max=$ac_count
6227    fi
6228    # 10*(2^10) chars as input seems more than enough
6229    test $ac_count -gt 10 && break
6230  done
6231  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6232esac
6233
6234      $ac_path_FGREP_found && break 3
6235    done
6236  done
6237  done
6238IFS=$as_save_IFS
6239  if test -z "$ac_cv_path_FGREP"; then
6240    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6241  fi
6242else
6243  ac_cv_path_FGREP=$FGREP
6244fi
6245
6246   fi
6247fi
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6249$as_echo "$ac_cv_path_FGREP" >&6; }
6250 FGREP="$ac_cv_path_FGREP"
6251
6252
6253
6254    if test "x$FGREP" = x; then
6255        if test "x" = x; then
6256          PROG_NAME=fgrep
6257        else
6258          PROG_NAME=
6259        fi
6260        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6261$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6262        as_fn_error $? "Cannot continue" "$LINENO" 5
6263    fi
6264
6265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6266$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6267if ${ac_cv_path_SED+:} false; then :
6268  $as_echo_n "(cached) " >&6
6269else
6270            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6271     for ac_i in 1 2 3 4 5 6 7; do
6272       ac_script="$ac_script$as_nl$ac_script"
6273     done
6274     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6275     { ac_script=; unset ac_script;}
6276     if test -z "$SED"; then
6277  ac_path_SED_found=false
6278  # Loop through the user's path and test for each of PROGNAME-LIST
6279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280for as_dir in $PATH
6281do
6282  IFS=$as_save_IFS
6283  test -z "$as_dir" && as_dir=.
6284    for ac_prog in sed gsed; do
6285    for ac_exec_ext in '' $ac_executable_extensions; do
6286      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6287      as_fn_executable_p "$ac_path_SED" || continue
6288# Check for GNU ac_path_SED and select it if it is found.
6289  # Check for GNU $ac_path_SED
6290case `"$ac_path_SED" --version 2>&1` in
6291*GNU*)
6292  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6293*)
6294  ac_count=0
6295  $as_echo_n 0123456789 >"conftest.in"
6296  while :
6297  do
6298    cat "conftest.in" "conftest.in" >"conftest.tmp"
6299    mv "conftest.tmp" "conftest.in"
6300    cp "conftest.in" "conftest.nl"
6301    $as_echo '' >> "conftest.nl"
6302    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6303    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6304    as_fn_arith $ac_count + 1 && ac_count=$as_val
6305    if test $ac_count -gt ${ac_path_SED_max-0}; then
6306      # Best one so far, save it but keep looking for a better one
6307      ac_cv_path_SED="$ac_path_SED"
6308      ac_path_SED_max=$ac_count
6309    fi
6310    # 10*(2^10) chars as input seems more than enough
6311    test $ac_count -gt 10 && break
6312  done
6313  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6314esac
6315
6316      $ac_path_SED_found && break 3
6317    done
6318  done
6319  done
6320IFS=$as_save_IFS
6321  if test -z "$ac_cv_path_SED"; then
6322    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6323  fi
6324else
6325  ac_cv_path_SED=$SED
6326fi
6327
6328fi
6329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6330$as_echo "$ac_cv_path_SED" >&6; }
6331 SED="$ac_cv_path_SED"
6332  rm -f conftest.sed
6333
6334
6335    if test "x$SED" = x; then
6336        if test "x" = x; then
6337          PROG_NAME=sed
6338        else
6339          PROG_NAME=
6340        fi
6341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6343        as_fn_error $? "Cannot continue" "$LINENO" 5
6344    fi
6345
6346
6347for ac_prog in nawk gawk awk
6348do
6349  # Extract the first word of "$ac_prog", so it can be a program name with args.
6350set dummy $ac_prog; ac_word=$2
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6352$as_echo_n "checking for $ac_word... " >&6; }
6353if ${ac_cv_path_NAWK+:} false; then :
6354  $as_echo_n "(cached) " >&6
6355else
6356  case $NAWK in
6357  [\\/]* | ?:[\\/]*)
6358  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6359  ;;
6360  *)
6361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364  IFS=$as_save_IFS
6365  test -z "$as_dir" && as_dir=.
6366    for ac_exec_ext in '' $ac_executable_extensions; do
6367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6368    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6370    break 2
6371  fi
6372done
6373  done
6374IFS=$as_save_IFS
6375
6376  ;;
6377esac
6378fi
6379NAWK=$ac_cv_path_NAWK
6380if test -n "$NAWK"; then
6381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6382$as_echo "$NAWK" >&6; }
6383else
6384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6385$as_echo "no" >&6; }
6386fi
6387
6388
6389  test -n "$NAWK" && break
6390done
6391
6392
6393    if test "x$NAWK" = x; then
6394        if test "x" = x; then
6395          PROG_NAME=nawk
6396        else
6397          PROG_NAME=
6398        fi
6399        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6400$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6401        as_fn_error $? "Cannot continue" "$LINENO" 5
6402    fi
6403
6404
6405# Always force rm.
6406RM="$RM -f"
6407
6408# pwd behaves differently on various platforms and some don't support the -L flag.
6409# Always use the bash builtin pwd to get uniform behavior.
6410THEPWDCMD=pwd
6411
6412# These are not required on all platforms
6413# Extract the first word of "cygpath", so it can be a program name with args.
6414set dummy cygpath; ac_word=$2
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416$as_echo_n "checking for $ac_word... " >&6; }
6417if ${ac_cv_path_CYGPATH+:} false; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420  case $CYGPATH in
6421  [\\/]* | ?:[\\/]*)
6422  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6423  ;;
6424  *)
6425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428  IFS=$as_save_IFS
6429  test -z "$as_dir" && as_dir=.
6430    for ac_exec_ext in '' $ac_executable_extensions; do
6431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6432    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6434    break 2
6435  fi
6436done
6437  done
6438IFS=$as_save_IFS
6439
6440  ;;
6441esac
6442fi
6443CYGPATH=$ac_cv_path_CYGPATH
6444if test -n "$CYGPATH"; then
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6446$as_echo "$CYGPATH" >&6; }
6447else
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449$as_echo "no" >&6; }
6450fi
6451
6452
6453# Extract the first word of "readlink", so it can be a program name with args.
6454set dummy readlink; ac_word=$2
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6456$as_echo_n "checking for $ac_word... " >&6; }
6457if ${ac_cv_path_READLINK+:} false; then :
6458  $as_echo_n "(cached) " >&6
6459else
6460  case $READLINK in
6461  [\\/]* | ?:[\\/]*)
6462  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6463  ;;
6464  *)
6465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6466for as_dir in $PATH
6467do
6468  IFS=$as_save_IFS
6469  test -z "$as_dir" && as_dir=.
6470    for ac_exec_ext in '' $ac_executable_extensions; do
6471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6472    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6474    break 2
6475  fi
6476done
6477  done
6478IFS=$as_save_IFS
6479
6480  ;;
6481esac
6482fi
6483READLINK=$ac_cv_path_READLINK
6484if test -n "$READLINK"; then
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6486$as_echo "$READLINK" >&6; }
6487else
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492
6493# Extract the first word of "df", so it can be a program name with args.
6494set dummy df; ac_word=$2
6495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6496$as_echo_n "checking for $ac_word... " >&6; }
6497if ${ac_cv_path_DF+:} false; then :
6498  $as_echo_n "(cached) " >&6
6499else
6500  case $DF in
6501  [\\/]* | ?:[\\/]*)
6502  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6503  ;;
6504  *)
6505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6506for as_dir in $PATH
6507do
6508  IFS=$as_save_IFS
6509  test -z "$as_dir" && as_dir=.
6510    for ac_exec_ext in '' $ac_executable_extensions; do
6511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6512    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6514    break 2
6515  fi
6516done
6517  done
6518IFS=$as_save_IFS
6519
6520  ;;
6521esac
6522fi
6523DF=$ac_cv_path_DF
6524if test -n "$DF"; then
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6526$as_echo "$DF" >&6; }
6527else
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531
6532
6533# Extract the first word of "SetFile", so it can be a program name with args.
6534set dummy SetFile; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_SETFILE+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $SETFILE in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563SETFILE=$ac_cv_path_SETFILE
6564if test -n "$SETFILE"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6566$as_echo "$SETFILE" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573
6574
6575# Now we can determine OpenJDK build and target platforms. This is required to
6576# have early on.
6577# Make sure we can run config.sub.
6578$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6579  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6580
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6582$as_echo_n "checking build system type... " >&6; }
6583if ${ac_cv_build+:} false; then :
6584  $as_echo_n "(cached) " >&6
6585else
6586  ac_build_alias=$build_alias
6587test "x$ac_build_alias" = x &&
6588  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6589test "x$ac_build_alias" = x &&
6590  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6591ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6592  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6593
6594fi
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6596$as_echo "$ac_cv_build" >&6; }
6597case $ac_cv_build in
6598*-*-*) ;;
6599*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6600esac
6601build=$ac_cv_build
6602ac_save_IFS=$IFS; IFS='-'
6603set x $ac_cv_build
6604shift
6605build_cpu=$1
6606build_vendor=$2
6607shift; shift
6608# Remember, the first character of IFS is used to create $*,
6609# except with old shells:
6610build_os=$*
6611IFS=$ac_save_IFS
6612case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6613
6614
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6616$as_echo_n "checking host system type... " >&6; }
6617if ${ac_cv_host+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  if test "x$host_alias" = x; then
6621  ac_cv_host=$ac_cv_build
6622else
6623  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6624    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6625fi
6626
6627fi
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6629$as_echo "$ac_cv_host" >&6; }
6630case $ac_cv_host in
6631*-*-*) ;;
6632*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6633esac
6634host=$ac_cv_host
6635ac_save_IFS=$IFS; IFS='-'
6636set x $ac_cv_host
6637shift
6638host_cpu=$1
6639host_vendor=$2
6640shift; shift
6641# Remember, the first character of IFS is used to create $*,
6642# except with old shells:
6643host_os=$*
6644IFS=$ac_save_IFS
6645case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6646
6647
6648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6649$as_echo_n "checking target system type... " >&6; }
6650if ${ac_cv_target+:} false; then :
6651  $as_echo_n "(cached) " >&6
6652else
6653  if test "x$target_alias" = x; then
6654  ac_cv_target=$ac_cv_host
6655else
6656  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6657    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6658fi
6659
6660fi
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6662$as_echo "$ac_cv_target" >&6; }
6663case $ac_cv_target in
6664*-*-*) ;;
6665*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6666esac
6667target=$ac_cv_target
6668ac_save_IFS=$IFS; IFS='-'
6669set x $ac_cv_target
6670shift
6671target_cpu=$1
6672target_vendor=$2
6673shift; shift
6674# Remember, the first character of IFS is used to create $*,
6675# except with old shells:
6676target_os=$*
6677IFS=$ac_save_IFS
6678case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6679
6680
6681# The aliases save the names the user supplied, while $host etc.
6682# will get canonicalized.
6683test -n "$target_alias" &&
6684  test "$program_prefix$program_suffix$program_transform_name" = \
6685    NONENONEs,x,x, &&
6686  program_prefix=${target_alias}-
6687
6688# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6689# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6690# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6691# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6692# to use the configure naming style.
6693
6694
6695
6696
6697
6698    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6699    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6700    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6701    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6702    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6703    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6704
6705
6706
6707    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6708
6709  case "$build_os" in
6710    *linux*)
6711      VAR_OS=linux
6712      VAR_OS_API=posix
6713      VAR_OS_ENV=linux
6714      ;;
6715    *solaris*)
6716      VAR_OS=solaris
6717      VAR_OS_API=posix
6718      VAR_OS_ENV=solaris
6719      ;;
6720    *darwin*)
6721      VAR_OS=macosx
6722      VAR_OS_API=posix
6723      VAR_OS_ENV=macosx
6724      ;;
6725    *bsd*)
6726      VAR_OS=bsd
6727      VAR_OS_API=posix
6728      VAR_OS_ENV=bsd
6729      ;;
6730    *cygwin*)
6731      VAR_OS=windows
6732      VAR_OS_API=winapi
6733      VAR_OS_ENV=windows.cygwin
6734      ;;
6735    *mingw*)
6736      VAR_OS=windows
6737      VAR_OS_API=winapi
6738      VAR_OS_ENV=windows.msys
6739      ;;
6740    *)
6741      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6742      ;;
6743  esac
6744
6745
6746  # First argument is the cpu name from the trip/quad
6747  case "$build_cpu" in
6748    x86_64)
6749      VAR_CPU=x86_64
6750      VAR_CPU_ARCH=x86
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=little
6753      ;;
6754    i?86)
6755      VAR_CPU=x86
6756      VAR_CPU_ARCH=x86
6757      VAR_CPU_BITS=32
6758      VAR_CPU_ENDIAN=little
6759      ;;
6760    arm*)
6761      VAR_CPU=arm
6762      VAR_CPU_ARCH=arm
6763      VAR_CPU_BITS=32
6764      VAR_CPU_ENDIAN=little
6765      ;;
6766    powerpc)
6767      VAR_CPU=ppc
6768      VAR_CPU_ARCH=ppc
6769      VAR_CPU_BITS=32
6770      VAR_CPU_ENDIAN=big
6771       ;;
6772    powerpc64)
6773      VAR_CPU=ppc64
6774      VAR_CPU_ARCH=ppc
6775      VAR_CPU_BITS=64
6776      VAR_CPU_ENDIAN=big
6777       ;;
6778    s390)
6779      VAR_CPU=s390
6780      VAR_CPU_ARCH=s390
6781      VAR_CPU_BITS=32
6782      VAR_CPU_ENDIAN=big
6783       ;;
6784    s390x)
6785      VAR_CPU=s390x
6786      VAR_CPU_ARCH=s390
6787      VAR_CPU_BITS=64
6788      VAR_CPU_ENDIAN=big
6789       ;;
6790    sparc)
6791      VAR_CPU=sparc
6792      VAR_CPU_ARCH=sparc
6793      VAR_CPU_BITS=32
6794      VAR_CPU_ENDIAN=big
6795       ;;
6796    sparcv9)
6797      VAR_CPU=sparcv9
6798      VAR_CPU_ARCH=sparc
6799      VAR_CPU_BITS=64
6800      VAR_CPU_ENDIAN=big
6801       ;;
6802    *)
6803      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6804      ;;
6805  esac
6806
6807    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6808    OPENJDK_BUILD_OS="$VAR_OS"
6809    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6810    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6811    OPENJDK_BUILD_CPU="$VAR_CPU"
6812    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6813    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6814    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6815
6816
6817
6818
6819
6820
6821
6822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6823$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6825$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6826
6827    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6828
6829  case "$host_os" in
6830    *linux*)
6831      VAR_OS=linux
6832      VAR_OS_API=posix
6833      VAR_OS_ENV=linux
6834      ;;
6835    *solaris*)
6836      VAR_OS=solaris
6837      VAR_OS_API=posix
6838      VAR_OS_ENV=solaris
6839      ;;
6840    *darwin*)
6841      VAR_OS=macosx
6842      VAR_OS_API=posix
6843      VAR_OS_ENV=macosx
6844      ;;
6845    *bsd*)
6846      VAR_OS=bsd
6847      VAR_OS_API=posix
6848      VAR_OS_ENV=bsd
6849      ;;
6850    *cygwin*)
6851      VAR_OS=windows
6852      VAR_OS_API=winapi
6853      VAR_OS_ENV=windows.cygwin
6854      ;;
6855    *mingw*)
6856      VAR_OS=windows
6857      VAR_OS_API=winapi
6858      VAR_OS_ENV=windows.msys
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    s390)
6899      VAR_CPU=s390
6900      VAR_CPU_ARCH=s390
6901      VAR_CPU_BITS=32
6902      VAR_CPU_ENDIAN=big
6903       ;;
6904    s390x)
6905      VAR_CPU=s390x
6906      VAR_CPU_ARCH=s390
6907      VAR_CPU_BITS=64
6908      VAR_CPU_ENDIAN=big
6909       ;;
6910    sparc)
6911      VAR_CPU=sparc
6912      VAR_CPU_ARCH=sparc
6913      VAR_CPU_BITS=32
6914      VAR_CPU_ENDIAN=big
6915       ;;
6916    sparcv9)
6917      VAR_CPU=sparcv9
6918      VAR_CPU_ARCH=sparc
6919      VAR_CPU_BITS=64
6920      VAR_CPU_ENDIAN=big
6921       ;;
6922    *)
6923      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6924      ;;
6925  esac
6926
6927    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6928    OPENJDK_TARGET_OS="$VAR_OS"
6929    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6930    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6931    OPENJDK_TARGET_CPU="$VAR_CPU"
6932    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6933    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6934    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6935
6936
6937
6938
6939
6940
6941
6942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6943$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6945$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6946
6947
6948
6949# Check whether --with-target-bits was given.
6950if test "${with_target_bits+set}" = set; then :
6951  withval=$with_target_bits;
6952fi
6953
6954
6955  # We have three types of compiles:
6956  # native  == normal compilation, target system == build system
6957  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6958  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6959  #
6960  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6961    # We're doing a proper cross-compilation
6962    COMPILE_TYPE="cross"
6963  else
6964    COMPILE_TYPE="native"
6965  fi
6966
6967  if test "x$with_target_bits" != x; then
6968    if test "x$COMPILE_TYPE" = "xcross"; then
6969      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6970    fi
6971
6972    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6973      # A reduced build is requested
6974      COMPILE_TYPE="reduced"
6975      OPENJDK_TARGET_CPU_BITS=32
6976      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6977        OPENJDK_TARGET_CPU=x86
6978      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6979        OPENJDK_TARGET_CPU=sparc
6980      else
6981        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6982      fi
6983    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6984      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
6985    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6986      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6987$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6988    else
6989      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6990    fi
6991  fi
6992
6993
6994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6995$as_echo_n "checking compilation type... " >&6; }
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6997$as_echo "$COMPILE_TYPE" >&6; }
6998
6999
7000    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7001       REQUIRED_OS_NAME=SunOS
7002       REQUIRED_OS_VERSION=5.10
7003    fi
7004    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7005       REQUIRED_OS_NAME=Linux
7006       REQUIRED_OS_VERSION=2.6
7007    fi
7008    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7009        REQUIRED_OS_NAME=Windows
7010        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7011            REQUIRED_OS_VERSION=5.2
7012        else
7013            REQUIRED_OS_VERSION=5.1
7014        fi
7015    fi
7016    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7017        REQUIRED_OS_NAME=Darwin
7018        REQUIRED_OS_VERSION=11.2
7019    fi
7020
7021
7022
7023
7024
7025    # Also store the legacy naming of the cpu.
7026    # Ie i586 and amd64 instead of x86 and x86_64
7027    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7028    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7029      OPENJDK_TARGET_CPU_LEGACY="i586"
7030    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7031      # On all platforms except MacOSX replace x86_64 with amd64.
7032      OPENJDK_TARGET_CPU_LEGACY="amd64"
7033    fi
7034
7035
7036    # And the second legacy naming of the cpu.
7037    # Ie i386 and amd64 instead of x86 and x86_64.
7038    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7039    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7040      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7041    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7042      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7043    fi
7044
7045
7046    # This is the name of the cpu (but using i386 and amd64 instead of
7047    # x86 and x86_64, respectively), preceeded by a /, to be used when
7048    # locating libraries. On macosx, it's empty, though.
7049    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7050    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051        OPENJDK_TARGET_CPU_LIBDIR=""
7052    fi
7053
7054
7055    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7056    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7057    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7058    OPENJDK_TARGET_CPU_ISADIR=""
7059    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7060      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7061          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7062      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7063          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7064      fi
7065    fi
7066
7067
7068    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7069    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7070    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7071      # On linux only, we replace x86 with i386.
7072      OPENJDK_TARGET_CPU_OSARCH="i386"
7073    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7074      # On all platforms except macosx, we replace x86_64 with amd64.
7075      OPENJDK_TARGET_CPU_OSARCH="amd64"
7076    fi
7077
7078
7079    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7080    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7081      OPENJDK_TARGET_CPU_JLI="i386"
7082    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7083      # On all platforms except macosx, we replace x86_64 with amd64.
7084      OPENJDK_TARGET_CPU_JLI="amd64"
7085    fi
7086    # Now setup the -D flags for building libjli.
7087    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7088    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7089      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7090        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7091      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7092        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7093      fi
7094    fi
7095
7096
7097    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7098    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7099        OPENJDK_TARGET_OS_API_DIR="solaris"
7100    fi
7101    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7102        OPENJDK_TARGET_OS_API_DIR="windows"
7103    fi
7104
7105
7106    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7107        A_LP64="LP64:="
7108        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7109        # unpack200.exe
7110        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7111            ADD_LP64="-D_LP64=1"
7112        fi
7113    fi
7114    LP64=$A_LP64
7115
7116
7117    if test "x$COMPILE_TYPE" = "xcross"; then
7118      # FIXME: ... or should this include reduced builds..?
7119      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7120    else
7121      DEFINE_CROSS_COMPILE_ARCH=""
7122    fi
7123
7124
7125    # ZERO_ARCHDEF is used to enable architecture-specific code
7126    case "${OPENJDK_TARGET_CPU}" in
7127      ppc*)    ZERO_ARCHDEF=PPC   ;;
7128      s390*)   ZERO_ARCHDEF=S390  ;;
7129      sparc*)  ZERO_ARCHDEF=SPARC ;;
7130      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7131      x86)     ZERO_ARCHDEF=IA32  ;;
7132      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7133    esac
7134
7135
7136
7137
7138
7139# Continue setting up basic stuff. Most remaining code require fundamental tools.
7140
7141# Locate the directory of this script.
7142SCRIPT="$0"
7143AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7144
7145# Where is the source? It is located two levels above the configure script.
7146CURDIR="$PWD"
7147cd "$AUTOCONF_DIR/../.."
7148SRC_ROOT="`$THEPWDCMD -L`"
7149
7150if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7151  PATH_SEP=";"
7152
7153  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7154  if test $SRC_ROOT_LENGTH -gt 100; then
7155      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7156  fi
7157
7158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7160$as_echo_n "checking cygwin release... " >&6; }
7161    CYGWIN_VERSION=`$UNAME -r`
7162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7163$as_echo "$CYGWIN_VERSION" >&6; }
7164    WINDOWS_ENV_VENDOR='cygwin'
7165    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7166
7167    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7168    if test "x$CYGWIN_VERSION_OK" = x; then
7169      { $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
7170$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;}
7171      as_fn_error $? "Cannot continue" "$LINENO" 5
7172    fi
7173    if test "x$CYGPATH" = x; then
7174        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7175    fi
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7177$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7178    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7179    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7180    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7181    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7183$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7184    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7185    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7186    if test "x$test_cygdrive_prefix" = x; then
7187        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7188    fi
7189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7191$as_echo_n "checking msys release... " >&6; }
7192    MSYS_VERSION=`$UNAME -r`
7193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7194$as_echo "$MSYS_VERSION" >&6; }
7195
7196    WINDOWS_ENV_VENDOR='msys'
7197    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7198
7199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7200$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7201    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7202    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7203
7204  windows_path="$MSYS_ROOT_PATH"
7205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7206    unix_path=`$CYGPATH -u "$windows_path"`
7207    MSYS_ROOT_PATH="$unix_path"
7208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7210    MSYS_ROOT_PATH="$unix_path"
7211  fi
7212
7213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7214$as_echo "$MSYS_ROOT_PATH" >&6; }
7215    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7216  else
7217    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7218  fi
7219
7220  # Test if windows or unix (cygwin/msys) find is first in path.
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7222$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7223  FIND_BINARY_OUTPUT=`find --version 2>&1`
7224  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7226$as_echo "unix style" >&6; }
7227  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7229$as_echo "Windows" >&6; }
7230    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7231$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7232    { $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
7233$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7234    as_fn_error $? "Cannot continue" "$LINENO" 5
7235  else
7236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7237$as_echo "unknown" >&6; }
7238    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7239$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7240  fi
7241
7242else
7243  PATH_SEP=":"
7244fi
7245
7246
7247
7248cd "$CURDIR"
7249
7250
7251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7252
7253  # Input might be given as Windows format, start by converting to
7254  # unix format.
7255  path="$SRC_ROOT"
7256  new_path=`$CYGPATH -u "$path"`
7257
7258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7261  # "foo.exe" is OK but "foo" is an error.
7262  #
7263  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7264  # It is also a way to make sure we got the proper file name for the real test later on.
7265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7266  if test "x$test_shortpath" = x; then
7267    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7268$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7269    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7270  fi
7271
7272  # Call helper function which possibly converts this using DOS-style short mode.
7273  # If so, the updated path is stored in $new_path.
7274
7275  input_path="$new_path"
7276  # Check if we need to convert this using DOS-style short mode. If the path
7277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7278  # take no chances and rewrite it.
7279  # Note: m4 eats our [], so we need to use [ and ] instead.
7280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7281  if test "x$has_forbidden_chars" != x; then
7282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7286      # Going to short mode and back again did indeed matter. Since short mode is
7287      # case insensitive, let's make it lowercase to improve readability.
7288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7289      # Now convert it back to Unix-stile (cygpath)
7290      input_path=`$CYGPATH -u "$shortmode_path"`
7291      new_path="$input_path"
7292    fi
7293  fi
7294
7295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7296  if test "x$test_cygdrive_prefix" = x; then
7297    # As a simple fix, exclude /usr/bin since it's not a real path.
7298    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7300      # a path prefixed by /cygdrive for fixpath to work.
7301      new_path="$CYGWIN_ROOT_PATH$input_path"
7302    fi
7303  fi
7304
7305
7306  if test "x$path" != "x$new_path"; then
7307    SRC_ROOT="$new_path"
7308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7309$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7310  fi
7311
7312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7313
7314  path="$SRC_ROOT"
7315  has_colon=`$ECHO $path | $GREP ^.:`
7316  new_path="$path"
7317  if test "x$has_colon" = x; then
7318    # Not in mixed or Windows style, start by that.
7319    new_path=`cmd //c echo $path`
7320  fi
7321
7322
7323  input_path="$new_path"
7324  # Check if we need to convert this using DOS-style short mode. If the path
7325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7326  # take no chances and rewrite it.
7327  # Note: m4 eats our [], so we need to use [ and ] instead.
7328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7329  if test "x$has_forbidden_chars" != x; then
7330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7332  fi
7333
7334
7335  windows_path="$new_path"
7336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7337    unix_path=`$CYGPATH -u "$windows_path"`
7338    new_path="$unix_path"
7339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7341    new_path="$unix_path"
7342  fi
7343
7344  if test "x$path" != "x$new_path"; then
7345    SRC_ROOT="$new_path"
7346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7347$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7348  fi
7349
7350  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7351  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7352
7353  else
7354    # We're on a posix platform. Hooray! :)
7355    path="$SRC_ROOT"
7356    has_space=`$ECHO "$path" | $GREP " "`
7357    if test "x$has_space" != x; then
7358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7359$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7360      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7361    fi
7362
7363    # Use eval to expand a potential ~
7364    eval path="$path"
7365    if test ! -f "$path" && test ! -d "$path"; then
7366      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7367    fi
7368
7369    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7370  fi
7371
7372
7373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7374
7375  # Input might be given as Windows format, start by converting to
7376  # unix format.
7377  path="$CURDIR"
7378  new_path=`$CYGPATH -u "$path"`
7379
7380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7383  # "foo.exe" is OK but "foo" is an error.
7384  #
7385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7386  # It is also a way to make sure we got the proper file name for the real test later on.
7387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7388  if test "x$test_shortpath" = x; then
7389    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7390$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7391    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7392  fi
7393
7394  # Call helper function which possibly converts this using DOS-style short mode.
7395  # If so, the updated path is stored in $new_path.
7396
7397  input_path="$new_path"
7398  # Check if we need to convert this using DOS-style short mode. If the path
7399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7400  # take no chances and rewrite it.
7401  # Note: m4 eats our [], so we need to use [ and ] instead.
7402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7403  if test "x$has_forbidden_chars" != x; then
7404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7408      # Going to short mode and back again did indeed matter. Since short mode is
7409      # case insensitive, let's make it lowercase to improve readability.
7410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7411      # Now convert it back to Unix-stile (cygpath)
7412      input_path=`$CYGPATH -u "$shortmode_path"`
7413      new_path="$input_path"
7414    fi
7415  fi
7416
7417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7418  if test "x$test_cygdrive_prefix" = x; then
7419    # As a simple fix, exclude /usr/bin since it's not a real path.
7420    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7422      # a path prefixed by /cygdrive for fixpath to work.
7423      new_path="$CYGWIN_ROOT_PATH$input_path"
7424    fi
7425  fi
7426
7427
7428  if test "x$path" != "x$new_path"; then
7429    CURDIR="$new_path"
7430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7431$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7432  fi
7433
7434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7435
7436  path="$CURDIR"
7437  has_colon=`$ECHO $path | $GREP ^.:`
7438  new_path="$path"
7439  if test "x$has_colon" = x; then
7440    # Not in mixed or Windows style, start by that.
7441    new_path=`cmd //c echo $path`
7442  fi
7443
7444
7445  input_path="$new_path"
7446  # Check if we need to convert this using DOS-style short mode. If the path
7447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7448  # take no chances and rewrite it.
7449  # Note: m4 eats our [], so we need to use [ and ] instead.
7450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7451  if test "x$has_forbidden_chars" != x; then
7452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7454  fi
7455
7456
7457  windows_path="$new_path"
7458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7459    unix_path=`$CYGPATH -u "$windows_path"`
7460    new_path="$unix_path"
7461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7463    new_path="$unix_path"
7464  fi
7465
7466  if test "x$path" != "x$new_path"; then
7467    CURDIR="$new_path"
7468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7469$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7470  fi
7471
7472  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7473  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7474
7475  else
7476    # We're on a posix platform. Hooray! :)
7477    path="$CURDIR"
7478    has_space=`$ECHO "$path" | $GREP " "`
7479    if test "x$has_space" != x; then
7480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7481$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7482      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7483    fi
7484
7485    # Use eval to expand a potential ~
7486    eval path="$path"
7487    if test ! -f "$path" && test ! -d "$path"; then
7488      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7489    fi
7490
7491    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7492  fi
7493
7494
7495if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7496    # Add extra search paths on solaris for utilities like ar and as etc...
7497    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7498fi
7499
7500# You can force the sys-root if the sys-root encoded into the cross compiler tools
7501# is not correct.
7502
7503# Check whether --with-sys-root was given.
7504if test "${with_sys_root+set}" = set; then :
7505  withval=$with_sys_root;
7506fi
7507
7508
7509if test "x$with_sys_root" != x; then
7510  SYS_ROOT=$with_sys_root
7511else
7512  SYS_ROOT=/
7513fi
7514
7515
7516
7517# Check whether --with-tools-dir was given.
7518if test "${with_tools_dir+set}" = set; then :
7519  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7520
7521fi
7522
7523
7524
7525# Check whether --with-devkit was given.
7526if test "${with_devkit+set}" = set; then :
7527  withval=$with_devkit;
7528    if test "x$with_sys_root" != x; then
7529      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7530    fi
7531
7532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7533
7534  # Input might be given as Windows format, start by converting to
7535  # unix format.
7536  path="$with_devkit"
7537  new_path=`$CYGPATH -u "$path"`
7538
7539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7542  # "foo.exe" is OK but "foo" is an error.
7543  #
7544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7545  # It is also a way to make sure we got the proper file name for the real test later on.
7546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7547  if test "x$test_shortpath" = x; then
7548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7549$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7550    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7551  fi
7552
7553  # Call helper function which possibly converts this using DOS-style short mode.
7554  # If so, the updated path is stored in $new_path.
7555
7556  input_path="$new_path"
7557  # Check if we need to convert this using DOS-style short mode. If the path
7558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7559  # take no chances and rewrite it.
7560  # Note: m4 eats our [], so we need to use [ and ] instead.
7561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7562  if test "x$has_forbidden_chars" != x; then
7563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7567      # Going to short mode and back again did indeed matter. Since short mode is
7568      # case insensitive, let's make it lowercase to improve readability.
7569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7570      # Now convert it back to Unix-stile (cygpath)
7571      input_path=`$CYGPATH -u "$shortmode_path"`
7572      new_path="$input_path"
7573    fi
7574  fi
7575
7576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7577  if test "x$test_cygdrive_prefix" = x; then
7578    # As a simple fix, exclude /usr/bin since it's not a real path.
7579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7581      # a path prefixed by /cygdrive for fixpath to work.
7582      new_path="$CYGWIN_ROOT_PATH$input_path"
7583    fi
7584  fi
7585
7586
7587  if test "x$path" != "x$new_path"; then
7588    with_devkit="$new_path"
7589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7590$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7591  fi
7592
7593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7594
7595  path="$with_devkit"
7596  has_colon=`$ECHO $path | $GREP ^.:`
7597  new_path="$path"
7598  if test "x$has_colon" = x; then
7599    # Not in mixed or Windows style, start by that.
7600    new_path=`cmd //c echo $path`
7601  fi
7602
7603
7604  input_path="$new_path"
7605  # Check if we need to convert this using DOS-style short mode. If the path
7606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7607  # take no chances and rewrite it.
7608  # Note: m4 eats our [], so we need to use [ and ] instead.
7609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7610  if test "x$has_forbidden_chars" != x; then
7611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7613  fi
7614
7615
7616  windows_path="$new_path"
7617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7618    unix_path=`$CYGPATH -u "$windows_path"`
7619    new_path="$unix_path"
7620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7622    new_path="$unix_path"
7623  fi
7624
7625  if test "x$path" != "x$new_path"; then
7626    with_devkit="$new_path"
7627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7628$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7629  fi
7630
7631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7633
7634  else
7635    # We're on a posix platform. Hooray! :)
7636    path="$with_devkit"
7637    has_space=`$ECHO "$path" | $GREP " "`
7638    if test "x$has_space" != x; then
7639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7640$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7641      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7642    fi
7643
7644    # Use eval to expand a potential ~
7645    eval path="$path"
7646    if test ! -f "$path" && test ! -d "$path"; then
7647      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7648    fi
7649
7650    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7651  fi
7652
7653
7654  if test "x$TOOLS_DIR" = x; then
7655    TOOLS_DIR="$with_devkit/bin"
7656  else
7657    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7658  fi
7659
7660    if test -d "$with_devkit/$host_alias/libc"; then
7661      SYS_ROOT=$with_devkit/$host_alias/libc
7662    elif test -d "$with_devkit/$host/sys-root"; then
7663      SYS_ROOT=$with_devkit/$host/sys-root
7664    fi
7665
7666fi
7667
7668
7669
7670# Setup default logging of stdout and stderr to build.log in the output root.
7671BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7672BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7673BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7674
7675
7676
7677
7678
7679# Check if it's a pure open build or if custom sources are to be used.
7680
7681  # Check whether --enable-openjdk-only was given.
7682if test "${enable_openjdk_only+set}" = set; then :
7683  enableval=$enable_openjdk_only;
7684else
7685  enable_openjdk_only="no"
7686fi
7687
7688
7689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7690$as_echo_n "checking for presence of closed sources... " >&6; }
7691  if test -d "$SRC_ROOT/jdk/src/closed"; then
7692    CLOSED_SOURCE_PRESENT=yes
7693  else
7694    CLOSED_SOURCE_PRESENT=no
7695  fi
7696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7697$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7698
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7700$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7701  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7703$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7704
7705  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7706    OPENJDK=true
7707    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7708      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7709$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7710    fi
7711  else
7712    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7713      OPENJDK=true
7714    else
7715      OPENJDK=false
7716    fi
7717  fi
7718
7719  if test "x$OPENJDK" = "xtrue"; then
7720    SET_OPENJDK="OPENJDK=true"
7721  fi
7722
7723
7724
7725
7726# These are needed to be able to create a configuration name (and thus the output directory)
7727
7728###############################################################################
7729#
7730# Check which variant of the JDK that we want to build.
7731# Currently we have:
7732#    normal:   standard edition
7733# but the custom make system may add other variants
7734#
7735# Effectively the JDK variant gives a name to a specific set of
7736# modules to compile into the JDK. In the future, these modules
7737# might even be Jigsaw modules.
7738#
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7740$as_echo_n "checking which variant of the JDK to build... " >&6; }
7741
7742# Check whether --with-jdk-variant was given.
7743if test "${with_jdk_variant+set}" = set; then :
7744  withval=$with_jdk_variant;
7745fi
7746
7747
7748if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7749    JDK_VARIANT="normal"
7750else
7751    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7752fi
7753
7754
7755
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7757$as_echo "$JDK_VARIANT" >&6; }
7758
7759
7760
7761###############################################################################
7762#
7763# Check which variants of the JVM that we want to build.
7764# Currently we have:
7765#    server: normal interpreter and a tiered C1/C2 compiler
7766#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7767#    minimal1: reduced form of client with optional VM services and features stripped out
7768#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7769#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7770#    zero: no machine code interpreter, no compiler
7771#    zeroshark: zero interpreter and shark/llvm compiler backend
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7773$as_echo_n "checking which variants of the JVM to build... " >&6; }
7774
7775# Check whether --with-jvm-variants was given.
7776if test "${with_jvm_variants+set}" = set; then :
7777  withval=$with_jvm_variants;
7778fi
7779
7780
7781if test "x$with_jvm_variants" = x; then
7782     with_jvm_variants="server"
7783fi
7784
7785JVM_VARIANTS=",$with_jvm_variants,"
7786TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7787
7788if test "x$TEST_VARIANTS" != "x,"; then
7789   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7790fi
7791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7792$as_echo "$with_jvm_variants" >&6; }
7793
7794JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7795JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7796JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7797JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7798JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7799JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7800
7801if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7802    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7803        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7804    fi
7805fi
7806if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7807    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7808        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7809    fi
7810fi
7811if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7812    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7813        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7814    fi
7815fi
7816
7817# Replace the commas with AND for use in the build directory name.
7818ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7819COUNT_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/'`
7820if test "x$COUNT_VARIANTS" != "x,1"; then
7821    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7822else
7823    BUILDING_MULTIPLE_JVM_VARIANTS=no
7824fi
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834INCLUDE_SA=true
7835if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7836    INCLUDE_SA=false
7837fi
7838if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7839    INCLUDE_SA=false
7840fi
7841
7842
7843if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7844   MACOSX_UNIVERSAL="true"
7845fi
7846
7847
7848
7849
7850
7851###############################################################################
7852#
7853# Set the debug level
7854#    release: no debug information, all optimizations, no asserts.
7855#    fastdebug: debug information (-g), all optimizations, all asserts
7856#    slowdebug: debug information (-g), no optimizations, all asserts
7857#
7858DEBUG_LEVEL="release"
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7860$as_echo_n "checking which debug level to use... " >&6; }
7861# Check whether --enable-debug was given.
7862if test "${enable_debug+set}" = set; then :
7863  enableval=$enable_debug;
7864        ENABLE_DEBUG="${enableval}"
7865        DEBUG_LEVEL="fastdebug"
7866
7867else
7868  ENABLE_DEBUG="no"
7869fi
7870
7871
7872
7873# Check whether --with-debug-level was given.
7874if test "${with_debug_level+set}" = set; then :
7875  withval=$with_debug_level;
7876        DEBUG_LEVEL="${withval}"
7877        if test "x$ENABLE_DEBUG" = xyes; then
7878			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7879        fi
7880
7881fi
7882
7883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7884$as_echo "$DEBUG_LEVEL" >&6; }
7885
7886if test "x$DEBUG_LEVEL" != xrelease && \
7887   test "x$DEBUG_LEVEL" != xfastdebug && \
7888   test "x$DEBUG_LEVEL" != xslowdebug; then
7889   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7890fi
7891
7892
7893###############################################################################
7894#
7895# Setup legacy vars/targets and new vars to deal with different debug levels.
7896#
7897
7898case $DEBUG_LEVEL in
7899      release )
7900          VARIANT="OPT"
7901          FASTDEBUG="false"
7902          DEBUG_CLASSFILES="false"
7903          BUILD_VARIANT_RELEASE=""
7904          HOTSPOT_DEBUG_LEVEL="product"
7905          HOTSPOT_EXPORT="product"
7906           ;;
7907      fastdebug )
7908          VARIANT="DBG"
7909          FASTDEBUG="true"
7910          DEBUG_CLASSFILES="true"
7911          BUILD_VARIANT_RELEASE="-fastdebug"
7912          HOTSPOT_DEBUG_LEVEL="fastdebug"
7913          HOTSPOT_EXPORT="fastdebug"
7914           ;;
7915      slowdebug )
7916          VARIANT="DBG"
7917          FASTDEBUG="false"
7918          DEBUG_CLASSFILES="true"
7919          BUILD_VARIANT_RELEASE="-debug"
7920          HOTSPOT_DEBUG_LEVEL="jvmg"
7921          HOTSPOT_EXPORT="debug"
7922           ;;
7923esac
7924
7925#####
7926# Generate the legacy makefile targets for hotspot.
7927# The hotspot api for selecting the build artifacts, really, needs to be improved.
7928# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7929# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7930# But until then ...
7931HOTSPOT_TARGET=""
7932
7933if test "x$JVM_VARIANT_SERVER" = xtrue; then
7934    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7935fi
7936
7937if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7938    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7939fi
7940
7941if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7942    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7943fi
7944
7945if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7946    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7947fi
7948
7949if test "x$JVM_VARIANT_ZERO" = xtrue; then
7950    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7951fi
7952
7953if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7954    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7955fi
7956
7957HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7958
7959# On Macosx universal binaries are produced, but they only contain
7960# 64 bit intel. This invalidates control of which jvms are built
7961# from configure, but only server is valid anyway. Fix this
7962# when hotspot makefiles are rewritten.
7963if test "x$MACOSX_UNIVERSAL" = xtrue; then
7964    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7965fi
7966
7967#####
7968
7969
7970
7971
7972
7973
7974
7975
7976# With basic setup done, call the custom early hook.
7977
7978
7979# To properly create a configuration name, we need to have the OpenJDK target
7980# and options (variants and debug level) parsed.
7981
7982
7983
7984# Check whether --with-conf-name was given.
7985if test "${with_conf_name+set}" = set; then :
7986  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7987fi
7988
7989
7990# Test from where we are running configure, in or outside of src root.
7991if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7992        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7993        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7994    # We are running configure from the src root.
7995    # Create a default ./build/target-variant-debuglevel output root.
7996    if test "x${CONF_NAME}" = x; then
7997        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7998    fi
7999    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8000    $MKDIR -p "$OUTPUT_ROOT"
8001    if test ! -d "$OUTPUT_ROOT"; then
8002        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8003    fi
8004else
8005    # We are running configure from outside of the src dir.
8006    # Then use the current directory as output dir!
8007    # If configuration is situated in normal build directory, just use the build
8008    # directory name as configuration name, otherwise use the complete path.
8009    if test "x${CONF_NAME}" = x; then
8010        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8011    fi
8012    OUTPUT_ROOT="$CURDIR"
8013
8014    # WARNING: This might be a bad thing to do. You need to be sure you want to
8015    # have a configuration in this directory. Do some sanity checks!
8016
8017    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8018      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8019      # other files
8020      files_present=`$LS $OUTPUT_ROOT`
8021      # Configure has already touched config.log and confdefs.h in the current dir when this check
8022      # is performed.
8023      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8024                                             | $TR -d '\n'`
8025      if test "x$filtered_files" != x; then
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8027$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8028        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8029$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8030        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8031$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8032        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8033$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8035$as_echo "$as_me: seriously mess up just about everything." >&6;}
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8037$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8039$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8040        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8041      fi
8042    fi
8043fi
8044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8045$as_echo_n "checking what configuration name to use... " >&6; }
8046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8047$as_echo "$CONF_NAME" >&6; }
8048
8049
8050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8051
8052  # Input might be given as Windows format, start by converting to
8053  # unix format.
8054  path="$OUTPUT_ROOT"
8055  new_path=`$CYGPATH -u "$path"`
8056
8057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8060  # "foo.exe" is OK but "foo" is an error.
8061  #
8062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8063  # It is also a way to make sure we got the proper file name for the real test later on.
8064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8065  if test "x$test_shortpath" = x; then
8066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8067$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8068    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8069  fi
8070
8071  # Call helper function which possibly converts this using DOS-style short mode.
8072  # If so, the updated path is stored in $new_path.
8073
8074  input_path="$new_path"
8075  # Check if we need to convert this using DOS-style short mode. If the path
8076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8077  # take no chances and rewrite it.
8078  # Note: m4 eats our [], so we need to use [ and ] instead.
8079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8080  if test "x$has_forbidden_chars" != x; then
8081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8085      # Going to short mode and back again did indeed matter. Since short mode is
8086      # case insensitive, let's make it lowercase to improve readability.
8087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8088      # Now convert it back to Unix-stile (cygpath)
8089      input_path=`$CYGPATH -u "$shortmode_path"`
8090      new_path="$input_path"
8091    fi
8092  fi
8093
8094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8095  if test "x$test_cygdrive_prefix" = x; then
8096    # As a simple fix, exclude /usr/bin since it's not a real path.
8097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8099      # a path prefixed by /cygdrive for fixpath to work.
8100      new_path="$CYGWIN_ROOT_PATH$input_path"
8101    fi
8102  fi
8103
8104
8105  if test "x$path" != "x$new_path"; then
8106    OUTPUT_ROOT="$new_path"
8107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8108$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8109  fi
8110
8111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8112
8113  path="$OUTPUT_ROOT"
8114  has_colon=`$ECHO $path | $GREP ^.:`
8115  new_path="$path"
8116  if test "x$has_colon" = x; then
8117    # Not in mixed or Windows style, start by that.
8118    new_path=`cmd //c echo $path`
8119  fi
8120
8121
8122  input_path="$new_path"
8123  # Check if we need to convert this using DOS-style short mode. If the path
8124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8125  # take no chances and rewrite it.
8126  # Note: m4 eats our [], so we need to use [ and ] instead.
8127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8128  if test "x$has_forbidden_chars" != x; then
8129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8131  fi
8132
8133
8134  windows_path="$new_path"
8135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8136    unix_path=`$CYGPATH -u "$windows_path"`
8137    new_path="$unix_path"
8138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8140    new_path="$unix_path"
8141  fi
8142
8143  if test "x$path" != "x$new_path"; then
8144    OUTPUT_ROOT="$new_path"
8145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8146$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8147  fi
8148
8149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8151
8152  else
8153    # We're on a posix platform. Hooray! :)
8154    path="$OUTPUT_ROOT"
8155    has_space=`$ECHO "$path" | $GREP " "`
8156    if test "x$has_space" != x; then
8157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8158$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8159      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8160    fi
8161
8162    # Use eval to expand a potential ~
8163    eval path="$path"
8164    if test ! -f "$path" && test ! -d "$path"; then
8165      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8166    fi
8167
8168    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8169  fi
8170
8171
8172SPEC=$OUTPUT_ROOT/spec.gmk
8173
8174CONF_NAME=$CONF_NAME
8175
8176OUTPUT_ROOT=$OUTPUT_ROOT
8177
8178
8179# Most of the probed defines are put into config.h
8180ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8181
8182# The spec.gmk file contains all variables for the make system.
8183ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8184
8185# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8186ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8187
8188# The bootcycle-spec.gmk file contains support for boot cycle builds.
8189ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8190
8191# The compare.sh is used to compare the build output to other builds.
8192ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8193
8194# Spec.sh is currently used by compare-objects.sh
8195ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8196
8197# The generated Makefile knows where the spec.gmk is and where the source is.
8198# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8199# which will look for generated configurations
8200ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8201
8202
8203# Save the arguments given to us
8204echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8205
8206
8207# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8208
8209    for ac_prog in apt-get yum port pkgutil pkgadd
8210do
8211  # Extract the first word of "$ac_prog", so it can be a program name with args.
8212set dummy $ac_prog; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if ${ac_cv_prog_PKGHANDLER+:} false; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  if test -n "$PKGHANDLER"; then
8219  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8220else
8221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH
8223do
8224  IFS=$as_save_IFS
8225  test -z "$as_dir" && as_dir=.
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228    ac_cv_prog_PKGHANDLER="$ac_prog"
8229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230    break 2
8231  fi
8232done
8233  done
8234IFS=$as_save_IFS
8235
8236fi
8237fi
8238PKGHANDLER=$ac_cv_prog_PKGHANDLER
8239if test -n "$PKGHANDLER"; then
8240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8241$as_echo "$PKGHANDLER" >&6; }
8242else
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8244$as_echo "no" >&6; }
8245fi
8246
8247
8248  test -n "$PKGHANDLER" && break
8249done
8250
8251
8252
8253# Setup tools that requires more complex handling, or that is not needed by the configure script.
8254
8255
8256  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8257  if test "x$MAKE" != x; then
8258    # User has supplied a make, test it.
8259    if test ! -f "$MAKE"; then
8260      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8261    fi
8262
8263  MAKE_CANDIDATE=""$MAKE""
8264  DESCRIPTION="user supplied MAKE=$MAKE"
8265  if test "x$MAKE_CANDIDATE" != x; then
8266    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8267$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8268    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8269    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8270    if test "x$IS_GNU_MAKE" = x; then
8271      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8272$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8273    else
8274      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8275      if test "x$IS_MODERN_MAKE" = x; then
8276        { $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
8277$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;}
8278      else
8279        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8280          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8281            MAKE_EXPECTED_ENV='cygwin'
8282          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8283            MAKE_EXPECTED_ENV='msys'
8284          else
8285            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8286          fi
8287          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8288          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8289        else
8290          # Not relevant for non-Windows
8291          IS_MAKE_CORRECT_ENV=true
8292        fi
8293        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8294          { $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
8295$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;}
8296        else
8297          FOUND_MAKE=$MAKE_CANDIDATE
8298
8299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8300
8301  # First separate the path from the arguments. This will split at the first
8302  # space.
8303  complete="$FOUND_MAKE"
8304  path="${complete%% *}"
8305  tmp="$complete EOL"
8306  arguments="${tmp#* }"
8307
8308  # Input might be given as Windows format, start by converting to
8309  # unix format.
8310  new_path=`$CYGPATH -u "$path"`
8311
8312  # Now try to locate executable using which
8313  new_path=`$WHICH "$new_path" 2> /dev/null`
8314  # bat and cmd files are not always considered executable in cygwin causing which
8315  # to not find them
8316  if test "x$new_path" = x \
8317           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8318           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8319    new_path=`$CYGPATH -u "$path"`
8320  fi
8321  if test "x$new_path" = x; then
8322    # Oops. Which didn't find the executable.
8323    # The splitting of arguments from the executable at a space might have been incorrect,
8324    # since paths with space are more likely in Windows. Give it another try with the whole
8325    # argument.
8326    path="$complete"
8327    arguments="EOL"
8328    new_path=`$CYGPATH -u "$path"`
8329    new_path=`$WHICH "$new_path" 2> /dev/null`
8330    # bat and cmd files are not always considered executable in cygwin causing which
8331    # to not find them
8332    if test "x$new_path" = x \
8333             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8334             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8335      new_path=`$CYGPATH -u "$path"`
8336    fi
8337    if test "x$new_path" = x; then
8338      # It's still not found. Now this is an unrecoverable error.
8339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8340$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8341      has_space=`$ECHO "$complete" | $GREP " "`
8342      if test "x$has_space" != x; then
8343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8345      fi
8346      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8347    fi
8348  fi
8349
8350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8353  # "foo.exe" is OK but "foo" is an error.
8354  #
8355  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8356  # It is also a way to make sure we got the proper file name for the real test later on.
8357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8358  if test "x$test_shortpath" = x; then
8359    # Short path failed, file does not exist as specified.
8360    # Try adding .exe or .cmd
8361    if test -f "${new_path}.exe"; then
8362       input_to_shortpath="${new_path}.exe"
8363    elif test -f "${new_path}.cmd"; then
8364       input_to_shortpath="${new_path}.cmd"
8365    else
8366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8367$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8368      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8369$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8370      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8371    fi
8372  else
8373    input_to_shortpath="$new_path"
8374  fi
8375
8376  # Call helper function which possibly converts this using DOS-style short mode.
8377  # If so, the updated path is stored in $new_path.
8378  new_path="$input_to_shortpath"
8379
8380  input_path="$input_to_shortpath"
8381  # Check if we need to convert this using DOS-style short mode. If the path
8382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8383  # take no chances and rewrite it.
8384  # Note: m4 eats our [], so we need to use [ and ] instead.
8385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8386  if test "x$has_forbidden_chars" != x; then
8387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8391      # Going to short mode and back again did indeed matter. Since short mode is
8392      # case insensitive, let's make it lowercase to improve readability.
8393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8394      # Now convert it back to Unix-stile (cygpath)
8395      input_path=`$CYGPATH -u "$shortmode_path"`
8396      new_path="$input_path"
8397    fi
8398  fi
8399
8400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8401  if test "x$test_cygdrive_prefix" = x; then
8402    # As a simple fix, exclude /usr/bin since it's not a real path.
8403    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8405      # a path prefixed by /cygdrive for fixpath to work.
8406      new_path="$CYGWIN_ROOT_PATH$input_path"
8407    fi
8408  fi
8409
8410  # remove trailing .exe if any
8411  new_path="${new_path/%.exe/}"
8412
8413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8414
8415  # First separate the path from the arguments. This will split at the first
8416  # space.
8417  complete="$FOUND_MAKE"
8418  path="${complete%% *}"
8419  tmp="$complete EOL"
8420  arguments="${tmp#* }"
8421
8422  # Input might be given as Windows format, start by converting to
8423  # unix format.
8424  new_path="$path"
8425
8426  windows_path="$new_path"
8427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8428    unix_path=`$CYGPATH -u "$windows_path"`
8429    new_path="$unix_path"
8430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8432    new_path="$unix_path"
8433  fi
8434
8435
8436  # Now try to locate executable using which
8437  new_path=`$WHICH "$new_path" 2> /dev/null`
8438
8439  if test "x$new_path" = x; then
8440    # Oops. Which didn't find the executable.
8441    # The splitting of arguments from the executable at a space might have been incorrect,
8442    # since paths with space are more likely in Windows. Give it another try with the whole
8443    # argument.
8444    path="$complete"
8445    arguments="EOL"
8446    new_path="$path"
8447
8448  windows_path="$new_path"
8449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8450    unix_path=`$CYGPATH -u "$windows_path"`
8451    new_path="$unix_path"
8452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8454    new_path="$unix_path"
8455  fi
8456
8457
8458    new_path=`$WHICH "$new_path" 2> /dev/null`
8459
8460    if test "x$new_path" = x; then
8461      # It's still not found. Now this is an unrecoverable error.
8462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8463$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8464      has_space=`$ECHO "$complete" | $GREP " "`
8465      if test "x$has_space" != x; then
8466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8468      fi
8469      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8470    fi
8471  fi
8472
8473  # Now new_path has a complete unix path to the binary
8474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8475    # Keep paths in /bin as-is, but remove trailing .exe if any
8476    new_path="${new_path/%.exe/}"
8477    # Do not save /bin paths to all_fixpath_prefixes!
8478  else
8479    # Not in mixed or Windows style, start by that.
8480    new_path=`cmd //c echo $new_path`
8481
8482  input_path="$new_path"
8483  # Check if we need to convert this using DOS-style short mode. If the path
8484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8485  # take no chances and rewrite it.
8486  # Note: m4 eats our [], so we need to use [ and ] instead.
8487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8488  if test "x$has_forbidden_chars" != x; then
8489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8491  fi
8492
8493    # Output is in $new_path
8494
8495  windows_path="$new_path"
8496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8497    unix_path=`$CYGPATH -u "$windows_path"`
8498    new_path="$unix_path"
8499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8501    new_path="$unix_path"
8502  fi
8503
8504    # remove trailing .exe if any
8505    new_path="${new_path/%.exe/}"
8506
8507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8509  fi
8510
8511  else
8512    # We're on a posix platform. Hooray! :)
8513    # First separate the path from the arguments. This will split at the first
8514    # space.
8515    complete="$FOUND_MAKE"
8516    path="${complete%% *}"
8517    tmp="$complete EOL"
8518    arguments="${tmp#* }"
8519
8520    # Cannot rely on the command "which" here since it doesn't always work.
8521    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8522    if test -z "$is_absolute_path"; then
8523      # Path to executable is not absolute. Find it.
8524      IFS_save="$IFS"
8525      IFS=:
8526      for p in $PATH; do
8527        if test -f "$p/$path" && test -x "$p/$path"; then
8528          new_path="$p/$path"
8529          break
8530        fi
8531      done
8532      IFS="$IFS_save"
8533    else
8534      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8535$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8536      new_path="$path"
8537    fi
8538
8539    if test "x$new_path" = x; then
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8541$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8542        has_space=`$ECHO "$complete" | $GREP " "`
8543        if test "x$has_space" != x; then
8544          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8545$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8546        fi
8547        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8548      fi
8549  fi
8550
8551      # Now join together the path and the arguments once again
8552      if test "x$arguments" != xEOL; then
8553        new_complete="$new_path ${arguments% *}"
8554      else
8555        new_complete="$new_path"
8556      fi
8557
8558  if test "x$complete" != "x$new_complete"; then
8559      FOUND_MAKE="$new_complete"
8560      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8561$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8562    fi
8563
8564        fi
8565      fi
8566    fi
8567  fi
8568
8569    if test "x$FOUND_MAKE" = x; then
8570      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8571    fi
8572  else
8573    # Try our hardest to locate a correct version of GNU make
8574    for ac_prog in gmake
8575do
8576  # Extract the first word of "$ac_prog", so it can be a program name with args.
8577set dummy $ac_prog; ac_word=$2
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579$as_echo_n "checking for $ac_word... " >&6; }
8580if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8581  $as_echo_n "(cached) " >&6
8582else
8583  case $CHECK_GMAKE in
8584  [\\/]* | ?:[\\/]*)
8585  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8586  ;;
8587  *)
8588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589for as_dir in $PATH
8590do
8591  IFS=$as_save_IFS
8592  test -z "$as_dir" && as_dir=.
8593    for ac_exec_ext in '' $ac_executable_extensions; do
8594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597    break 2
8598  fi
8599done
8600  done
8601IFS=$as_save_IFS
8602
8603  ;;
8604esac
8605fi
8606CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8607if test -n "$CHECK_GMAKE"; then
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8609$as_echo "$CHECK_GMAKE" >&6; }
8610else
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612$as_echo "no" >&6; }
8613fi
8614
8615
8616  test -n "$CHECK_GMAKE" && break
8617done
8618
8619
8620  MAKE_CANDIDATE=""$CHECK_GMAKE""
8621  DESCRIPTION="gmake in PATH"
8622  if test "x$MAKE_CANDIDATE" != x; then
8623    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8624$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8625    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8626    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8627    if test "x$IS_GNU_MAKE" = x; then
8628      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8629$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8630    else
8631      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8632      if test "x$IS_MODERN_MAKE" = x; then
8633        { $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
8634$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;}
8635      else
8636        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8637          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8638            MAKE_EXPECTED_ENV='cygwin'
8639          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8640            MAKE_EXPECTED_ENV='msys'
8641          else
8642            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8643          fi
8644          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8645          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8646        else
8647          # Not relevant for non-Windows
8648          IS_MAKE_CORRECT_ENV=true
8649        fi
8650        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8651          { $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
8652$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;}
8653        else
8654          FOUND_MAKE=$MAKE_CANDIDATE
8655
8656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8657
8658  # First separate the path from the arguments. This will split at the first
8659  # space.
8660  complete="$FOUND_MAKE"
8661  path="${complete%% *}"
8662  tmp="$complete EOL"
8663  arguments="${tmp#* }"
8664
8665  # Input might be given as Windows format, start by converting to
8666  # unix format.
8667  new_path=`$CYGPATH -u "$path"`
8668
8669  # Now try to locate executable using which
8670  new_path=`$WHICH "$new_path" 2> /dev/null`
8671  # bat and cmd files are not always considered executable in cygwin causing which
8672  # to not find them
8673  if test "x$new_path" = x \
8674           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8675           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8676    new_path=`$CYGPATH -u "$path"`
8677  fi
8678  if test "x$new_path" = x; then
8679    # Oops. Which didn't find the executable.
8680    # The splitting of arguments from the executable at a space might have been incorrect,
8681    # since paths with space are more likely in Windows. Give it another try with the whole
8682    # argument.
8683    path="$complete"
8684    arguments="EOL"
8685    new_path=`$CYGPATH -u "$path"`
8686    new_path=`$WHICH "$new_path" 2> /dev/null`
8687    # bat and cmd files are not always considered executable in cygwin causing which
8688    # to not find them
8689    if test "x$new_path" = x \
8690             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8691             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8692      new_path=`$CYGPATH -u "$path"`
8693    fi
8694    if test "x$new_path" = x; then
8695      # It's still not found. Now this is an unrecoverable error.
8696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8698      has_space=`$ECHO "$complete" | $GREP " "`
8699      if test "x$has_space" != x; then
8700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8702      fi
8703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8704    fi
8705  fi
8706
8707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8710  # "foo.exe" is OK but "foo" is an error.
8711  #
8712  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8713  # It is also a way to make sure we got the proper file name for the real test later on.
8714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8715  if test "x$test_shortpath" = x; then
8716    # Short path failed, file does not exist as specified.
8717    # Try adding .exe or .cmd
8718    if test -f "${new_path}.exe"; then
8719       input_to_shortpath="${new_path}.exe"
8720    elif test -f "${new_path}.cmd"; then
8721       input_to_shortpath="${new_path}.cmd"
8722    else
8723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8724$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8727      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8728    fi
8729  else
8730    input_to_shortpath="$new_path"
8731  fi
8732
8733  # Call helper function which possibly converts this using DOS-style short mode.
8734  # If so, the updated path is stored in $new_path.
8735  new_path="$input_to_shortpath"
8736
8737  input_path="$input_to_shortpath"
8738  # Check if we need to convert this using DOS-style short mode. If the path
8739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8740  # take no chances and rewrite it.
8741  # Note: m4 eats our [], so we need to use [ and ] instead.
8742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8743  if test "x$has_forbidden_chars" != x; then
8744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8748      # Going to short mode and back again did indeed matter. Since short mode is
8749      # case insensitive, let's make it lowercase to improve readability.
8750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8751      # Now convert it back to Unix-stile (cygpath)
8752      input_path=`$CYGPATH -u "$shortmode_path"`
8753      new_path="$input_path"
8754    fi
8755  fi
8756
8757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8758  if test "x$test_cygdrive_prefix" = x; then
8759    # As a simple fix, exclude /usr/bin since it's not a real path.
8760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8762      # a path prefixed by /cygdrive for fixpath to work.
8763      new_path="$CYGWIN_ROOT_PATH$input_path"
8764    fi
8765  fi
8766
8767  # remove trailing .exe if any
8768  new_path="${new_path/%.exe/}"
8769
8770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8771
8772  # First separate the path from the arguments. This will split at the first
8773  # space.
8774  complete="$FOUND_MAKE"
8775  path="${complete%% *}"
8776  tmp="$complete EOL"
8777  arguments="${tmp#* }"
8778
8779  # Input might be given as Windows format, start by converting to
8780  # unix format.
8781  new_path="$path"
8782
8783  windows_path="$new_path"
8784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8785    unix_path=`$CYGPATH -u "$windows_path"`
8786    new_path="$unix_path"
8787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8789    new_path="$unix_path"
8790  fi
8791
8792
8793  # Now try to locate executable using which
8794  new_path=`$WHICH "$new_path" 2> /dev/null`
8795
8796  if test "x$new_path" = x; then
8797    # Oops. Which didn't find the executable.
8798    # The splitting of arguments from the executable at a space might have been incorrect,
8799    # since paths with space are more likely in Windows. Give it another try with the whole
8800    # argument.
8801    path="$complete"
8802    arguments="EOL"
8803    new_path="$path"
8804
8805  windows_path="$new_path"
8806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8807    unix_path=`$CYGPATH -u "$windows_path"`
8808    new_path="$unix_path"
8809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8811    new_path="$unix_path"
8812  fi
8813
8814
8815    new_path=`$WHICH "$new_path" 2> /dev/null`
8816
8817    if test "x$new_path" = x; then
8818      # It's still not found. Now this is an unrecoverable error.
8819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8820$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8821      has_space=`$ECHO "$complete" | $GREP " "`
8822      if test "x$has_space" != x; then
8823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8825      fi
8826      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8827    fi
8828  fi
8829
8830  # Now new_path has a complete unix path to the binary
8831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8832    # Keep paths in /bin as-is, but remove trailing .exe if any
8833    new_path="${new_path/%.exe/}"
8834    # Do not save /bin paths to all_fixpath_prefixes!
8835  else
8836    # Not in mixed or Windows style, start by that.
8837    new_path=`cmd //c echo $new_path`
8838
8839  input_path="$new_path"
8840  # Check if we need to convert this using DOS-style short mode. If the path
8841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8842  # take no chances and rewrite it.
8843  # Note: m4 eats our [], so we need to use [ and ] instead.
8844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8845  if test "x$has_forbidden_chars" != x; then
8846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8848  fi
8849
8850    # Output is in $new_path
8851
8852  windows_path="$new_path"
8853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8854    unix_path=`$CYGPATH -u "$windows_path"`
8855    new_path="$unix_path"
8856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8858    new_path="$unix_path"
8859  fi
8860
8861    # remove trailing .exe if any
8862    new_path="${new_path/%.exe/}"
8863
8864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8866  fi
8867
8868  else
8869    # We're on a posix platform. Hooray! :)
8870    # First separate the path from the arguments. This will split at the first
8871    # space.
8872    complete="$FOUND_MAKE"
8873    path="${complete%% *}"
8874    tmp="$complete EOL"
8875    arguments="${tmp#* }"
8876
8877    # Cannot rely on the command "which" here since it doesn't always work.
8878    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8879    if test -z "$is_absolute_path"; then
8880      # Path to executable is not absolute. Find it.
8881      IFS_save="$IFS"
8882      IFS=:
8883      for p in $PATH; do
8884        if test -f "$p/$path" && test -x "$p/$path"; then
8885          new_path="$p/$path"
8886          break
8887        fi
8888      done
8889      IFS="$IFS_save"
8890    else
8891      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8892$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8893      new_path="$path"
8894    fi
8895
8896    if test "x$new_path" = x; then
8897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8899        has_space=`$ECHO "$complete" | $GREP " "`
8900        if test "x$has_space" != x; then
8901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8903        fi
8904        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8905      fi
8906  fi
8907
8908      # Now join together the path and the arguments once again
8909      if test "x$arguments" != xEOL; then
8910        new_complete="$new_path ${arguments% *}"
8911      else
8912        new_complete="$new_path"
8913      fi
8914
8915  if test "x$complete" != "x$new_complete"; then
8916      FOUND_MAKE="$new_complete"
8917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8918$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8919    fi
8920
8921        fi
8922      fi
8923    fi
8924  fi
8925
8926
8927    if test "x$FOUND_MAKE" = x; then
8928      for ac_prog in make
8929do
8930  # Extract the first word of "$ac_prog", so it can be a program name with args.
8931set dummy $ac_prog; ac_word=$2
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8933$as_echo_n "checking for $ac_word... " >&6; }
8934if ${ac_cv_path_CHECK_MAKE+:} false; then :
8935  $as_echo_n "(cached) " >&6
8936else
8937  case $CHECK_MAKE in
8938  [\\/]* | ?:[\\/]*)
8939  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8940  ;;
8941  *)
8942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8943for as_dir in $PATH
8944do
8945  IFS=$as_save_IFS
8946  test -z "$as_dir" && as_dir=.
8947    for ac_exec_ext in '' $ac_executable_extensions; do
8948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8949    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8951    break 2
8952  fi
8953done
8954  done
8955IFS=$as_save_IFS
8956
8957  ;;
8958esac
8959fi
8960CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8961if test -n "$CHECK_MAKE"; then
8962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8963$as_echo "$CHECK_MAKE" >&6; }
8964else
8965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8966$as_echo "no" >&6; }
8967fi
8968
8969
8970  test -n "$CHECK_MAKE" && break
8971done
8972
8973
8974  MAKE_CANDIDATE=""$CHECK_MAKE""
8975  DESCRIPTION="make in PATH"
8976  if test "x$MAKE_CANDIDATE" != x; then
8977    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8978$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8979    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8980    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8981    if test "x$IS_GNU_MAKE" = x; then
8982      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8983$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8984    else
8985      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8986      if test "x$IS_MODERN_MAKE" = x; then
8987        { $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
8988$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;}
8989      else
8990        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8991          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8992            MAKE_EXPECTED_ENV='cygwin'
8993          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8994            MAKE_EXPECTED_ENV='msys'
8995          else
8996            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8997          fi
8998          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8999          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9000        else
9001          # Not relevant for non-Windows
9002          IS_MAKE_CORRECT_ENV=true
9003        fi
9004        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9005          { $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
9006$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;}
9007        else
9008          FOUND_MAKE=$MAKE_CANDIDATE
9009
9010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9011
9012  # First separate the path from the arguments. This will split at the first
9013  # space.
9014  complete="$FOUND_MAKE"
9015  path="${complete%% *}"
9016  tmp="$complete EOL"
9017  arguments="${tmp#* }"
9018
9019  # Input might be given as Windows format, start by converting to
9020  # unix format.
9021  new_path=`$CYGPATH -u "$path"`
9022
9023  # Now try to locate executable using which
9024  new_path=`$WHICH "$new_path" 2> /dev/null`
9025  # bat and cmd files are not always considered executable in cygwin causing which
9026  # to not find them
9027  if test "x$new_path" = x \
9028           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9029           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9030    new_path=`$CYGPATH -u "$path"`
9031  fi
9032  if test "x$new_path" = x; then
9033    # Oops. Which didn't find the executable.
9034    # The splitting of arguments from the executable at a space might have been incorrect,
9035    # since paths with space are more likely in Windows. Give it another try with the whole
9036    # argument.
9037    path="$complete"
9038    arguments="EOL"
9039    new_path=`$CYGPATH -u "$path"`
9040    new_path=`$WHICH "$new_path" 2> /dev/null`
9041    # bat and cmd files are not always considered executable in cygwin causing which
9042    # to not find them
9043    if test "x$new_path" = x \
9044             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9045             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9046      new_path=`$CYGPATH -u "$path"`
9047    fi
9048    if test "x$new_path" = x; then
9049      # It's still not found. Now this is an unrecoverable error.
9050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9052      has_space=`$ECHO "$complete" | $GREP " "`
9053      if test "x$has_space" != x; then
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9056      fi
9057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9058    fi
9059  fi
9060
9061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9064  # "foo.exe" is OK but "foo" is an error.
9065  #
9066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9067  # It is also a way to make sure we got the proper file name for the real test later on.
9068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9069  if test "x$test_shortpath" = x; then
9070    # Short path failed, file does not exist as specified.
9071    # Try adding .exe or .cmd
9072    if test -f "${new_path}.exe"; then
9073       input_to_shortpath="${new_path}.exe"
9074    elif test -f "${new_path}.cmd"; then
9075       input_to_shortpath="${new_path}.cmd"
9076    else
9077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9082    fi
9083  else
9084    input_to_shortpath="$new_path"
9085  fi
9086
9087  # Call helper function which possibly converts this using DOS-style short mode.
9088  # If so, the updated path is stored in $new_path.
9089  new_path="$input_to_shortpath"
9090
9091  input_path="$input_to_shortpath"
9092  # Check if we need to convert this using DOS-style short mode. If the path
9093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9094  # take no chances and rewrite it.
9095  # Note: m4 eats our [], so we need to use [ and ] instead.
9096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9097  if test "x$has_forbidden_chars" != x; then
9098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9102      # Going to short mode and back again did indeed matter. Since short mode is
9103      # case insensitive, let's make it lowercase to improve readability.
9104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9105      # Now convert it back to Unix-stile (cygpath)
9106      input_path=`$CYGPATH -u "$shortmode_path"`
9107      new_path="$input_path"
9108    fi
9109  fi
9110
9111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9112  if test "x$test_cygdrive_prefix" = x; then
9113    # As a simple fix, exclude /usr/bin since it's not a real path.
9114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9116      # a path prefixed by /cygdrive for fixpath to work.
9117      new_path="$CYGWIN_ROOT_PATH$input_path"
9118    fi
9119  fi
9120
9121  # remove trailing .exe if any
9122  new_path="${new_path/%.exe/}"
9123
9124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9125
9126  # First separate the path from the arguments. This will split at the first
9127  # space.
9128  complete="$FOUND_MAKE"
9129  path="${complete%% *}"
9130  tmp="$complete EOL"
9131  arguments="${tmp#* }"
9132
9133  # Input might be given as Windows format, start by converting to
9134  # unix format.
9135  new_path="$path"
9136
9137  windows_path="$new_path"
9138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9139    unix_path=`$CYGPATH -u "$windows_path"`
9140    new_path="$unix_path"
9141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9143    new_path="$unix_path"
9144  fi
9145
9146
9147  # Now try to locate executable using which
9148  new_path=`$WHICH "$new_path" 2> /dev/null`
9149
9150  if test "x$new_path" = x; then
9151    # Oops. Which didn't find the executable.
9152    # The splitting of arguments from the executable at a space might have been incorrect,
9153    # since paths with space are more likely in Windows. Give it another try with the whole
9154    # argument.
9155    path="$complete"
9156    arguments="EOL"
9157    new_path="$path"
9158
9159  windows_path="$new_path"
9160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9161    unix_path=`$CYGPATH -u "$windows_path"`
9162    new_path="$unix_path"
9163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9165    new_path="$unix_path"
9166  fi
9167
9168
9169    new_path=`$WHICH "$new_path" 2> /dev/null`
9170
9171    if test "x$new_path" = x; then
9172      # It's still not found. Now this is an unrecoverable error.
9173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9174$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9175      has_space=`$ECHO "$complete" | $GREP " "`
9176      if test "x$has_space" != x; then
9177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9179      fi
9180      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9181    fi
9182  fi
9183
9184  # Now new_path has a complete unix path to the binary
9185  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9186    # Keep paths in /bin as-is, but remove trailing .exe if any
9187    new_path="${new_path/%.exe/}"
9188    # Do not save /bin paths to all_fixpath_prefixes!
9189  else
9190    # Not in mixed or Windows style, start by that.
9191    new_path=`cmd //c echo $new_path`
9192
9193  input_path="$new_path"
9194  # Check if we need to convert this using DOS-style short mode. If the path
9195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9196  # take no chances and rewrite it.
9197  # Note: m4 eats our [], so we need to use [ and ] instead.
9198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9199  if test "x$has_forbidden_chars" != x; then
9200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9202  fi
9203
9204    # Output is in $new_path
9205
9206  windows_path="$new_path"
9207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9208    unix_path=`$CYGPATH -u "$windows_path"`
9209    new_path="$unix_path"
9210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9212    new_path="$unix_path"
9213  fi
9214
9215    # remove trailing .exe if any
9216    new_path="${new_path/%.exe/}"
9217
9218    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9219    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9220  fi
9221
9222  else
9223    # We're on a posix platform. Hooray! :)
9224    # First separate the path from the arguments. This will split at the first
9225    # space.
9226    complete="$FOUND_MAKE"
9227    path="${complete%% *}"
9228    tmp="$complete EOL"
9229    arguments="${tmp#* }"
9230
9231    # Cannot rely on the command "which" here since it doesn't always work.
9232    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9233    if test -z "$is_absolute_path"; then
9234      # Path to executable is not absolute. Find it.
9235      IFS_save="$IFS"
9236      IFS=:
9237      for p in $PATH; do
9238        if test -f "$p/$path" && test -x "$p/$path"; then
9239          new_path="$p/$path"
9240          break
9241        fi
9242      done
9243      IFS="$IFS_save"
9244    else
9245      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9246$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9247      new_path="$path"
9248    fi
9249
9250    if test "x$new_path" = x; then
9251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9252$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9253        has_space=`$ECHO "$complete" | $GREP " "`
9254        if test "x$has_space" != x; then
9255          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9257        fi
9258        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9259      fi
9260  fi
9261
9262      # Now join together the path and the arguments once again
9263      if test "x$arguments" != xEOL; then
9264        new_complete="$new_path ${arguments% *}"
9265      else
9266        new_complete="$new_path"
9267      fi
9268
9269  if test "x$complete" != "x$new_complete"; then
9270      FOUND_MAKE="$new_complete"
9271      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9272$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9273    fi
9274
9275        fi
9276      fi
9277    fi
9278  fi
9279
9280    fi
9281
9282    if test "x$FOUND_MAKE" = x; then
9283      if test "x$TOOLS_DIR" != x; then
9284        # We have a tools-dir, check that as well before giving up.
9285        OLD_PATH=$PATH
9286        PATH=$TOOLS_DIR:$PATH
9287        for ac_prog in gmake
9288do
9289  # Extract the first word of "$ac_prog", so it can be a program name with args.
9290set dummy $ac_prog; ac_word=$2
9291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9292$as_echo_n "checking for $ac_word... " >&6; }
9293if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9294  $as_echo_n "(cached) " >&6
9295else
9296  case $CHECK_TOOLSDIR_GMAKE in
9297  [\\/]* | ?:[\\/]*)
9298  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9299  ;;
9300  *)
9301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9302for as_dir in $PATH
9303do
9304  IFS=$as_save_IFS
9305  test -z "$as_dir" && as_dir=.
9306    for ac_exec_ext in '' $ac_executable_extensions; do
9307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9308    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9310    break 2
9311  fi
9312done
9313  done
9314IFS=$as_save_IFS
9315
9316  ;;
9317esac
9318fi
9319CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9320if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9322$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9323else
9324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9325$as_echo "no" >&6; }
9326fi
9327
9328
9329  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9330done
9331
9332
9333  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9334  DESCRIPTION="gmake in tools-dir"
9335  if test "x$MAKE_CANDIDATE" != x; then
9336    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9337$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9338    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9339    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9340    if test "x$IS_GNU_MAKE" = x; then
9341      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9342$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9343    else
9344      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9345      if test "x$IS_MODERN_MAKE" = x; then
9346        { $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
9347$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;}
9348      else
9349        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9350          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9351            MAKE_EXPECTED_ENV='cygwin'
9352          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9353            MAKE_EXPECTED_ENV='msys'
9354          else
9355            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9356          fi
9357          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9358          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9359        else
9360          # Not relevant for non-Windows
9361          IS_MAKE_CORRECT_ENV=true
9362        fi
9363        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9364          { $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
9365$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;}
9366        else
9367          FOUND_MAKE=$MAKE_CANDIDATE
9368
9369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9370
9371  # First separate the path from the arguments. This will split at the first
9372  # space.
9373  complete="$FOUND_MAKE"
9374  path="${complete%% *}"
9375  tmp="$complete EOL"
9376  arguments="${tmp#* }"
9377
9378  # Input might be given as Windows format, start by converting to
9379  # unix format.
9380  new_path=`$CYGPATH -u "$path"`
9381
9382  # Now try to locate executable using which
9383  new_path=`$WHICH "$new_path" 2> /dev/null`
9384  # bat and cmd files are not always considered executable in cygwin causing which
9385  # to not find them
9386  if test "x$new_path" = x \
9387           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9388           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9389    new_path=`$CYGPATH -u "$path"`
9390  fi
9391  if test "x$new_path" = x; then
9392    # Oops. Which didn't find the executable.
9393    # The splitting of arguments from the executable at a space might have been incorrect,
9394    # since paths with space are more likely in Windows. Give it another try with the whole
9395    # argument.
9396    path="$complete"
9397    arguments="EOL"
9398    new_path=`$CYGPATH -u "$path"`
9399    new_path=`$WHICH "$new_path" 2> /dev/null`
9400    # bat and cmd files are not always considered executable in cygwin causing which
9401    # to not find them
9402    if test "x$new_path" = x \
9403             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9404             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9405      new_path=`$CYGPATH -u "$path"`
9406    fi
9407    if test "x$new_path" = x; then
9408      # It's still not found. Now this is an unrecoverable error.
9409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9410$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9411      has_space=`$ECHO "$complete" | $GREP " "`
9412      if test "x$has_space" != x; then
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9415      fi
9416      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9417    fi
9418  fi
9419
9420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9423  # "foo.exe" is OK but "foo" is an error.
9424  #
9425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9426  # It is also a way to make sure we got the proper file name for the real test later on.
9427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9428  if test "x$test_shortpath" = x; then
9429    # Short path failed, file does not exist as specified.
9430    # Try adding .exe or .cmd
9431    if test -f "${new_path}.exe"; then
9432       input_to_shortpath="${new_path}.exe"
9433    elif test -f "${new_path}.cmd"; then
9434       input_to_shortpath="${new_path}.cmd"
9435    else
9436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9437$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9440      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9441    fi
9442  else
9443    input_to_shortpath="$new_path"
9444  fi
9445
9446  # Call helper function which possibly converts this using DOS-style short mode.
9447  # If so, the updated path is stored in $new_path.
9448  new_path="$input_to_shortpath"
9449
9450  input_path="$input_to_shortpath"
9451  # Check if we need to convert this using DOS-style short mode. If the path
9452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9453  # take no chances and rewrite it.
9454  # Note: m4 eats our [], so we need to use [ and ] instead.
9455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9456  if test "x$has_forbidden_chars" != x; then
9457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9461      # Going to short mode and back again did indeed matter. Since short mode is
9462      # case insensitive, let's make it lowercase to improve readability.
9463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9464      # Now convert it back to Unix-stile (cygpath)
9465      input_path=`$CYGPATH -u "$shortmode_path"`
9466      new_path="$input_path"
9467    fi
9468  fi
9469
9470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9471  if test "x$test_cygdrive_prefix" = x; then
9472    # As a simple fix, exclude /usr/bin since it's not a real path.
9473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9475      # a path prefixed by /cygdrive for fixpath to work.
9476      new_path="$CYGWIN_ROOT_PATH$input_path"
9477    fi
9478  fi
9479
9480  # remove trailing .exe if any
9481  new_path="${new_path/%.exe/}"
9482
9483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9484
9485  # First separate the path from the arguments. This will split at the first
9486  # space.
9487  complete="$FOUND_MAKE"
9488  path="${complete%% *}"
9489  tmp="$complete EOL"
9490  arguments="${tmp#* }"
9491
9492  # Input might be given as Windows format, start by converting to
9493  # unix format.
9494  new_path="$path"
9495
9496  windows_path="$new_path"
9497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9498    unix_path=`$CYGPATH -u "$windows_path"`
9499    new_path="$unix_path"
9500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9502    new_path="$unix_path"
9503  fi
9504
9505
9506  # Now try to locate executable using which
9507  new_path=`$WHICH "$new_path" 2> /dev/null`
9508
9509  if test "x$new_path" = x; then
9510    # Oops. Which didn't find the executable.
9511    # The splitting of arguments from the executable at a space might have been incorrect,
9512    # since paths with space are more likely in Windows. Give it another try with the whole
9513    # argument.
9514    path="$complete"
9515    arguments="EOL"
9516    new_path="$path"
9517
9518  windows_path="$new_path"
9519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9520    unix_path=`$CYGPATH -u "$windows_path"`
9521    new_path="$unix_path"
9522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9524    new_path="$unix_path"
9525  fi
9526
9527
9528    new_path=`$WHICH "$new_path" 2> /dev/null`
9529
9530    if test "x$new_path" = x; then
9531      # It's still not found. Now this is an unrecoverable error.
9532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9534      has_space=`$ECHO "$complete" | $GREP " "`
9535      if test "x$has_space" != x; then
9536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9538      fi
9539      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9540    fi
9541  fi
9542
9543  # Now new_path has a complete unix path to the binary
9544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9545    # Keep paths in /bin as-is, but remove trailing .exe if any
9546    new_path="${new_path/%.exe/}"
9547    # Do not save /bin paths to all_fixpath_prefixes!
9548  else
9549    # Not in mixed or Windows style, start by that.
9550    new_path=`cmd //c echo $new_path`
9551
9552  input_path="$new_path"
9553  # Check if we need to convert this using DOS-style short mode. If the path
9554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9555  # take no chances and rewrite it.
9556  # Note: m4 eats our [], so we need to use [ and ] instead.
9557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9558  if test "x$has_forbidden_chars" != x; then
9559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9561  fi
9562
9563    # Output is in $new_path
9564
9565  windows_path="$new_path"
9566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9567    unix_path=`$CYGPATH -u "$windows_path"`
9568    new_path="$unix_path"
9569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9571    new_path="$unix_path"
9572  fi
9573
9574    # remove trailing .exe if any
9575    new_path="${new_path/%.exe/}"
9576
9577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9579  fi
9580
9581  else
9582    # We're on a posix platform. Hooray! :)
9583    # First separate the path from the arguments. This will split at the first
9584    # space.
9585    complete="$FOUND_MAKE"
9586    path="${complete%% *}"
9587    tmp="$complete EOL"
9588    arguments="${tmp#* }"
9589
9590    # Cannot rely on the command "which" here since it doesn't always work.
9591    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9592    if test -z "$is_absolute_path"; then
9593      # Path to executable is not absolute. Find it.
9594      IFS_save="$IFS"
9595      IFS=:
9596      for p in $PATH; do
9597        if test -f "$p/$path" && test -x "$p/$path"; then
9598          new_path="$p/$path"
9599          break
9600        fi
9601      done
9602      IFS="$IFS_save"
9603    else
9604      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9605$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9606      new_path="$path"
9607    fi
9608
9609    if test "x$new_path" = x; then
9610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9611$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9612        has_space=`$ECHO "$complete" | $GREP " "`
9613        if test "x$has_space" != x; then
9614          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9616        fi
9617        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9618      fi
9619  fi
9620
9621      # Now join together the path and the arguments once again
9622      if test "x$arguments" != xEOL; then
9623        new_complete="$new_path ${arguments% *}"
9624      else
9625        new_complete="$new_path"
9626      fi
9627
9628  if test "x$complete" != "x$new_complete"; then
9629      FOUND_MAKE="$new_complete"
9630      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9631$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9632    fi
9633
9634        fi
9635      fi
9636    fi
9637  fi
9638
9639        if test "x$FOUND_MAKE" = x; then
9640          for ac_prog in make
9641do
9642  # Extract the first word of "$ac_prog", so it can be a program name with args.
9643set dummy $ac_prog; ac_word=$2
9644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9645$as_echo_n "checking for $ac_word... " >&6; }
9646if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9647  $as_echo_n "(cached) " >&6
9648else
9649  case $CHECK_TOOLSDIR_MAKE in
9650  [\\/]* | ?:[\\/]*)
9651  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9652  ;;
9653  *)
9654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9655for as_dir in $PATH
9656do
9657  IFS=$as_save_IFS
9658  test -z "$as_dir" && as_dir=.
9659    for ac_exec_ext in '' $ac_executable_extensions; do
9660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9661    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9663    break 2
9664  fi
9665done
9666  done
9667IFS=$as_save_IFS
9668
9669  ;;
9670esac
9671fi
9672CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9673if test -n "$CHECK_TOOLSDIR_MAKE"; then
9674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9675$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9676else
9677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9678$as_echo "no" >&6; }
9679fi
9680
9681
9682  test -n "$CHECK_TOOLSDIR_MAKE" && break
9683done
9684
9685
9686  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9687  DESCRIPTION="make in tools-dir"
9688  if test "x$MAKE_CANDIDATE" != x; then
9689    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9690$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9691    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9692    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9693    if test "x$IS_GNU_MAKE" = x; then
9694      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9695$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9696    else
9697      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9698      if test "x$IS_MODERN_MAKE" = x; then
9699        { $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
9700$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;}
9701      else
9702        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9703          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9704            MAKE_EXPECTED_ENV='cygwin'
9705          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9706            MAKE_EXPECTED_ENV='msys'
9707          else
9708            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9709          fi
9710          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9711          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9712        else
9713          # Not relevant for non-Windows
9714          IS_MAKE_CORRECT_ENV=true
9715        fi
9716        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9717          { $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
9718$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;}
9719        else
9720          FOUND_MAKE=$MAKE_CANDIDATE
9721
9722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9723
9724  # First separate the path from the arguments. This will split at the first
9725  # space.
9726  complete="$FOUND_MAKE"
9727  path="${complete%% *}"
9728  tmp="$complete EOL"
9729  arguments="${tmp#* }"
9730
9731  # Input might be given as Windows format, start by converting to
9732  # unix format.
9733  new_path=`$CYGPATH -u "$path"`
9734
9735  # Now try to locate executable using which
9736  new_path=`$WHICH "$new_path" 2> /dev/null`
9737  # bat and cmd files are not always considered executable in cygwin causing which
9738  # to not find them
9739  if test "x$new_path" = x \
9740           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9741           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9742    new_path=`$CYGPATH -u "$path"`
9743  fi
9744  if test "x$new_path" = x; then
9745    # Oops. Which didn't find the executable.
9746    # The splitting of arguments from the executable at a space might have been incorrect,
9747    # since paths with space are more likely in Windows. Give it another try with the whole
9748    # argument.
9749    path="$complete"
9750    arguments="EOL"
9751    new_path=`$CYGPATH -u "$path"`
9752    new_path=`$WHICH "$new_path" 2> /dev/null`
9753    # bat and cmd files are not always considered executable in cygwin causing which
9754    # to not find them
9755    if test "x$new_path" = x \
9756             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9757             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9758      new_path=`$CYGPATH -u "$path"`
9759    fi
9760    if test "x$new_path" = x; then
9761      # It's still not found. Now this is an unrecoverable error.
9762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9764      has_space=`$ECHO "$complete" | $GREP " "`
9765      if test "x$has_space" != x; then
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9768      fi
9769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9770    fi
9771  fi
9772
9773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9776  # "foo.exe" is OK but "foo" is an error.
9777  #
9778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9779  # It is also a way to make sure we got the proper file name for the real test later on.
9780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9781  if test "x$test_shortpath" = x; then
9782    # Short path failed, file does not exist as specified.
9783    # Try adding .exe or .cmd
9784    if test -f "${new_path}.exe"; then
9785       input_to_shortpath="${new_path}.exe"
9786    elif test -f "${new_path}.cmd"; then
9787       input_to_shortpath="${new_path}.cmd"
9788    else
9789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9790$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9793      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9794    fi
9795  else
9796    input_to_shortpath="$new_path"
9797  fi
9798
9799  # Call helper function which possibly converts this using DOS-style short mode.
9800  # If so, the updated path is stored in $new_path.
9801  new_path="$input_to_shortpath"
9802
9803  input_path="$input_to_shortpath"
9804  # Check if we need to convert this using DOS-style short mode. If the path
9805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9806  # take no chances and rewrite it.
9807  # Note: m4 eats our [], so we need to use [ and ] instead.
9808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9809  if test "x$has_forbidden_chars" != x; then
9810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9814      # Going to short mode and back again did indeed matter. Since short mode is
9815      # case insensitive, let's make it lowercase to improve readability.
9816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9817      # Now convert it back to Unix-stile (cygpath)
9818      input_path=`$CYGPATH -u "$shortmode_path"`
9819      new_path="$input_path"
9820    fi
9821  fi
9822
9823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9824  if test "x$test_cygdrive_prefix" = x; then
9825    # As a simple fix, exclude /usr/bin since it's not a real path.
9826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9828      # a path prefixed by /cygdrive for fixpath to work.
9829      new_path="$CYGWIN_ROOT_PATH$input_path"
9830    fi
9831  fi
9832
9833  # remove trailing .exe if any
9834  new_path="${new_path/%.exe/}"
9835
9836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9837
9838  # First separate the path from the arguments. This will split at the first
9839  # space.
9840  complete="$FOUND_MAKE"
9841  path="${complete%% *}"
9842  tmp="$complete EOL"
9843  arguments="${tmp#* }"
9844
9845  # Input might be given as Windows format, start by converting to
9846  # unix format.
9847  new_path="$path"
9848
9849  windows_path="$new_path"
9850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9851    unix_path=`$CYGPATH -u "$windows_path"`
9852    new_path="$unix_path"
9853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9855    new_path="$unix_path"
9856  fi
9857
9858
9859  # Now try to locate executable using which
9860  new_path=`$WHICH "$new_path" 2> /dev/null`
9861
9862  if test "x$new_path" = x; then
9863    # Oops. Which didn't find the executable.
9864    # The splitting of arguments from the executable at a space might have been incorrect,
9865    # since paths with space are more likely in Windows. Give it another try with the whole
9866    # argument.
9867    path="$complete"
9868    arguments="EOL"
9869    new_path="$path"
9870
9871  windows_path="$new_path"
9872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9873    unix_path=`$CYGPATH -u "$windows_path"`
9874    new_path="$unix_path"
9875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9877    new_path="$unix_path"
9878  fi
9879
9880
9881    new_path=`$WHICH "$new_path" 2> /dev/null`
9882
9883    if test "x$new_path" = x; then
9884      # It's still not found. Now this is an unrecoverable error.
9885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9887      has_space=`$ECHO "$complete" | $GREP " "`
9888      if test "x$has_space" != x; then
9889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9891      fi
9892      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9893    fi
9894  fi
9895
9896  # Now new_path has a complete unix path to the binary
9897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9898    # Keep paths in /bin as-is, but remove trailing .exe if any
9899    new_path="${new_path/%.exe/}"
9900    # Do not save /bin paths to all_fixpath_prefixes!
9901  else
9902    # Not in mixed or Windows style, start by that.
9903    new_path=`cmd //c echo $new_path`
9904
9905  input_path="$new_path"
9906  # Check if we need to convert this using DOS-style short mode. If the path
9907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9908  # take no chances and rewrite it.
9909  # Note: m4 eats our [], so we need to use [ and ] instead.
9910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9911  if test "x$has_forbidden_chars" != x; then
9912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9914  fi
9915
9916    # Output is in $new_path
9917
9918  windows_path="$new_path"
9919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9920    unix_path=`$CYGPATH -u "$windows_path"`
9921    new_path="$unix_path"
9922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9924    new_path="$unix_path"
9925  fi
9926
9927    # remove trailing .exe if any
9928    new_path="${new_path/%.exe/}"
9929
9930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9932  fi
9933
9934  else
9935    # We're on a posix platform. Hooray! :)
9936    # First separate the path from the arguments. This will split at the first
9937    # space.
9938    complete="$FOUND_MAKE"
9939    path="${complete%% *}"
9940    tmp="$complete EOL"
9941    arguments="${tmp#* }"
9942
9943    # Cannot rely on the command "which" here since it doesn't always work.
9944    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9945    if test -z "$is_absolute_path"; then
9946      # Path to executable is not absolute. Find it.
9947      IFS_save="$IFS"
9948      IFS=:
9949      for p in $PATH; do
9950        if test -f "$p/$path" && test -x "$p/$path"; then
9951          new_path="$p/$path"
9952          break
9953        fi
9954      done
9955      IFS="$IFS_save"
9956    else
9957      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9958$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9959      new_path="$path"
9960    fi
9961
9962    if test "x$new_path" = x; then
9963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9964$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9965        has_space=`$ECHO "$complete" | $GREP " "`
9966        if test "x$has_space" != x; then
9967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9969        fi
9970        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9971      fi
9972  fi
9973
9974      # Now join together the path and the arguments once again
9975      if test "x$arguments" != xEOL; then
9976        new_complete="$new_path ${arguments% *}"
9977      else
9978        new_complete="$new_path"
9979      fi
9980
9981  if test "x$complete" != "x$new_complete"; then
9982      FOUND_MAKE="$new_complete"
9983      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9984$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9985    fi
9986
9987        fi
9988      fi
9989    fi
9990  fi
9991
9992        fi
9993        PATH=$OLD_PATH
9994      fi
9995    fi
9996
9997    if test "x$FOUND_MAKE" = x; then
9998      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
9999    fi
10000  fi
10001
10002  MAKE=$FOUND_MAKE
10003
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10005$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10006
10007
10008
10009    # Test if find supports -delete
10010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10011$as_echo_n "checking if find supports -delete... " >&6; }
10012    FIND_DELETE="-delete"
10013
10014    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10015
10016    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10017
10018    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10019    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10020        # No, it does not.
10021        rm $DELETEDIR/TestIfFindSupportsDelete
10022        FIND_DELETE="-exec rm \{\} \+"
10023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024$as_echo "no" >&6; }
10025    else
10026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10027$as_echo "yes" >&6; }
10028    fi
10029    rmdir $DELETEDIR
10030
10031
10032
10033# These tools might not be installed by default,
10034# need hint on how to install them.
10035
10036    for ac_prog in unzip
10037do
10038  # Extract the first word of "$ac_prog", so it can be a program name with args.
10039set dummy $ac_prog; ac_word=$2
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10041$as_echo_n "checking for $ac_word... " >&6; }
10042if ${ac_cv_path_UNZIP+:} false; then :
10043  $as_echo_n "(cached) " >&6
10044else
10045  case $UNZIP in
10046  [\\/]* | ?:[\\/]*)
10047  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10048  ;;
10049  *)
10050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10051for as_dir in $PATH
10052do
10053  IFS=$as_save_IFS
10054  test -z "$as_dir" && as_dir=.
10055    for ac_exec_ext in '' $ac_executable_extensions; do
10056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10057    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10059    break 2
10060  fi
10061done
10062  done
10063IFS=$as_save_IFS
10064
10065  ;;
10066esac
10067fi
10068UNZIP=$ac_cv_path_UNZIP
10069if test -n "$UNZIP"; then
10070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10071$as_echo "$UNZIP" >&6; }
10072else
10073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10074$as_echo "no" >&6; }
10075fi
10076
10077
10078  test -n "$UNZIP" && break
10079done
10080
10081
10082    if test "x$UNZIP" = x; then
10083        if test "xunzip" = x; then
10084          PROG_NAME=unzip
10085        else
10086          PROG_NAME=unzip
10087        fi
10088        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10089$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10090        as_fn_error $? "Cannot continue" "$LINENO" 5
10091    fi
10092
10093
10094
10095    for ac_prog in zip
10096do
10097  # Extract the first word of "$ac_prog", so it can be a program name with args.
10098set dummy $ac_prog; ac_word=$2
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10100$as_echo_n "checking for $ac_word... " >&6; }
10101if ${ac_cv_path_ZIP+:} false; then :
10102  $as_echo_n "(cached) " >&6
10103else
10104  case $ZIP in
10105  [\\/]* | ?:[\\/]*)
10106  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10107  ;;
10108  *)
10109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10110for as_dir in $PATH
10111do
10112  IFS=$as_save_IFS
10113  test -z "$as_dir" && as_dir=.
10114    for ac_exec_ext in '' $ac_executable_extensions; do
10115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10116    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10118    break 2
10119  fi
10120done
10121  done
10122IFS=$as_save_IFS
10123
10124  ;;
10125esac
10126fi
10127ZIP=$ac_cv_path_ZIP
10128if test -n "$ZIP"; then
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10130$as_echo "$ZIP" >&6; }
10131else
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134fi
10135
10136
10137  test -n "$ZIP" && break
10138done
10139
10140
10141    if test "x$ZIP" = x; then
10142        if test "xzip" = x; then
10143          PROG_NAME=zip
10144        else
10145          PROG_NAME=zip
10146        fi
10147        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10148$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10149        as_fn_error $? "Cannot continue" "$LINENO" 5
10150    fi
10151
10152
10153
10154# Non-required basic tools
10155
10156# Extract the first word of "ldd", so it can be a program name with args.
10157set dummy ldd; ac_word=$2
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10159$as_echo_n "checking for $ac_word... " >&6; }
10160if ${ac_cv_path_LDD+:} false; then :
10161  $as_echo_n "(cached) " >&6
10162else
10163  case $LDD in
10164  [\\/]* | ?:[\\/]*)
10165  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10166  ;;
10167  *)
10168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10169for as_dir in $PATH
10170do
10171  IFS=$as_save_IFS
10172  test -z "$as_dir" && as_dir=.
10173    for ac_exec_ext in '' $ac_executable_extensions; do
10174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10175    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10177    break 2
10178  fi
10179done
10180  done
10181IFS=$as_save_IFS
10182
10183  ;;
10184esac
10185fi
10186LDD=$ac_cv_path_LDD
10187if test -n "$LDD"; then
10188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10189$as_echo "$LDD" >&6; }
10190else
10191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192$as_echo "no" >&6; }
10193fi
10194
10195
10196if test "x$LDD" = "x"; then
10197    # List shared lib dependencies is used for
10198    # debug output and checking for forbidden dependencies.
10199    # We can build without it.
10200    LDD="true"
10201fi
10202# Extract the first word of "otool", so it can be a program name with args.
10203set dummy otool; ac_word=$2
10204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10205$as_echo_n "checking for $ac_word... " >&6; }
10206if ${ac_cv_path_OTOOL+:} false; then :
10207  $as_echo_n "(cached) " >&6
10208else
10209  case $OTOOL in
10210  [\\/]* | ?:[\\/]*)
10211  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10212  ;;
10213  *)
10214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10215for as_dir in $PATH
10216do
10217  IFS=$as_save_IFS
10218  test -z "$as_dir" && as_dir=.
10219    for ac_exec_ext in '' $ac_executable_extensions; do
10220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10221    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10223    break 2
10224  fi
10225done
10226  done
10227IFS=$as_save_IFS
10228
10229  ;;
10230esac
10231fi
10232OTOOL=$ac_cv_path_OTOOL
10233if test -n "$OTOOL"; then
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10235$as_echo "$OTOOL" >&6; }
10236else
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
10239fi
10240
10241
10242if test "x$OTOOL" = "x"; then
10243   OTOOL="true"
10244fi
10245for ac_prog in readelf greadelf
10246do
10247  # Extract the first word of "$ac_prog", so it can be a program name with args.
10248set dummy $ac_prog; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if ${ac_cv_path_READELF+:} false; then :
10252  $as_echo_n "(cached) " >&6
10253else
10254  case $READELF in
10255  [\\/]* | ?:[\\/]*)
10256  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10257  ;;
10258  *)
10259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262  IFS=$as_save_IFS
10263  test -z "$as_dir" && as_dir=.
10264    for ac_exec_ext in '' $ac_executable_extensions; do
10265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268    break 2
10269  fi
10270done
10271  done
10272IFS=$as_save_IFS
10273
10274  ;;
10275esac
10276fi
10277READELF=$ac_cv_path_READELF
10278if test -n "$READELF"; then
10279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10280$as_echo "$READELF" >&6; }
10281else
10282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286
10287  test -n "$READELF" && break
10288done
10289
10290# Extract the first word of "hg", so it can be a program name with args.
10291set dummy hg; ac_word=$2
10292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10293$as_echo_n "checking for $ac_word... " >&6; }
10294if ${ac_cv_path_HG+:} false; then :
10295  $as_echo_n "(cached) " >&6
10296else
10297  case $HG in
10298  [\\/]* | ?:[\\/]*)
10299  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10300  ;;
10301  *)
10302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10303for as_dir in $PATH
10304do
10305  IFS=$as_save_IFS
10306  test -z "$as_dir" && as_dir=.
10307    for ac_exec_ext in '' $ac_executable_extensions; do
10308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10309    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10311    break 2
10312  fi
10313done
10314  done
10315IFS=$as_save_IFS
10316
10317  ;;
10318esac
10319fi
10320HG=$ac_cv_path_HG
10321if test -n "$HG"; then
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10323$as_echo "$HG" >&6; }
10324else
10325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10326$as_echo "no" >&6; }
10327fi
10328
10329
10330# Extract the first word of "stat", so it can be a program name with args.
10331set dummy stat; ac_word=$2
10332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10333$as_echo_n "checking for $ac_word... " >&6; }
10334if ${ac_cv_path_STAT+:} false; then :
10335  $as_echo_n "(cached) " >&6
10336else
10337  case $STAT in
10338  [\\/]* | ?:[\\/]*)
10339  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10340  ;;
10341  *)
10342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10343for as_dir in $PATH
10344do
10345  IFS=$as_save_IFS
10346  test -z "$as_dir" && as_dir=.
10347    for ac_exec_ext in '' $ac_executable_extensions; do
10348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10349    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10351    break 2
10352  fi
10353done
10354  done
10355IFS=$as_save_IFS
10356
10357  ;;
10358esac
10359fi
10360STAT=$ac_cv_path_STAT
10361if test -n "$STAT"; then
10362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10363$as_echo "$STAT" >&6; }
10364else
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366$as_echo "no" >&6; }
10367fi
10368
10369
10370# Extract the first word of "time", so it can be a program name with args.
10371set dummy time; ac_word=$2
10372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10373$as_echo_n "checking for $ac_word... " >&6; }
10374if ${ac_cv_path_TIME+:} false; then :
10375  $as_echo_n "(cached) " >&6
10376else
10377  case $TIME in
10378  [\\/]* | ?:[\\/]*)
10379  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10380  ;;
10381  *)
10382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10383for as_dir in $PATH
10384do
10385  IFS=$as_save_IFS
10386  test -z "$as_dir" && as_dir=.
10387    for ac_exec_ext in '' $ac_executable_extensions; do
10388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10389    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10391    break 2
10392  fi
10393done
10394  done
10395IFS=$as_save_IFS
10396
10397  ;;
10398esac
10399fi
10400TIME=$ac_cv_path_TIME
10401if test -n "$TIME"; then
10402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10403$as_echo "$TIME" >&6; }
10404else
10405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
10407fi
10408
10409
10410# Check if it's GNU time
10411IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10412if test "x$IS_GNU_TIME" != x; then
10413  IS_GNU_TIME=yes
10414else
10415  IS_GNU_TIME=no
10416fi
10417
10418
10419if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10420
10421    for ac_prog in comm
10422do
10423  # Extract the first word of "$ac_prog", so it can be a program name with args.
10424set dummy $ac_prog; ac_word=$2
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426$as_echo_n "checking for $ac_word... " >&6; }
10427if ${ac_cv_path_COMM+:} false; then :
10428  $as_echo_n "(cached) " >&6
10429else
10430  case $COMM in
10431  [\\/]* | ?:[\\/]*)
10432  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10433  ;;
10434  *)
10435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10436for as_dir in $PATH
10437do
10438  IFS=$as_save_IFS
10439  test -z "$as_dir" && as_dir=.
10440    for ac_exec_ext in '' $ac_executable_extensions; do
10441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10442    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10444    break 2
10445  fi
10446done
10447  done
10448IFS=$as_save_IFS
10449
10450  ;;
10451esac
10452fi
10453COMM=$ac_cv_path_COMM
10454if test -n "$COMM"; then
10455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10456$as_echo "$COMM" >&6; }
10457else
10458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
10460fi
10461
10462
10463  test -n "$COMM" && break
10464done
10465
10466
10467    if test "x$COMM" = x; then
10468        if test "xcomm" = x; then
10469          PROG_NAME=comm
10470        else
10471          PROG_NAME=comm
10472        fi
10473        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10474$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10475        as_fn_error $? "Cannot continue" "$LINENO" 5
10476    fi
10477
10478
10479fi
10480
10481if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10482
10483    for ac_prog in xattr
10484do
10485  # Extract the first word of "$ac_prog", so it can be a program name with args.
10486set dummy $ac_prog; ac_word=$2
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488$as_echo_n "checking for $ac_word... " >&6; }
10489if ${ac_cv_path_XATTR+:} false; then :
10490  $as_echo_n "(cached) " >&6
10491else
10492  case $XATTR in
10493  [\\/]* | ?:[\\/]*)
10494  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10495  ;;
10496  *)
10497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498for as_dir in $PATH
10499do
10500  IFS=$as_save_IFS
10501  test -z "$as_dir" && as_dir=.
10502    for ac_exec_ext in '' $ac_executable_extensions; do
10503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10504    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506    break 2
10507  fi
10508done
10509  done
10510IFS=$as_save_IFS
10511
10512  ;;
10513esac
10514fi
10515XATTR=$ac_cv_path_XATTR
10516if test -n "$XATTR"; then
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10518$as_echo "$XATTR" >&6; }
10519else
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
10522fi
10523
10524
10525  test -n "$XATTR" && break
10526done
10527
10528
10529    if test "x$XATTR" = x; then
10530        if test "xxattr" = x; then
10531          PROG_NAME=xattr
10532        else
10533          PROG_NAME=xattr
10534        fi
10535        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10536$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10537        as_fn_error $? "Cannot continue" "$LINENO" 5
10538    fi
10539
10540
10541  # Extract the first word of "codesign", so it can be a program name with args.
10542set dummy codesign; ac_word=$2
10543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10544$as_echo_n "checking for $ac_word... " >&6; }
10545if ${ac_cv_path_CODESIGN+:} false; then :
10546  $as_echo_n "(cached) " >&6
10547else
10548  case $CODESIGN in
10549  [\\/]* | ?:[\\/]*)
10550  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10551  ;;
10552  *)
10553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10554for as_dir in $PATH
10555do
10556  IFS=$as_save_IFS
10557  test -z "$as_dir" && as_dir=.
10558    for ac_exec_ext in '' $ac_executable_extensions; do
10559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10560    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10562    break 2
10563  fi
10564done
10565  done
10566IFS=$as_save_IFS
10567
10568  ;;
10569esac
10570fi
10571CODESIGN=$ac_cv_path_CODESIGN
10572if test -n "$CODESIGN"; then
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10574$as_echo "$CODESIGN" >&6; }
10575else
10576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577$as_echo "no" >&6; }
10578fi
10579
10580
10581  if test "x$CODESIGN" != "x"; then
10582    # Verify that the openjdk_codesign certificate is present
10583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10584$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10585    rm -f codesign-testfile
10586    touch codesign-testfile
10587    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10588    rm -f codesign-testfile
10589    if test "x$CODESIGN" = x; then
10590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
10592    else
10593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10594$as_echo "yes" >&6; }
10595    fi
10596  fi
10597fi
10598
10599
10600# Check if pkg-config is available.
10601
10602
10603if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10604	if test -n "$ac_tool_prefix"; then
10605  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10606set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10608$as_echo_n "checking for $ac_word... " >&6; }
10609if ${ac_cv_path_PKG_CONFIG+:} false; then :
10610  $as_echo_n "(cached) " >&6
10611else
10612  case $PKG_CONFIG in
10613  [\\/]* | ?:[\\/]*)
10614  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10615  ;;
10616  *)
10617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10618for as_dir in $PATH
10619do
10620  IFS=$as_save_IFS
10621  test -z "$as_dir" && as_dir=.
10622    for ac_exec_ext in '' $ac_executable_extensions; do
10623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10624    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10626    break 2
10627  fi
10628done
10629  done
10630IFS=$as_save_IFS
10631
10632  ;;
10633esac
10634fi
10635PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10636if test -n "$PKG_CONFIG"; then
10637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10638$as_echo "$PKG_CONFIG" >&6; }
10639else
10640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641$as_echo "no" >&6; }
10642fi
10643
10644
10645fi
10646if test -z "$ac_cv_path_PKG_CONFIG"; then
10647  ac_pt_PKG_CONFIG=$PKG_CONFIG
10648  # Extract the first word of "pkg-config", so it can be a program name with args.
10649set dummy pkg-config; ac_word=$2
10650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10651$as_echo_n "checking for $ac_word... " >&6; }
10652if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10653  $as_echo_n "(cached) " >&6
10654else
10655  case $ac_pt_PKG_CONFIG in
10656  [\\/]* | ?:[\\/]*)
10657  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10658  ;;
10659  *)
10660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10661for as_dir in $PATH
10662do
10663  IFS=$as_save_IFS
10664  test -z "$as_dir" && as_dir=.
10665    for ac_exec_ext in '' $ac_executable_extensions; do
10666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10667    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10669    break 2
10670  fi
10671done
10672  done
10673IFS=$as_save_IFS
10674
10675  ;;
10676esac
10677fi
10678ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10679if test -n "$ac_pt_PKG_CONFIG"; then
10680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10681$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10682else
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
10685fi
10686
10687  if test "x$ac_pt_PKG_CONFIG" = x; then
10688    PKG_CONFIG=""
10689  else
10690    case $cross_compiling:$ac_tool_warned in
10691yes:)
10692{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10693$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10694ac_tool_warned=yes ;;
10695esac
10696    PKG_CONFIG=$ac_pt_PKG_CONFIG
10697  fi
10698else
10699  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10700fi
10701
10702fi
10703if test -n "$PKG_CONFIG"; then
10704	_pkg_min_version=0.9.0
10705	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10706$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10707	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10708		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10709$as_echo "yes" >&6; }
10710	else
10711		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
10713		PKG_CONFIG=""
10714	fi
10715
10716fi
10717
10718# After basic tools have been setup, we can check build os specific details.
10719
10720###############################################################################
10721
10722# Note that this is the build platform OS version!
10723
10724OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10725OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10726OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10727OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10728
10729
10730
10731
10732
10733# Setup builddeps, for automatic downloading of tools we need.
10734# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10735# boot-jdk setup, but we need to have basic tools setup first.
10736
10737
10738# Check whether --with-builddeps-conf was given.
10739if test "${with_builddeps_conf+set}" = set; then :
10740  withval=$with_builddeps_conf;
10741fi
10742
10743
10744
10745# Check whether --with-builddeps-server was given.
10746if test "${with_builddeps_server+set}" = set; then :
10747  withval=$with_builddeps_server;
10748fi
10749
10750
10751
10752# Check whether --with-builddeps-dir was given.
10753if test "${with_builddeps_dir+set}" = set; then :
10754  withval=$with_builddeps_dir;
10755else
10756  with_builddeps_dir=/localhome/builddeps
10757fi
10758
10759
10760
10761# Check whether --with-builddeps-group was given.
10762if test "${with_builddeps_group+set}" = set; then :
10763  withval=$with_builddeps_group;
10764fi
10765
10766
10767
10768
10769    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10770        if test "x$with_builddeps_conf" != x; then
10771            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10772$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10773            builddepsfile=$with_builddeps_conf
10774            if test -s $builddepsfile; then
10775                . $builddepsfile
10776                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10777$as_echo "loaded!" >&6; }
10778            else
10779               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10780           fi
10781        else
10782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10783$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10784            builddepsfile=`mktemp`
10785            touch $builddepsfile
10786            # Put all found confs into a single file.
10787            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10788            # Source the file to acquire the variables
10789            if test -s $builddepsfile; then
10790                . $builddepsfile
10791                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10792$as_echo "found at least one!" >&6; }
10793            else
10794               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10795           fi
10796        fi
10797        # Create build and target names that use _ instead of "-" and ".".
10798        # This is necessary to use them in variable names.
10799        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10800        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10801        # Extract rewrite information for build and target
10802        eval rewritten_build=\${REWRITE_${build_var}}
10803        if test "x$rewritten_build" = x; then
10804            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10805            echo Build stays the same $rewritten_build
10806        else
10807            echo Rewriting build for builddeps into $rewritten_build
10808        fi
10809        eval rewritten_target=\${REWRITE_${target_var}}
10810        if test "x$rewritten_target" = x; then
10811            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10812            echo Target stays the same $rewritten_target
10813        else
10814            echo Rewriting target for builddeps into $rewritten_target
10815        fi
10816        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10817        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10818    fi
10819    for ac_prog in 7z unzip
10820do
10821  # Extract the first word of "$ac_prog", so it can be a program name with args.
10822set dummy $ac_prog; ac_word=$2
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10824$as_echo_n "checking for $ac_word... " >&6; }
10825if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10826  $as_echo_n "(cached) " >&6
10827else
10828  if test -n "$BDEPS_UNZIP"; then
10829  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10830else
10831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10832for as_dir in $PATH
10833do
10834  IFS=$as_save_IFS
10835  test -z "$as_dir" && as_dir=.
10836    for ac_exec_ext in '' $ac_executable_extensions; do
10837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10838    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10840    break 2
10841  fi
10842done
10843  done
10844IFS=$as_save_IFS
10845
10846fi
10847fi
10848BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10849if test -n "$BDEPS_UNZIP"; then
10850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10851$as_echo "$BDEPS_UNZIP" >&6; }
10852else
10853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10854$as_echo "no" >&6; }
10855fi
10856
10857
10858  test -n "$BDEPS_UNZIP" && break
10859done
10860
10861    if test "x$BDEPS_UNZIP" = x7z; then
10862        BDEPS_UNZIP="7z x"
10863    fi
10864
10865    for ac_prog in wget lftp ftp
10866do
10867  # Extract the first word of "$ac_prog", so it can be a program name with args.
10868set dummy $ac_prog; ac_word=$2
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10870$as_echo_n "checking for $ac_word... " >&6; }
10871if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10872  $as_echo_n "(cached) " >&6
10873else
10874  if test -n "$BDEPS_FTP"; then
10875  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10876else
10877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_prog_BDEPS_FTP="$ac_prog"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892fi
10893fi
10894BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10895if test -n "$BDEPS_FTP"; then
10896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10897$as_echo "$BDEPS_FTP" >&6; }
10898else
10899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10900$as_echo "no" >&6; }
10901fi
10902
10903
10904  test -n "$BDEPS_FTP" && break
10905done
10906
10907
10908
10909###############################################################################
10910#
10911# Determine OpenJDK variants, options and version numbers.
10912#
10913###############################################################################
10914
10915# We need build & target for this.
10916
10917
10918###############################################################################
10919#
10920# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10921# We always build headless support.
10922#
10923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10924$as_echo_n "checking headful support... " >&6; }
10925# Check whether --enable-headful was given.
10926if test "${enable_headful+set}" = set; then :
10927  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10928else
10929  SUPPORT_HEADFUL=yes
10930fi
10931
10932
10933SUPPORT_HEADLESS=yes
10934BUILD_HEADLESS="BUILD_HEADLESS:=true"
10935
10936if test "x$SUPPORT_HEADFUL" = xyes; then
10937    # We are building both headful and headless.
10938    headful_msg="include support for both headful and headless"
10939fi
10940
10941if test "x$SUPPORT_HEADFUL" = xno; then
10942    # Thus we are building headless only.
10943    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10944    headful_msg="headless only"
10945fi
10946
10947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10948$as_echo "$headful_msg" >&6; }
10949
10950
10951
10952
10953
10954# Control wether Hotspot runs Queens test after build.
10955# Check whether --enable-hotspot-test-in-build was given.
10956if test "${enable_hotspot_test_in_build+set}" = set; then :
10957  enableval=$enable_hotspot_test_in_build;
10958else
10959  enable_hotspot_test_in_build=no
10960fi
10961
10962if test "x$enable_hotspot_test_in_build" = "xyes"; then
10963    TEST_IN_BUILD=true
10964else
10965    TEST_IN_BUILD=false
10966fi
10967
10968
10969###############################################################################
10970#
10971# Choose cacerts source file
10972#
10973
10974# Check whether --with-cacerts-file was given.
10975if test "${with_cacerts_file+set}" = set; then :
10976  withval=$with_cacerts_file;
10977fi
10978
10979if test "x$with_cacerts_file" != x; then
10980    CACERTS_FILE=$with_cacerts_file
10981else
10982    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10983fi
10984
10985
10986###############################################################################
10987#
10988# Enable or disable unlimited crypto
10989#
10990# Check whether --enable-unlimited-crypto was given.
10991if test "${enable_unlimited_crypto+set}" = set; then :
10992  enableval=$enable_unlimited_crypto;
10993else
10994  enable_unlimited_crypto=no
10995fi
10996
10997if test "x$enable_unlimited_crypto" = "xyes"; then
10998    UNLIMITED_CRYPTO=true
10999else
11000    UNLIMITED_CRYPTO=false
11001fi
11002
11003
11004###############################################################################
11005#
11006# Enable or disable the elliptic curve crypto implementation
11007#
11008
11009
11010###############################################################################
11011#
11012# Compress jars
11013#
11014COMPRESS_JARS=false
11015
11016
11017
11018
11019# Source the version numbers
11020. $AUTOCONF_DIR/version-numbers
11021
11022# Get the settings from parameters
11023
11024# Check whether --with-milestone was given.
11025if test "${with_milestone+set}" = set; then :
11026  withval=$with_milestone;
11027fi
11028
11029if test "x$with_milestone" = xyes; then
11030  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11031elif test "x$with_milestone" != x; then
11032    MILESTONE="$with_milestone"
11033fi
11034if test "x$MILESTONE" = x; then
11035  MILESTONE=internal
11036fi
11037
11038
11039# Check whether --with-update-version was given.
11040if test "${with_update_version+set}" = set; then :
11041  withval=$with_update_version;
11042fi
11043
11044if test "x$with_update_version" = xyes; then
11045  as_fn_error $? "Update version must have a value" "$LINENO" 5
11046elif test "x$with_update_version" != x; then
11047  JDK_UPDATE_VERSION="$with_update_version"
11048fi
11049
11050
11051# Check whether --with-build-number was given.
11052if test "${with_build_number+set}" = set; then :
11053  withval=$with_build_number;
11054fi
11055
11056if test "x$with_build_number" = xyes; then
11057  as_fn_error $? "Build number must have a value" "$LINENO" 5
11058elif test "x$with_build_number" != x; then
11059  JDK_BUILD_NUMBER="$with_build_number"
11060fi
11061if test "x$JDK_BUILD_NUMBER" = x; then
11062  JDK_BUILD_NUMBER=b00
11063fi
11064
11065
11066# Check whether --with-user-release-suffix was given.
11067if test "${with_user_release_suffix+set}" = set; then :
11068  withval=$with_user_release_suffix;
11069fi
11070
11071if test "x$with_user_release_suffix" = xyes; then
11072  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11073elif test "x$with_user_release_suffix" != x; then
11074  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11075else
11076  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11077  # Avoid [:alnum:] since it depends on the locale.
11078  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11079  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11080fi
11081
11082
11083# Now set the JDK version, milestone, build number etc.
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098COPYRIGHT_YEAR=`date +'%Y'`
11099
11100
11101if test "x$JDK_UPDATE_VERSION" != x; then
11102  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11103else
11104  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11105fi
11106
11107
11108COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11109
11110
11111
11112###############################################################################
11113#
11114# Setup BootJDK, used to bootstrap the build.
11115#
11116###############################################################################
11117
11118
11119BOOT_JDK_FOUND=no
11120
11121# Check whether --with-boot-jdk was given.
11122if test "${with_boot_jdk+set}" = set; then :
11123  withval=$with_boot_jdk;
11124fi
11125
11126
11127# We look for the Boot JDK through various means, going from more certain to
11128# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11129# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11130# must check if this is indeed valid; otherwise we'll continue looking.
11131
11132# Test: Is bootjdk explicitely set by command line arguments?
11133
11134  if test "x$BOOT_JDK_FOUND" = xno; then
11135    # Now execute the test
11136
11137if test "x$with_boot_jdk" != x; then
11138    BOOT_JDK=$with_boot_jdk
11139    BOOT_JDK_FOUND=maybe
11140    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11141$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11142fi
11143
11144
11145    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11146    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11147      # Do we have a bin/java?
11148      if test ! -x "$BOOT_JDK/bin/java"; then
11149        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11151        BOOT_JDK_FOUND=no
11152      else
11153        # Do we have a bin/javac?
11154        if test ! -x "$BOOT_JDK/bin/javac"; then
11155          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11157          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11158$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11159          BOOT_JDK_FOUND=no
11160        else
11161          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11162          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11163            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11165            BOOT_JDK_FOUND=no
11166          else
11167            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11168            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11169
11170            # Extra M4 quote needed to protect [] in grep expression.
11171            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11172            if test "x$FOUND_VERSION_78" = x; then
11173              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11175              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11176$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11177              BOOT_JDK_FOUND=no
11178            else
11179              # We're done! :-)
11180              BOOT_JDK_FOUND=yes
11181
11182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11183
11184  # Input might be given as Windows format, start by converting to
11185  # unix format.
11186  path="$BOOT_JDK"
11187  new_path=`$CYGPATH -u "$path"`
11188
11189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11192  # "foo.exe" is OK but "foo" is an error.
11193  #
11194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11195  # It is also a way to make sure we got the proper file name for the real test later on.
11196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11197  if test "x$test_shortpath" = x; then
11198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11200    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11201  fi
11202
11203  # Call helper function which possibly converts this using DOS-style short mode.
11204  # If so, the updated path is stored in $new_path.
11205
11206  input_path="$new_path"
11207  # Check if we need to convert this using DOS-style short mode. If the path
11208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11209  # take no chances and rewrite it.
11210  # Note: m4 eats our [], so we need to use [ and ] instead.
11211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11212  if test "x$has_forbidden_chars" != x; then
11213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11217      # Going to short mode and back again did indeed matter. Since short mode is
11218      # case insensitive, let's make it lowercase to improve readability.
11219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11220      # Now convert it back to Unix-stile (cygpath)
11221      input_path=`$CYGPATH -u "$shortmode_path"`
11222      new_path="$input_path"
11223    fi
11224  fi
11225
11226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11227  if test "x$test_cygdrive_prefix" = x; then
11228    # As a simple fix, exclude /usr/bin since it's not a real path.
11229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11231      # a path prefixed by /cygdrive for fixpath to work.
11232      new_path="$CYGWIN_ROOT_PATH$input_path"
11233    fi
11234  fi
11235
11236
11237  if test "x$path" != "x$new_path"; then
11238    BOOT_JDK="$new_path"
11239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11241  fi
11242
11243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11244
11245  path="$BOOT_JDK"
11246  has_colon=`$ECHO $path | $GREP ^.:`
11247  new_path="$path"
11248  if test "x$has_colon" = x; then
11249    # Not in mixed or Windows style, start by that.
11250    new_path=`cmd //c echo $path`
11251  fi
11252
11253
11254  input_path="$new_path"
11255  # Check if we need to convert this using DOS-style short mode. If the path
11256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11257  # take no chances and rewrite it.
11258  # Note: m4 eats our [], so we need to use [ and ] instead.
11259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11260  if test "x$has_forbidden_chars" != x; then
11261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11263  fi
11264
11265
11266  windows_path="$new_path"
11267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11268    unix_path=`$CYGPATH -u "$windows_path"`
11269    new_path="$unix_path"
11270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11272    new_path="$unix_path"
11273  fi
11274
11275  if test "x$path" != "x$new_path"; then
11276    BOOT_JDK="$new_path"
11277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11279  fi
11280
11281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11283
11284  else
11285    # We're on a posix platform. Hooray! :)
11286    path="$BOOT_JDK"
11287    has_space=`$ECHO "$path" | $GREP " "`
11288    if test "x$has_space" != x; then
11289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11291      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11292    fi
11293
11294    # Use eval to expand a potential ~
11295    eval path="$path"
11296    if test ! -f "$path" && test ! -d "$path"; then
11297      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11298    fi
11299
11300    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11301  fi
11302
11303              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11304$as_echo_n "checking for Boot JDK... " >&6; }
11305              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11306$as_echo "$BOOT_JDK" >&6; }
11307              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11308$as_echo_n "checking Boot JDK version... " >&6; }
11309              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11310              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11311$as_echo "$BOOT_JDK_VERSION" >&6; }
11312            fi # end check jdk version
11313          fi # end check rt.jar
11314        fi # end check javac
11315      fi # end check java
11316    fi # end check boot jdk found
11317  fi
11318
11319if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11320  # Having specified an argument which is incorrect will produce an instant failure;
11321  # we should not go on looking
11322  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11323fi
11324
11325# Test: Is bootjdk available from builddeps?
11326
11327  if test "x$BOOT_JDK_FOUND" = xno; then
11328    # Now execute the test
11329
11330
11331
11332    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11333        # Source the builddeps file again, to make sure it uses the latest variables!
11334        . $builddepsfile
11335        # Look for a target and build machine specific resource!
11336        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11337        if test "x$resource" = x; then
11338            # Ok, lets instead look for a target specific resource
11339            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11340        fi
11341        if test "x$resource" = x; then
11342            # Ok, lets instead look for a build specific resource
11343            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11344        fi
11345        if test "x$resource" = x; then
11346            # Ok, lets instead look for a generic resource
11347            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11348            resource=${builddep_bootjdk}
11349        fi
11350        if test "x$resource" != x; then
11351            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11352$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11353	    # If the resource in the builddeps.conf file is an existing directory,
11354	    # for example /java/linux/cups
11355	    if test -d ${resource}; then
11356	       depdir=${resource}
11357	    else
11358
11359# bootjdk is for example mymodule
11360# $resource is for example libs/general/libmymod_1_2_3.zip
11361# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11362# $with_builddeps_dir is for example /localhome/builddeps
11363# depdir is the name of the variable into which we store the depdir, eg MYMOD
11364# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11365# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11366    filename=`basename $resource`
11367    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11368    filebase=${filename%%.*}
11369    extension=${filename#*.}
11370    installdir=$with_builddeps_dir/$filebase
11371    if test ! -f $installdir/$filename.unpacked; then
11372        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11373$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11374        if test ! -d $installdir; then
11375            mkdir -p $installdir
11376        fi
11377        if test ! -d $installdir; then
11378            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11379        fi
11380        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11381        touch $tmpfile
11382        if test ! -f $tmpfile; then
11383            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11384        fi
11385
11386    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11387    # $tmpfile is the local file name for the downloaded file.
11388    VALID_TOOL=no
11389    if test "x$BDEPS_FTP" = xwget; then
11390       VALID_TOOL=yes
11391       wget -O $tmpfile $with_builddeps_server/$resource
11392    fi
11393    if test "x$BDEPS_FTP" = xlftp; then
11394       VALID_TOOL=yes
11395       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11396    fi
11397    if test "x$BDEPS_FTP" = xftp; then
11398        VALID_TOOL=yes
11399        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11400        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11401        FTPUSERPWD=${FTPSERVER%%@*}
11402        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11403            FTPUSER=${userpwd%%:*}
11404            FTPPWD=${userpwd#*@}
11405            FTPSERVER=${FTPSERVER#*@}
11406        else
11407            FTPUSER=ftp
11408            FTPPWD=ftp
11409        fi
11410        # the "pass" command does not work on some
11411        # ftp clients (read ftp.exe) but if it works,
11412        # passive mode is better!
11413        (\
11414            echo "user $FTPUSER $FTPPWD"        ;\
11415            echo "pass"                         ;\
11416            echo "bin"                          ;\
11417            echo "get $FTPPATH $tmpfile"              ;\
11418        ) | ftp -in $FTPSERVER
11419    fi
11420    if test "x$VALID_TOOL" != xyes; then
11421       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11422    fi
11423
11424        mv $tmpfile $installdir/$filename
11425        if test ! -s $installdir/$filename; then
11426            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11427        fi
11428        case "$extension" in
11429            zip)  echo "Unzipping $installdir/$filename..."
11430               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11431            ;;
11432            tar.gz) echo "Untaring $installdir/$filename..."
11433               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11434            ;;
11435            tgz) echo "Untaring $installdir/$filename..."
11436               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11437            ;;
11438            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11439            ;;
11440        esac
11441    fi
11442    if test -f $installdir/$filename.unpacked; then
11443        depdir=$installdir
11444    fi
11445
11446	    fi
11447            # Source the builddeps file again, because in the previous command, the depdir
11448            # was updated to point at the current build dependency install directory.
11449            . $builddepsfile
11450            # Now extract variables from the builddeps.conf files.
11451            theroot=${builddep_bootjdk_ROOT}
11452            thecflags=${builddep_bootjdk_CFLAGS}
11453            thelibs=${builddep_bootjdk_LIBS}
11454            if test "x$depdir" = x; then
11455                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11456            fi
11457            BOOT_JDK=$depdir
11458            if test "x$theroot" != x; then
11459               BOOT_JDK="$theroot"
11460            fi
11461            if test "x$thecflags" != x; then
11462               BOOT_JDK_CFLAGS="$thecflags"
11463            fi
11464            if test "x$thelibs" != x; then
11465               BOOT_JDK_LIBS="$thelibs"
11466            fi
11467            BOOT_JDK_FOUND=maybe
11468            else BOOT_JDK_FOUND=no
11469
11470        fi
11471        else BOOT_JDK_FOUND=no
11472
11473    fi
11474
11475
11476
11477    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11478    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11479      # Do we have a bin/java?
11480      if test ! -x "$BOOT_JDK/bin/java"; then
11481        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11483        BOOT_JDK_FOUND=no
11484      else
11485        # Do we have a bin/javac?
11486        if test ! -x "$BOOT_JDK/bin/javac"; then
11487          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11489          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11490$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11491          BOOT_JDK_FOUND=no
11492        else
11493          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11494          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11495            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11497            BOOT_JDK_FOUND=no
11498          else
11499            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11501
11502            # Extra M4 quote needed to protect [] in grep expression.
11503            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11504            if test "x$FOUND_VERSION_78" = x; then
11505              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11507              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11508$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11509              BOOT_JDK_FOUND=no
11510            else
11511              # We're done! :-)
11512              BOOT_JDK_FOUND=yes
11513
11514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11515
11516  # Input might be given as Windows format, start by converting to
11517  # unix format.
11518  path="$BOOT_JDK"
11519  new_path=`$CYGPATH -u "$path"`
11520
11521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11524  # "foo.exe" is OK but "foo" is an error.
11525  #
11526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11527  # It is also a way to make sure we got the proper file name for the real test later on.
11528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11529  if test "x$test_shortpath" = x; then
11530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11532    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11533  fi
11534
11535  # Call helper function which possibly converts this using DOS-style short mode.
11536  # If so, the updated path is stored in $new_path.
11537
11538  input_path="$new_path"
11539  # Check if we need to convert this using DOS-style short mode. If the path
11540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11541  # take no chances and rewrite it.
11542  # Note: m4 eats our [], so we need to use [ and ] instead.
11543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11544  if test "x$has_forbidden_chars" != x; then
11545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11549      # Going to short mode and back again did indeed matter. Since short mode is
11550      # case insensitive, let's make it lowercase to improve readability.
11551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11552      # Now convert it back to Unix-stile (cygpath)
11553      input_path=`$CYGPATH -u "$shortmode_path"`
11554      new_path="$input_path"
11555    fi
11556  fi
11557
11558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11559  if test "x$test_cygdrive_prefix" = x; then
11560    # As a simple fix, exclude /usr/bin since it's not a real path.
11561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11563      # a path prefixed by /cygdrive for fixpath to work.
11564      new_path="$CYGWIN_ROOT_PATH$input_path"
11565    fi
11566  fi
11567
11568
11569  if test "x$path" != "x$new_path"; then
11570    BOOT_JDK="$new_path"
11571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11573  fi
11574
11575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11576
11577  path="$BOOT_JDK"
11578  has_colon=`$ECHO $path | $GREP ^.:`
11579  new_path="$path"
11580  if test "x$has_colon" = x; then
11581    # Not in mixed or Windows style, start by that.
11582    new_path=`cmd //c echo $path`
11583  fi
11584
11585
11586  input_path="$new_path"
11587  # Check if we need to convert this using DOS-style short mode. If the path
11588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11589  # take no chances and rewrite it.
11590  # Note: m4 eats our [], so we need to use [ and ] instead.
11591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11592  if test "x$has_forbidden_chars" != x; then
11593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11595  fi
11596
11597
11598  windows_path="$new_path"
11599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11600    unix_path=`$CYGPATH -u "$windows_path"`
11601    new_path="$unix_path"
11602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11604    new_path="$unix_path"
11605  fi
11606
11607  if test "x$path" != "x$new_path"; then
11608    BOOT_JDK="$new_path"
11609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11611  fi
11612
11613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11615
11616  else
11617    # We're on a posix platform. Hooray! :)
11618    path="$BOOT_JDK"
11619    has_space=`$ECHO "$path" | $GREP " "`
11620    if test "x$has_space" != x; then
11621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11624    fi
11625
11626    # Use eval to expand a potential ~
11627    eval path="$path"
11628    if test ! -f "$path" && test ! -d "$path"; then
11629      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11630    fi
11631
11632    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11633  fi
11634
11635              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11636$as_echo_n "checking for Boot JDK... " >&6; }
11637              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11638$as_echo "$BOOT_JDK" >&6; }
11639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11640$as_echo_n "checking Boot JDK version... " >&6; }
11641              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11642              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11643$as_echo "$BOOT_JDK_VERSION" >&6; }
11644            fi # end check jdk version
11645          fi # end check rt.jar
11646        fi # end check javac
11647      fi # end check java
11648    fi # end check boot jdk found
11649  fi
11650
11651
11652# Test: Is $JAVA_HOME set?
11653
11654  if test "x$BOOT_JDK_FOUND" = xno; then
11655    # Now execute the test
11656
11657    if test "x$JAVA_HOME" != x; then
11658        JAVA_HOME_PROCESSED="$JAVA_HOME"
11659
11660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11661
11662  # Input might be given as Windows format, start by converting to
11663  # unix format.
11664  path="$JAVA_HOME_PROCESSED"
11665  new_path=`$CYGPATH -u "$path"`
11666
11667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11670  # "foo.exe" is OK but "foo" is an error.
11671  #
11672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11673  # It is also a way to make sure we got the proper file name for the real test later on.
11674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11675  if test "x$test_shortpath" = x; then
11676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11677$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11678    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11679  fi
11680
11681  # Call helper function which possibly converts this using DOS-style short mode.
11682  # If so, the updated path is stored in $new_path.
11683
11684  input_path="$new_path"
11685  # Check if we need to convert this using DOS-style short mode. If the path
11686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11687  # take no chances and rewrite it.
11688  # Note: m4 eats our [], so we need to use [ and ] instead.
11689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11690  if test "x$has_forbidden_chars" != x; then
11691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11695      # Going to short mode and back again did indeed matter. Since short mode is
11696      # case insensitive, let's make it lowercase to improve readability.
11697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11698      # Now convert it back to Unix-stile (cygpath)
11699      input_path=`$CYGPATH -u "$shortmode_path"`
11700      new_path="$input_path"
11701    fi
11702  fi
11703
11704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11705  if test "x$test_cygdrive_prefix" = x; then
11706    # As a simple fix, exclude /usr/bin since it's not a real path.
11707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11709      # a path prefixed by /cygdrive for fixpath to work.
11710      new_path="$CYGWIN_ROOT_PATH$input_path"
11711    fi
11712  fi
11713
11714
11715  if test "x$path" != "x$new_path"; then
11716    JAVA_HOME_PROCESSED="$new_path"
11717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11718$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11719  fi
11720
11721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11722
11723  path="$JAVA_HOME_PROCESSED"
11724  has_colon=`$ECHO $path | $GREP ^.:`
11725  new_path="$path"
11726  if test "x$has_colon" = x; then
11727    # Not in mixed or Windows style, start by that.
11728    new_path=`cmd //c echo $path`
11729  fi
11730
11731
11732  input_path="$new_path"
11733  # Check if we need to convert this using DOS-style short mode. If the path
11734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11735  # take no chances and rewrite it.
11736  # Note: m4 eats our [], so we need to use [ and ] instead.
11737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11738  if test "x$has_forbidden_chars" != x; then
11739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11741  fi
11742
11743
11744  windows_path="$new_path"
11745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11746    unix_path=`$CYGPATH -u "$windows_path"`
11747    new_path="$unix_path"
11748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11750    new_path="$unix_path"
11751  fi
11752
11753  if test "x$path" != "x$new_path"; then
11754    JAVA_HOME_PROCESSED="$new_path"
11755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11756$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11757  fi
11758
11759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11761
11762  else
11763    # We're on a posix platform. Hooray! :)
11764    path="$JAVA_HOME_PROCESSED"
11765    has_space=`$ECHO "$path" | $GREP " "`
11766    if test "x$has_space" != x; then
11767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11768$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11769      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11770    fi
11771
11772    # Use eval to expand a potential ~
11773    eval path="$path"
11774    if test ! -f "$path" && test ! -d "$path"; then
11775      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11776    fi
11777
11778    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11779  fi
11780
11781        if test ! -d "$JAVA_HOME_PROCESSED"; then
11782            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11783$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11784        else
11785          # Aha, the user has set a JAVA_HOME
11786          # let us use that as the Boot JDK.
11787          BOOT_JDK="$JAVA_HOME_PROCESSED"
11788          BOOT_JDK_FOUND=maybe
11789          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11790$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11791        fi
11792    fi
11793
11794
11795    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11796    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11797      # Do we have a bin/java?
11798      if test ! -x "$BOOT_JDK/bin/java"; then
11799        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11801        BOOT_JDK_FOUND=no
11802      else
11803        # Do we have a bin/javac?
11804        if test ! -x "$BOOT_JDK/bin/javac"; then
11805          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11807          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11808$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11809          BOOT_JDK_FOUND=no
11810        else
11811          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11812          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11813            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11815            BOOT_JDK_FOUND=no
11816          else
11817            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11818            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11819
11820            # Extra M4 quote needed to protect [] in grep expression.
11821            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11822            if test "x$FOUND_VERSION_78" = x; then
11823              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11825              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11826$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11827              BOOT_JDK_FOUND=no
11828            else
11829              # We're done! :-)
11830              BOOT_JDK_FOUND=yes
11831
11832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11833
11834  # Input might be given as Windows format, start by converting to
11835  # unix format.
11836  path="$BOOT_JDK"
11837  new_path=`$CYGPATH -u "$path"`
11838
11839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11842  # "foo.exe" is OK but "foo" is an error.
11843  #
11844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11845  # It is also a way to make sure we got the proper file name for the real test later on.
11846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11847  if test "x$test_shortpath" = x; then
11848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11851  fi
11852
11853  # Call helper function which possibly converts this using DOS-style short mode.
11854  # If so, the updated path is stored in $new_path.
11855
11856  input_path="$new_path"
11857  # Check if we need to convert this using DOS-style short mode. If the path
11858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11859  # take no chances and rewrite it.
11860  # Note: m4 eats our [], so we need to use [ and ] instead.
11861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11862  if test "x$has_forbidden_chars" != x; then
11863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11867      # Going to short mode and back again did indeed matter. Since short mode is
11868      # case insensitive, let's make it lowercase to improve readability.
11869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11870      # Now convert it back to Unix-stile (cygpath)
11871      input_path=`$CYGPATH -u "$shortmode_path"`
11872      new_path="$input_path"
11873    fi
11874  fi
11875
11876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11877  if test "x$test_cygdrive_prefix" = x; then
11878    # As a simple fix, exclude /usr/bin since it's not a real path.
11879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11881      # a path prefixed by /cygdrive for fixpath to work.
11882      new_path="$CYGWIN_ROOT_PATH$input_path"
11883    fi
11884  fi
11885
11886
11887  if test "x$path" != "x$new_path"; then
11888    BOOT_JDK="$new_path"
11889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11891  fi
11892
11893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11894
11895  path="$BOOT_JDK"
11896  has_colon=`$ECHO $path | $GREP ^.:`
11897  new_path="$path"
11898  if test "x$has_colon" = x; then
11899    # Not in mixed or Windows style, start by that.
11900    new_path=`cmd //c echo $path`
11901  fi
11902
11903
11904  input_path="$new_path"
11905  # Check if we need to convert this using DOS-style short mode. If the path
11906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11907  # take no chances and rewrite it.
11908  # Note: m4 eats our [], so we need to use [ and ] instead.
11909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11910  if test "x$has_forbidden_chars" != x; then
11911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11913  fi
11914
11915
11916  windows_path="$new_path"
11917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11918    unix_path=`$CYGPATH -u "$windows_path"`
11919    new_path="$unix_path"
11920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11922    new_path="$unix_path"
11923  fi
11924
11925  if test "x$path" != "x$new_path"; then
11926    BOOT_JDK="$new_path"
11927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11929  fi
11930
11931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11933
11934  else
11935    # We're on a posix platform. Hooray! :)
11936    path="$BOOT_JDK"
11937    has_space=`$ECHO "$path" | $GREP " "`
11938    if test "x$has_space" != x; then
11939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11941      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11942    fi
11943
11944    # Use eval to expand a potential ~
11945    eval path="$path"
11946    if test ! -f "$path" && test ! -d "$path"; then
11947      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11948    fi
11949
11950    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11951  fi
11952
11953              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11954$as_echo_n "checking for Boot JDK... " >&6; }
11955              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11956$as_echo "$BOOT_JDK" >&6; }
11957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11958$as_echo_n "checking Boot JDK version... " >&6; }
11959              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11961$as_echo "$BOOT_JDK_VERSION" >&6; }
11962            fi # end check jdk version
11963          fi # end check rt.jar
11964        fi # end check javac
11965      fi # end check java
11966    fi # end check boot jdk found
11967  fi
11968
11969
11970# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11971
11972  if test "x$BOOT_JDK_FOUND" = xno; then
11973    # Now execute the test
11974
11975    if test -x /usr/libexec/java_home; then
11976        BOOT_JDK=`/usr/libexec/java_home`
11977        BOOT_JDK_FOUND=maybe
11978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11979$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11980    fi
11981
11982
11983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11985      # Do we have a bin/java?
11986      if test ! -x "$BOOT_JDK/bin/java"; then
11987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11989        BOOT_JDK_FOUND=no
11990      else
11991        # Do we have a bin/javac?
11992        if test ! -x "$BOOT_JDK/bin/javac"; then
11993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11997          BOOT_JDK_FOUND=no
11998        else
11999          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12000          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12003            BOOT_JDK_FOUND=no
12004          else
12005            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12006            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12007
12008            # Extra M4 quote needed to protect [] in grep expression.
12009            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12010            if test "x$FOUND_VERSION_78" = x; then
12011              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12013              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12014$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12015              BOOT_JDK_FOUND=no
12016            else
12017              # We're done! :-)
12018              BOOT_JDK_FOUND=yes
12019
12020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12021
12022  # Input might be given as Windows format, start by converting to
12023  # unix format.
12024  path="$BOOT_JDK"
12025  new_path=`$CYGPATH -u "$path"`
12026
12027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12030  # "foo.exe" is OK but "foo" is an error.
12031  #
12032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12033  # It is also a way to make sure we got the proper file name for the real test later on.
12034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12035  if test "x$test_shortpath" = x; then
12036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12038    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12039  fi
12040
12041  # Call helper function which possibly converts this using DOS-style short mode.
12042  # If so, the updated path is stored in $new_path.
12043
12044  input_path="$new_path"
12045  # Check if we need to convert this using DOS-style short mode. If the path
12046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12047  # take no chances and rewrite it.
12048  # Note: m4 eats our [], so we need to use [ and ] instead.
12049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12050  if test "x$has_forbidden_chars" != x; then
12051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12055      # Going to short mode and back again did indeed matter. Since short mode is
12056      # case insensitive, let's make it lowercase to improve readability.
12057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12058      # Now convert it back to Unix-stile (cygpath)
12059      input_path=`$CYGPATH -u "$shortmode_path"`
12060      new_path="$input_path"
12061    fi
12062  fi
12063
12064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12065  if test "x$test_cygdrive_prefix" = x; then
12066    # As a simple fix, exclude /usr/bin since it's not a real path.
12067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12069      # a path prefixed by /cygdrive for fixpath to work.
12070      new_path="$CYGWIN_ROOT_PATH$input_path"
12071    fi
12072  fi
12073
12074
12075  if test "x$path" != "x$new_path"; then
12076    BOOT_JDK="$new_path"
12077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12079  fi
12080
12081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12082
12083  path="$BOOT_JDK"
12084  has_colon=`$ECHO $path | $GREP ^.:`
12085  new_path="$path"
12086  if test "x$has_colon" = x; then
12087    # Not in mixed or Windows style, start by that.
12088    new_path=`cmd //c echo $path`
12089  fi
12090
12091
12092  input_path="$new_path"
12093  # Check if we need to convert this using DOS-style short mode. If the path
12094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12095  # take no chances and rewrite it.
12096  # Note: m4 eats our [], so we need to use [ and ] instead.
12097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12098  if test "x$has_forbidden_chars" != x; then
12099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12101  fi
12102
12103
12104  windows_path="$new_path"
12105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12106    unix_path=`$CYGPATH -u "$windows_path"`
12107    new_path="$unix_path"
12108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12110    new_path="$unix_path"
12111  fi
12112
12113  if test "x$path" != "x$new_path"; then
12114    BOOT_JDK="$new_path"
12115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12117  fi
12118
12119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12121
12122  else
12123    # We're on a posix platform. Hooray! :)
12124    path="$BOOT_JDK"
12125    has_space=`$ECHO "$path" | $GREP " "`
12126    if test "x$has_space" != x; then
12127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12128$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12129      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12130    fi
12131
12132    # Use eval to expand a potential ~
12133    eval path="$path"
12134    if test ! -f "$path" && test ! -d "$path"; then
12135      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12136    fi
12137
12138    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12139  fi
12140
12141              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12142$as_echo_n "checking for Boot JDK... " >&6; }
12143              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12144$as_echo "$BOOT_JDK" >&6; }
12145              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12146$as_echo_n "checking Boot JDK version... " >&6; }
12147              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12148              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12149$as_echo "$BOOT_JDK_VERSION" >&6; }
12150            fi # end check jdk version
12151          fi # end check rt.jar
12152        fi # end check javac
12153      fi # end check java
12154    fi # end check boot jdk found
12155  fi
12156
12157
12158# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12159
12160  if test "x$BOOT_JDK_FOUND" = xno; then
12161    # Now execute the test
12162
12163    # Extract the first word of "javac", so it can be a program name with args.
12164set dummy javac; ac_word=$2
12165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12166$as_echo_n "checking for $ac_word... " >&6; }
12167if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12168  $as_echo_n "(cached) " >&6
12169else
12170  case $JAVAC_CHECK in
12171  [\\/]* | ?:[\\/]*)
12172  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12173  ;;
12174  *)
12175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12176for as_dir in $PATH
12177do
12178  IFS=$as_save_IFS
12179  test -z "$as_dir" && as_dir=.
12180    for ac_exec_ext in '' $ac_executable_extensions; do
12181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12182    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12184    break 2
12185  fi
12186done
12187  done
12188IFS=$as_save_IFS
12189
12190  ;;
12191esac
12192fi
12193JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12194if test -n "$JAVAC_CHECK"; then
12195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12196$as_echo "$JAVAC_CHECK" >&6; }
12197else
12198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12199$as_echo "no" >&6; }
12200fi
12201
12202
12203    # Extract the first word of "java", so it can be a program name with args.
12204set dummy java; ac_word=$2
12205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12206$as_echo_n "checking for $ac_word... " >&6; }
12207if ${ac_cv_path_JAVA_CHECK+:} false; then :
12208  $as_echo_n "(cached) " >&6
12209else
12210  case $JAVA_CHECK in
12211  [\\/]* | ?:[\\/]*)
12212  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12213  ;;
12214  *)
12215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12216for as_dir in $PATH
12217do
12218  IFS=$as_save_IFS
12219  test -z "$as_dir" && as_dir=.
12220    for ac_exec_ext in '' $ac_executable_extensions; do
12221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12222    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12224    break 2
12225  fi
12226done
12227  done
12228IFS=$as_save_IFS
12229
12230  ;;
12231esac
12232fi
12233JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12234if test -n "$JAVA_CHECK"; then
12235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12236$as_echo "$JAVA_CHECK" >&6; }
12237else
12238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12239$as_echo "no" >&6; }
12240fi
12241
12242
12243    BINARY="$JAVAC_CHECK"
12244    if test "x$JAVAC_CHECK" = x; then
12245        BINARY="$JAVA_CHECK"
12246    fi
12247    if test "x$BINARY" != x; then
12248        # So there is a java(c) binary, it might be part of a JDK.
12249        # Lets find the JDK/JRE directory by following symbolic links.
12250        # Linux/GNU systems often have links from /usr/bin/java to
12251        # /etc/alternatives/java to the real JDK binary.
12252
12253    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12254        # Follow a chain of symbolic links. Use readlink
12255        # where it exists, else fall back to horribly
12256        # complicated shell code.
12257        if test "x$READLINK_TESTED" != yes; then
12258            # On MacOSX there is a readlink tool with a different
12259            # purpose than the GNU readlink tool. Check the found readlink.
12260            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12261            if test "x$ISGNU" = x; then
12262                 # A readlink that we do not know how to use.
12263                 # Are there other non-GNU readlinks out there?
12264                 READLINK_TESTED=yes
12265                 READLINK=
12266            fi
12267        fi
12268
12269        if test "x$READLINK" != x; then
12270            BINARY=`$READLINK -f $BINARY`
12271        else
12272            # Save the current directory for restoring afterwards
12273            STARTDIR=$PWD
12274            COUNTER=0
12275            sym_link_dir=`$DIRNAME $BINARY`
12276            sym_link_file=`$BASENAME $BINARY`
12277            cd $sym_link_dir
12278            # Use -P flag to resolve symlinks in directories.
12279            cd `$THEPWDCMD -P`
12280            sym_link_dir=`$THEPWDCMD -P`
12281            # Resolve file symlinks
12282            while test $COUNTER -lt 20; do
12283                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12284                if test "x$ISLINK" == x; then
12285                    # This is not a symbolic link! We are done!
12286                    break
12287                fi
12288                # Again resolve directory symlinks since the target of the just found
12289                # link could be in a different directory
12290                cd `$DIRNAME $ISLINK`
12291                sym_link_dir=`$THEPWDCMD -P`
12292                sym_link_file=`$BASENAME $ISLINK`
12293                let COUNTER=COUNTER+1
12294            done
12295            cd $STARTDIR
12296            BINARY=$sym_link_dir/$sym_link_file
12297        fi
12298    fi
12299
12300        BOOT_JDK=`dirname "$BINARY"`
12301        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12302        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12303            # Looks like we found ourselves an JDK
12304            BOOT_JDK_FOUND=maybe
12305            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12306$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12307        fi
12308    fi
12309
12310
12311    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12312    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12313      # Do we have a bin/java?
12314      if test ! -x "$BOOT_JDK/bin/java"; then
12315        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12317        BOOT_JDK_FOUND=no
12318      else
12319        # Do we have a bin/javac?
12320        if test ! -x "$BOOT_JDK/bin/javac"; then
12321          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12323          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12324$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12325          BOOT_JDK_FOUND=no
12326        else
12327          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12328          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12329            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12331            BOOT_JDK_FOUND=no
12332          else
12333            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12334            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12335
12336            # Extra M4 quote needed to protect [] in grep expression.
12337            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12338            if test "x$FOUND_VERSION_78" = x; then
12339              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12341              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12342$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12343              BOOT_JDK_FOUND=no
12344            else
12345              # We're done! :-)
12346              BOOT_JDK_FOUND=yes
12347
12348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12349
12350  # Input might be given as Windows format, start by converting to
12351  # unix format.
12352  path="$BOOT_JDK"
12353  new_path=`$CYGPATH -u "$path"`
12354
12355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12358  # "foo.exe" is OK but "foo" is an error.
12359  #
12360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12361  # It is also a way to make sure we got the proper file name for the real test later on.
12362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12363  if test "x$test_shortpath" = x; then
12364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12367  fi
12368
12369  # Call helper function which possibly converts this using DOS-style short mode.
12370  # If so, the updated path is stored in $new_path.
12371
12372  input_path="$new_path"
12373  # Check if we need to convert this using DOS-style short mode. If the path
12374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12375  # take no chances and rewrite it.
12376  # Note: m4 eats our [], so we need to use [ and ] instead.
12377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12378  if test "x$has_forbidden_chars" != x; then
12379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12383      # Going to short mode and back again did indeed matter. Since short mode is
12384      # case insensitive, let's make it lowercase to improve readability.
12385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12386      # Now convert it back to Unix-stile (cygpath)
12387      input_path=`$CYGPATH -u "$shortmode_path"`
12388      new_path="$input_path"
12389    fi
12390  fi
12391
12392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12393  if test "x$test_cygdrive_prefix" = x; then
12394    # As a simple fix, exclude /usr/bin since it's not a real path.
12395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12397      # a path prefixed by /cygdrive for fixpath to work.
12398      new_path="$CYGWIN_ROOT_PATH$input_path"
12399    fi
12400  fi
12401
12402
12403  if test "x$path" != "x$new_path"; then
12404    BOOT_JDK="$new_path"
12405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12407  fi
12408
12409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12410
12411  path="$BOOT_JDK"
12412  has_colon=`$ECHO $path | $GREP ^.:`
12413  new_path="$path"
12414  if test "x$has_colon" = x; then
12415    # Not in mixed or Windows style, start by that.
12416    new_path=`cmd //c echo $path`
12417  fi
12418
12419
12420  input_path="$new_path"
12421  # Check if we need to convert this using DOS-style short mode. If the path
12422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12423  # take no chances and rewrite it.
12424  # Note: m4 eats our [], so we need to use [ and ] instead.
12425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12426  if test "x$has_forbidden_chars" != x; then
12427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12429  fi
12430
12431
12432  windows_path="$new_path"
12433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12434    unix_path=`$CYGPATH -u "$windows_path"`
12435    new_path="$unix_path"
12436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12438    new_path="$unix_path"
12439  fi
12440
12441  if test "x$path" != "x$new_path"; then
12442    BOOT_JDK="$new_path"
12443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12445  fi
12446
12447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12449
12450  else
12451    # We're on a posix platform. Hooray! :)
12452    path="$BOOT_JDK"
12453    has_space=`$ECHO "$path" | $GREP " "`
12454    if test "x$has_space" != x; then
12455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12458    fi
12459
12460    # Use eval to expand a potential ~
12461    eval path="$path"
12462    if test ! -f "$path" && test ! -d "$path"; then
12463      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12464    fi
12465
12466    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12467  fi
12468
12469              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12470$as_echo_n "checking for Boot JDK... " >&6; }
12471              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12472$as_echo "$BOOT_JDK" >&6; }
12473              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12474$as_echo_n "checking Boot JDK version... " >&6; }
12475              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12476              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12477$as_echo "$BOOT_JDK_VERSION" >&6; }
12478            fi # end check jdk version
12479          fi # end check rt.jar
12480        fi # end check javac
12481      fi # end check java
12482    fi # end check boot jdk found
12483  fi
12484
12485
12486# Test: Is there a JDK installed in default, well-known locations?
12487
12488  if test "x$BOOT_JDK_FOUND" = xno; then
12489    # Now execute the test
12490
12491  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12492
12493  if test "x$BOOT_JDK_FOUND" = xno; then
12494    # Now execute the test
12495
12496  if test "x$ProgramW6432" != x; then
12497    VIRTUAL_DIR="$ProgramW6432/Java"
12498
12499  windows_path="$VIRTUAL_DIR"
12500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12501    unix_path=`$CYGPATH -u "$windows_path"`
12502    VIRTUAL_DIR="$unix_path"
12503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12505    VIRTUAL_DIR="$unix_path"
12506  fi
12507
12508
12509  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12510  BOOT_JDK_SUFFIX=""
12511  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12512  if test "x$ALL_JDKS_FOUND" != x; then
12513    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12514
12515  if test "x$BOOT_JDK_FOUND" = xno; then
12516    # Now execute the test
12517
12518        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12519        if test -d "$BOOT_JDK"; then
12520          BOOT_JDK_FOUND=maybe
12521          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12522$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12523        fi
12524
12525
12526    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12527    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12528      # Do we have a bin/java?
12529      if test ! -x "$BOOT_JDK/bin/java"; then
12530        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12532        BOOT_JDK_FOUND=no
12533      else
12534        # Do we have a bin/javac?
12535        if test ! -x "$BOOT_JDK/bin/javac"; then
12536          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12539$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12540          BOOT_JDK_FOUND=no
12541        else
12542          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12543          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12544            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12546            BOOT_JDK_FOUND=no
12547          else
12548            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12549            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12550
12551            # Extra M4 quote needed to protect [] in grep expression.
12552            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12553            if test "x$FOUND_VERSION_78" = x; then
12554              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12556              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12557$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12558              BOOT_JDK_FOUND=no
12559            else
12560              # We're done! :-)
12561              BOOT_JDK_FOUND=yes
12562
12563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12564
12565  # Input might be given as Windows format, start by converting to
12566  # unix format.
12567  path="$BOOT_JDK"
12568  new_path=`$CYGPATH -u "$path"`
12569
12570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12573  # "foo.exe" is OK but "foo" is an error.
12574  #
12575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12576  # It is also a way to make sure we got the proper file name for the real test later on.
12577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12578  if test "x$test_shortpath" = x; then
12579    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12580$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12581    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12582  fi
12583
12584  # Call helper function which possibly converts this using DOS-style short mode.
12585  # If so, the updated path is stored in $new_path.
12586
12587  input_path="$new_path"
12588  # Check if we need to convert this using DOS-style short mode. If the path
12589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12590  # take no chances and rewrite it.
12591  # Note: m4 eats our [], so we need to use [ and ] instead.
12592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12593  if test "x$has_forbidden_chars" != x; then
12594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12598      # Going to short mode and back again did indeed matter. Since short mode is
12599      # case insensitive, let's make it lowercase to improve readability.
12600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12601      # Now convert it back to Unix-stile (cygpath)
12602      input_path=`$CYGPATH -u "$shortmode_path"`
12603      new_path="$input_path"
12604    fi
12605  fi
12606
12607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12608  if test "x$test_cygdrive_prefix" = x; then
12609    # As a simple fix, exclude /usr/bin since it's not a real path.
12610    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12612      # a path prefixed by /cygdrive for fixpath to work.
12613      new_path="$CYGWIN_ROOT_PATH$input_path"
12614    fi
12615  fi
12616
12617
12618  if test "x$path" != "x$new_path"; then
12619    BOOT_JDK="$new_path"
12620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12621$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12622  fi
12623
12624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12625
12626  path="$BOOT_JDK"
12627  has_colon=`$ECHO $path | $GREP ^.:`
12628  new_path="$path"
12629  if test "x$has_colon" = x; then
12630    # Not in mixed or Windows style, start by that.
12631    new_path=`cmd //c echo $path`
12632  fi
12633
12634
12635  input_path="$new_path"
12636  # Check if we need to convert this using DOS-style short mode. If the path
12637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12638  # take no chances and rewrite it.
12639  # Note: m4 eats our [], so we need to use [ and ] instead.
12640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12641  if test "x$has_forbidden_chars" != x; then
12642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12644  fi
12645
12646
12647  windows_path="$new_path"
12648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12649    unix_path=`$CYGPATH -u "$windows_path"`
12650    new_path="$unix_path"
12651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12653    new_path="$unix_path"
12654  fi
12655
12656  if test "x$path" != "x$new_path"; then
12657    BOOT_JDK="$new_path"
12658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12659$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12660  fi
12661
12662  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12663  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12664
12665  else
12666    # We're on a posix platform. Hooray! :)
12667    path="$BOOT_JDK"
12668    has_space=`$ECHO "$path" | $GREP " "`
12669    if test "x$has_space" != x; then
12670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12671$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12672      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12673    fi
12674
12675    # Use eval to expand a potential ~
12676    eval path="$path"
12677    if test ! -f "$path" && test ! -d "$path"; then
12678      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12679    fi
12680
12681    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12682  fi
12683
12684              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12685$as_echo_n "checking for Boot JDK... " >&6; }
12686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12687$as_echo "$BOOT_JDK" >&6; }
12688              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12689$as_echo_n "checking Boot JDK version... " >&6; }
12690              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12691              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12692$as_echo "$BOOT_JDK_VERSION" >&6; }
12693            fi # end check jdk version
12694          fi # end check rt.jar
12695        fi # end check javac
12696      fi # end check java
12697    fi # end check boot jdk found
12698  fi
12699
12700    done
12701  fi
12702
12703  fi
12704
12705
12706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12708      # Do we have a bin/java?
12709      if test ! -x "$BOOT_JDK/bin/java"; then
12710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12712        BOOT_JDK_FOUND=no
12713      else
12714        # Do we have a bin/javac?
12715        if test ! -x "$BOOT_JDK/bin/javac"; then
12716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12720          BOOT_JDK_FOUND=no
12721        else
12722          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12723          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12726            BOOT_JDK_FOUND=no
12727          else
12728            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12729            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12730
12731            # Extra M4 quote needed to protect [] in grep expression.
12732            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12733            if test "x$FOUND_VERSION_78" = x; then
12734              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12736              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12737$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12738              BOOT_JDK_FOUND=no
12739            else
12740              # We're done! :-)
12741              BOOT_JDK_FOUND=yes
12742
12743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12744
12745  # Input might be given as Windows format, start by converting to
12746  # unix format.
12747  path="$BOOT_JDK"
12748  new_path=`$CYGPATH -u "$path"`
12749
12750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12753  # "foo.exe" is OK but "foo" is an error.
12754  #
12755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12756  # It is also a way to make sure we got the proper file name for the real test later on.
12757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12758  if test "x$test_shortpath" = x; then
12759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12762  fi
12763
12764  # Call helper function which possibly converts this using DOS-style short mode.
12765  # If so, the updated path is stored in $new_path.
12766
12767  input_path="$new_path"
12768  # Check if we need to convert this using DOS-style short mode. If the path
12769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12770  # take no chances and rewrite it.
12771  # Note: m4 eats our [], so we need to use [ and ] instead.
12772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12773  if test "x$has_forbidden_chars" != x; then
12774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12778      # Going to short mode and back again did indeed matter. Since short mode is
12779      # case insensitive, let's make it lowercase to improve readability.
12780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12781      # Now convert it back to Unix-stile (cygpath)
12782      input_path=`$CYGPATH -u "$shortmode_path"`
12783      new_path="$input_path"
12784    fi
12785  fi
12786
12787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12788  if test "x$test_cygdrive_prefix" = x; then
12789    # As a simple fix, exclude /usr/bin since it's not a real path.
12790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12792      # a path prefixed by /cygdrive for fixpath to work.
12793      new_path="$CYGWIN_ROOT_PATH$input_path"
12794    fi
12795  fi
12796
12797
12798  if test "x$path" != "x$new_path"; then
12799    BOOT_JDK="$new_path"
12800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12802  fi
12803
12804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12805
12806  path="$BOOT_JDK"
12807  has_colon=`$ECHO $path | $GREP ^.:`
12808  new_path="$path"
12809  if test "x$has_colon" = x; then
12810    # Not in mixed or Windows style, start by that.
12811    new_path=`cmd //c echo $path`
12812  fi
12813
12814
12815  input_path="$new_path"
12816  # Check if we need to convert this using DOS-style short mode. If the path
12817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12818  # take no chances and rewrite it.
12819  # Note: m4 eats our [], so we need to use [ and ] instead.
12820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12821  if test "x$has_forbidden_chars" != x; then
12822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12824  fi
12825
12826
12827  windows_path="$new_path"
12828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12829    unix_path=`$CYGPATH -u "$windows_path"`
12830    new_path="$unix_path"
12831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12833    new_path="$unix_path"
12834  fi
12835
12836  if test "x$path" != "x$new_path"; then
12837    BOOT_JDK="$new_path"
12838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12840  fi
12841
12842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12844
12845  else
12846    # We're on a posix platform. Hooray! :)
12847    path="$BOOT_JDK"
12848    has_space=`$ECHO "$path" | $GREP " "`
12849    if test "x$has_space" != x; then
12850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12852      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12853    fi
12854
12855    # Use eval to expand a potential ~
12856    eval path="$path"
12857    if test ! -f "$path" && test ! -d "$path"; then
12858      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12859    fi
12860
12861    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12862  fi
12863
12864              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12865$as_echo_n "checking for Boot JDK... " >&6; }
12866              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12867$as_echo "$BOOT_JDK" >&6; }
12868              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12869$as_echo_n "checking Boot JDK version... " >&6; }
12870              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12871              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12872$as_echo "$BOOT_JDK_VERSION" >&6; }
12873            fi # end check jdk version
12874          fi # end check rt.jar
12875        fi # end check javac
12876      fi # end check java
12877    fi # end check boot jdk found
12878  fi
12879
12880
12881  if test "x$BOOT_JDK_FOUND" = xno; then
12882    # Now execute the test
12883
12884  if test "x$PROGRAMW6432" != x; then
12885    VIRTUAL_DIR="$PROGRAMW6432/Java"
12886
12887  windows_path="$VIRTUAL_DIR"
12888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12889    unix_path=`$CYGPATH -u "$windows_path"`
12890    VIRTUAL_DIR="$unix_path"
12891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12893    VIRTUAL_DIR="$unix_path"
12894  fi
12895
12896
12897  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12898  BOOT_JDK_SUFFIX=""
12899  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12900  if test "x$ALL_JDKS_FOUND" != x; then
12901    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12902
12903  if test "x$BOOT_JDK_FOUND" = xno; then
12904    # Now execute the test
12905
12906        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12907        if test -d "$BOOT_JDK"; then
12908          BOOT_JDK_FOUND=maybe
12909          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12910$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12911        fi
12912
12913
12914    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12915    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12916      # Do we have a bin/java?
12917      if test ! -x "$BOOT_JDK/bin/java"; then
12918        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12920        BOOT_JDK_FOUND=no
12921      else
12922        # Do we have a bin/javac?
12923        if test ! -x "$BOOT_JDK/bin/javac"; then
12924          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12926          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12927$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12928          BOOT_JDK_FOUND=no
12929        else
12930          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12931          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12932            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12934            BOOT_JDK_FOUND=no
12935          else
12936            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12937            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12938
12939            # Extra M4 quote needed to protect [] in grep expression.
12940            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12941            if test "x$FOUND_VERSION_78" = x; then
12942              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12944              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12945$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12946              BOOT_JDK_FOUND=no
12947            else
12948              # We're done! :-)
12949              BOOT_JDK_FOUND=yes
12950
12951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12952
12953  # Input might be given as Windows format, start by converting to
12954  # unix format.
12955  path="$BOOT_JDK"
12956  new_path=`$CYGPATH -u "$path"`
12957
12958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12961  # "foo.exe" is OK but "foo" is an error.
12962  #
12963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12964  # It is also a way to make sure we got the proper file name for the real test later on.
12965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12966  if test "x$test_shortpath" = x; then
12967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12969    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12970  fi
12971
12972  # Call helper function which possibly converts this using DOS-style short mode.
12973  # If so, the updated path is stored in $new_path.
12974
12975  input_path="$new_path"
12976  # Check if we need to convert this using DOS-style short mode. If the path
12977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12978  # take no chances and rewrite it.
12979  # Note: m4 eats our [], so we need to use [ and ] instead.
12980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12981  if test "x$has_forbidden_chars" != x; then
12982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12986      # Going to short mode and back again did indeed matter. Since short mode is
12987      # case insensitive, let's make it lowercase to improve readability.
12988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12989      # Now convert it back to Unix-stile (cygpath)
12990      input_path=`$CYGPATH -u "$shortmode_path"`
12991      new_path="$input_path"
12992    fi
12993  fi
12994
12995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12996  if test "x$test_cygdrive_prefix" = x; then
12997    # As a simple fix, exclude /usr/bin since it's not a real path.
12998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13000      # a path prefixed by /cygdrive for fixpath to work.
13001      new_path="$CYGWIN_ROOT_PATH$input_path"
13002    fi
13003  fi
13004
13005
13006  if test "x$path" != "x$new_path"; then
13007    BOOT_JDK="$new_path"
13008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13009$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13010  fi
13011
13012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13013
13014  path="$BOOT_JDK"
13015  has_colon=`$ECHO $path | $GREP ^.:`
13016  new_path="$path"
13017  if test "x$has_colon" = x; then
13018    # Not in mixed or Windows style, start by that.
13019    new_path=`cmd //c echo $path`
13020  fi
13021
13022
13023  input_path="$new_path"
13024  # Check if we need to convert this using DOS-style short mode. If the path
13025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13026  # take no chances and rewrite it.
13027  # Note: m4 eats our [], so we need to use [ and ] instead.
13028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13029  if test "x$has_forbidden_chars" != x; then
13030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13032  fi
13033
13034
13035  windows_path="$new_path"
13036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13037    unix_path=`$CYGPATH -u "$windows_path"`
13038    new_path="$unix_path"
13039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13041    new_path="$unix_path"
13042  fi
13043
13044  if test "x$path" != "x$new_path"; then
13045    BOOT_JDK="$new_path"
13046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13048  fi
13049
13050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13052
13053  else
13054    # We're on a posix platform. Hooray! :)
13055    path="$BOOT_JDK"
13056    has_space=`$ECHO "$path" | $GREP " "`
13057    if test "x$has_space" != x; then
13058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13060      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13061    fi
13062
13063    # Use eval to expand a potential ~
13064    eval path="$path"
13065    if test ! -f "$path" && test ! -d "$path"; then
13066      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13067    fi
13068
13069    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13070  fi
13071
13072              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13073$as_echo_n "checking for Boot JDK... " >&6; }
13074              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13075$as_echo "$BOOT_JDK" >&6; }
13076              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13077$as_echo_n "checking Boot JDK version... " >&6; }
13078              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13079              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13080$as_echo "$BOOT_JDK_VERSION" >&6; }
13081            fi # end check jdk version
13082          fi # end check rt.jar
13083        fi # end check javac
13084      fi # end check java
13085    fi # end check boot jdk found
13086  fi
13087
13088    done
13089  fi
13090
13091  fi
13092
13093
13094    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13095    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13096      # Do we have a bin/java?
13097      if test ! -x "$BOOT_JDK/bin/java"; then
13098        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13100        BOOT_JDK_FOUND=no
13101      else
13102        # Do we have a bin/javac?
13103        if test ! -x "$BOOT_JDK/bin/javac"; then
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13106          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13107$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13108          BOOT_JDK_FOUND=no
13109        else
13110          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13111          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13112            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13114            BOOT_JDK_FOUND=no
13115          else
13116            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13118
13119            # Extra M4 quote needed to protect [] in grep expression.
13120            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13121            if test "x$FOUND_VERSION_78" = x; then
13122              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13124              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13125$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13126              BOOT_JDK_FOUND=no
13127            else
13128              # We're done! :-)
13129              BOOT_JDK_FOUND=yes
13130
13131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13132
13133  # Input might be given as Windows format, start by converting to
13134  # unix format.
13135  path="$BOOT_JDK"
13136  new_path=`$CYGPATH -u "$path"`
13137
13138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13141  # "foo.exe" is OK but "foo" is an error.
13142  #
13143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13144  # It is also a way to make sure we got the proper file name for the real test later on.
13145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13146  if test "x$test_shortpath" = x; then
13147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13149    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13150  fi
13151
13152  # Call helper function which possibly converts this using DOS-style short mode.
13153  # If so, the updated path is stored in $new_path.
13154
13155  input_path="$new_path"
13156  # Check if we need to convert this using DOS-style short mode. If the path
13157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13158  # take no chances and rewrite it.
13159  # Note: m4 eats our [], so we need to use [ and ] instead.
13160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13161  if test "x$has_forbidden_chars" != x; then
13162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13166      # Going to short mode and back again did indeed matter. Since short mode is
13167      # case insensitive, let's make it lowercase to improve readability.
13168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13169      # Now convert it back to Unix-stile (cygpath)
13170      input_path=`$CYGPATH -u "$shortmode_path"`
13171      new_path="$input_path"
13172    fi
13173  fi
13174
13175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13176  if test "x$test_cygdrive_prefix" = x; then
13177    # As a simple fix, exclude /usr/bin since it's not a real path.
13178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13180      # a path prefixed by /cygdrive for fixpath to work.
13181      new_path="$CYGWIN_ROOT_PATH$input_path"
13182    fi
13183  fi
13184
13185
13186  if test "x$path" != "x$new_path"; then
13187    BOOT_JDK="$new_path"
13188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13190  fi
13191
13192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13193
13194  path="$BOOT_JDK"
13195  has_colon=`$ECHO $path | $GREP ^.:`
13196  new_path="$path"
13197  if test "x$has_colon" = x; then
13198    # Not in mixed or Windows style, start by that.
13199    new_path=`cmd //c echo $path`
13200  fi
13201
13202
13203  input_path="$new_path"
13204  # Check if we need to convert this using DOS-style short mode. If the path
13205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13206  # take no chances and rewrite it.
13207  # Note: m4 eats our [], so we need to use [ and ] instead.
13208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13209  if test "x$has_forbidden_chars" != x; then
13210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13212  fi
13213
13214
13215  windows_path="$new_path"
13216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13217    unix_path=`$CYGPATH -u "$windows_path"`
13218    new_path="$unix_path"
13219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13221    new_path="$unix_path"
13222  fi
13223
13224  if test "x$path" != "x$new_path"; then
13225    BOOT_JDK="$new_path"
13226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13227$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13228  fi
13229
13230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13232
13233  else
13234    # We're on a posix platform. Hooray! :)
13235    path="$BOOT_JDK"
13236    has_space=`$ECHO "$path" | $GREP " "`
13237    if test "x$has_space" != x; then
13238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13240      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13241    fi
13242
13243    # Use eval to expand a potential ~
13244    eval path="$path"
13245    if test ! -f "$path" && test ! -d "$path"; then
13246      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13247    fi
13248
13249    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13250  fi
13251
13252              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13253$as_echo_n "checking for Boot JDK... " >&6; }
13254              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13255$as_echo "$BOOT_JDK" >&6; }
13256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13257$as_echo_n "checking Boot JDK version... " >&6; }
13258              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13259              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13260$as_echo "$BOOT_JDK_VERSION" >&6; }
13261            fi # end check jdk version
13262          fi # end check rt.jar
13263        fi # end check javac
13264      fi # end check java
13265    fi # end check boot jdk found
13266  fi
13267
13268
13269  if test "x$BOOT_JDK_FOUND" = xno; then
13270    # Now execute the test
13271
13272  if test "x$PROGRAMFILES" != x; then
13273    VIRTUAL_DIR="$PROGRAMFILES/Java"
13274
13275  windows_path="$VIRTUAL_DIR"
13276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13277    unix_path=`$CYGPATH -u "$windows_path"`
13278    VIRTUAL_DIR="$unix_path"
13279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13281    VIRTUAL_DIR="$unix_path"
13282  fi
13283
13284
13285  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13286  BOOT_JDK_SUFFIX=""
13287  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13288  if test "x$ALL_JDKS_FOUND" != x; then
13289    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13290
13291  if test "x$BOOT_JDK_FOUND" = xno; then
13292    # Now execute the test
13293
13294        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13295        if test -d "$BOOT_JDK"; then
13296          BOOT_JDK_FOUND=maybe
13297          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13298$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13299        fi
13300
13301
13302    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13303    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13304      # Do we have a bin/java?
13305      if test ! -x "$BOOT_JDK/bin/java"; then
13306        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13308        BOOT_JDK_FOUND=no
13309      else
13310        # Do we have a bin/javac?
13311        if test ! -x "$BOOT_JDK/bin/javac"; then
13312          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13314          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13315$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13316          BOOT_JDK_FOUND=no
13317        else
13318          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13319          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13320            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13322            BOOT_JDK_FOUND=no
13323          else
13324            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13326
13327            # Extra M4 quote needed to protect [] in grep expression.
13328            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13329            if test "x$FOUND_VERSION_78" = x; then
13330              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13332              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13333$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13334              BOOT_JDK_FOUND=no
13335            else
13336              # We're done! :-)
13337              BOOT_JDK_FOUND=yes
13338
13339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13340
13341  # Input might be given as Windows format, start by converting to
13342  # unix format.
13343  path="$BOOT_JDK"
13344  new_path=`$CYGPATH -u "$path"`
13345
13346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13349  # "foo.exe" is OK but "foo" is an error.
13350  #
13351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13352  # It is also a way to make sure we got the proper file name for the real test later on.
13353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13354  if test "x$test_shortpath" = x; then
13355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13358  fi
13359
13360  # Call helper function which possibly converts this using DOS-style short mode.
13361  # If so, the updated path is stored in $new_path.
13362
13363  input_path="$new_path"
13364  # Check if we need to convert this using DOS-style short mode. If the path
13365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13366  # take no chances and rewrite it.
13367  # Note: m4 eats our [], so we need to use [ and ] instead.
13368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13369  if test "x$has_forbidden_chars" != x; then
13370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13374      # Going to short mode and back again did indeed matter. Since short mode is
13375      # case insensitive, let's make it lowercase to improve readability.
13376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13377      # Now convert it back to Unix-stile (cygpath)
13378      input_path=`$CYGPATH -u "$shortmode_path"`
13379      new_path="$input_path"
13380    fi
13381  fi
13382
13383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13384  if test "x$test_cygdrive_prefix" = x; then
13385    # As a simple fix, exclude /usr/bin since it's not a real path.
13386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13388      # a path prefixed by /cygdrive for fixpath to work.
13389      new_path="$CYGWIN_ROOT_PATH$input_path"
13390    fi
13391  fi
13392
13393
13394  if test "x$path" != "x$new_path"; then
13395    BOOT_JDK="$new_path"
13396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13398  fi
13399
13400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13401
13402  path="$BOOT_JDK"
13403  has_colon=`$ECHO $path | $GREP ^.:`
13404  new_path="$path"
13405  if test "x$has_colon" = x; then
13406    # Not in mixed or Windows style, start by that.
13407    new_path=`cmd //c echo $path`
13408  fi
13409
13410
13411  input_path="$new_path"
13412  # Check if we need to convert this using DOS-style short mode. If the path
13413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13414  # take no chances and rewrite it.
13415  # Note: m4 eats our [], so we need to use [ and ] instead.
13416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13417  if test "x$has_forbidden_chars" != x; then
13418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13420  fi
13421
13422
13423  windows_path="$new_path"
13424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13425    unix_path=`$CYGPATH -u "$windows_path"`
13426    new_path="$unix_path"
13427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13429    new_path="$unix_path"
13430  fi
13431
13432  if test "x$path" != "x$new_path"; then
13433    BOOT_JDK="$new_path"
13434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13436  fi
13437
13438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13440
13441  else
13442    # We're on a posix platform. Hooray! :)
13443    path="$BOOT_JDK"
13444    has_space=`$ECHO "$path" | $GREP " "`
13445    if test "x$has_space" != x; then
13446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13448      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13449    fi
13450
13451    # Use eval to expand a potential ~
13452    eval path="$path"
13453    if test ! -f "$path" && test ! -d "$path"; then
13454      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13455    fi
13456
13457    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13458  fi
13459
13460              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13461$as_echo_n "checking for Boot JDK... " >&6; }
13462              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13463$as_echo "$BOOT_JDK" >&6; }
13464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13465$as_echo_n "checking Boot JDK version... " >&6; }
13466              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13467              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13468$as_echo "$BOOT_JDK_VERSION" >&6; }
13469            fi # end check jdk version
13470          fi # end check rt.jar
13471        fi # end check javac
13472      fi # end check java
13473    fi # end check boot jdk found
13474  fi
13475
13476    done
13477  fi
13478
13479  fi
13480
13481
13482    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13483    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13484      # Do we have a bin/java?
13485      if test ! -x "$BOOT_JDK/bin/java"; then
13486        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13488        BOOT_JDK_FOUND=no
13489      else
13490        # Do we have a bin/javac?
13491        if test ! -x "$BOOT_JDK/bin/javac"; then
13492          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13494          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13495$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13496          BOOT_JDK_FOUND=no
13497        else
13498          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13499          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13500            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13502            BOOT_JDK_FOUND=no
13503          else
13504            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13505            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13506
13507            # Extra M4 quote needed to protect [] in grep expression.
13508            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13509            if test "x$FOUND_VERSION_78" = x; then
13510              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13512              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13513$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13514              BOOT_JDK_FOUND=no
13515            else
13516              # We're done! :-)
13517              BOOT_JDK_FOUND=yes
13518
13519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13520
13521  # Input might be given as Windows format, start by converting to
13522  # unix format.
13523  path="$BOOT_JDK"
13524  new_path=`$CYGPATH -u "$path"`
13525
13526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13529  # "foo.exe" is OK but "foo" is an error.
13530  #
13531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13532  # It is also a way to make sure we got the proper file name for the real test later on.
13533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13534  if test "x$test_shortpath" = x; then
13535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13537    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13538  fi
13539
13540  # Call helper function which possibly converts this using DOS-style short mode.
13541  # If so, the updated path is stored in $new_path.
13542
13543  input_path="$new_path"
13544  # Check if we need to convert this using DOS-style short mode. If the path
13545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13546  # take no chances and rewrite it.
13547  # Note: m4 eats our [], so we need to use [ and ] instead.
13548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13549  if test "x$has_forbidden_chars" != x; then
13550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13554      # Going to short mode and back again did indeed matter. Since short mode is
13555      # case insensitive, let's make it lowercase to improve readability.
13556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13557      # Now convert it back to Unix-stile (cygpath)
13558      input_path=`$CYGPATH -u "$shortmode_path"`
13559      new_path="$input_path"
13560    fi
13561  fi
13562
13563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13564  if test "x$test_cygdrive_prefix" = x; then
13565    # As a simple fix, exclude /usr/bin since it's not a real path.
13566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13568      # a path prefixed by /cygdrive for fixpath to work.
13569      new_path="$CYGWIN_ROOT_PATH$input_path"
13570    fi
13571  fi
13572
13573
13574  if test "x$path" != "x$new_path"; then
13575    BOOT_JDK="$new_path"
13576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13578  fi
13579
13580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13581
13582  path="$BOOT_JDK"
13583  has_colon=`$ECHO $path | $GREP ^.:`
13584  new_path="$path"
13585  if test "x$has_colon" = x; then
13586    # Not in mixed or Windows style, start by that.
13587    new_path=`cmd //c echo $path`
13588  fi
13589
13590
13591  input_path="$new_path"
13592  # Check if we need to convert this using DOS-style short mode. If the path
13593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13594  # take no chances and rewrite it.
13595  # Note: m4 eats our [], so we need to use [ and ] instead.
13596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13597  if test "x$has_forbidden_chars" != x; then
13598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13600  fi
13601
13602
13603  windows_path="$new_path"
13604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13605    unix_path=`$CYGPATH -u "$windows_path"`
13606    new_path="$unix_path"
13607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13609    new_path="$unix_path"
13610  fi
13611
13612  if test "x$path" != "x$new_path"; then
13613    BOOT_JDK="$new_path"
13614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13616  fi
13617
13618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13620
13621  else
13622    # We're on a posix platform. Hooray! :)
13623    path="$BOOT_JDK"
13624    has_space=`$ECHO "$path" | $GREP " "`
13625    if test "x$has_space" != x; then
13626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13627$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13628      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13629    fi
13630
13631    # Use eval to expand a potential ~
13632    eval path="$path"
13633    if test ! -f "$path" && test ! -d "$path"; then
13634      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13635    fi
13636
13637    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13638  fi
13639
13640              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13641$as_echo_n "checking for Boot JDK... " >&6; }
13642              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13643$as_echo "$BOOT_JDK" >&6; }
13644              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13645$as_echo_n "checking Boot JDK version... " >&6; }
13646              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13647              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13648$as_echo "$BOOT_JDK_VERSION" >&6; }
13649            fi # end check jdk version
13650          fi # end check rt.jar
13651        fi # end check javac
13652      fi # end check java
13653    fi # end check boot jdk found
13654  fi
13655
13656
13657  if test "x$BOOT_JDK_FOUND" = xno; then
13658    # Now execute the test
13659
13660  if test "x$ProgramFiles" != x; then
13661    VIRTUAL_DIR="$ProgramFiles/Java"
13662
13663  windows_path="$VIRTUAL_DIR"
13664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13665    unix_path=`$CYGPATH -u "$windows_path"`
13666    VIRTUAL_DIR="$unix_path"
13667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13669    VIRTUAL_DIR="$unix_path"
13670  fi
13671
13672
13673  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13674  BOOT_JDK_SUFFIX=""
13675  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13676  if test "x$ALL_JDKS_FOUND" != x; then
13677    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13678
13679  if test "x$BOOT_JDK_FOUND" = xno; then
13680    # Now execute the test
13681
13682        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13683        if test -d "$BOOT_JDK"; then
13684          BOOT_JDK_FOUND=maybe
13685          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13686$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13687        fi
13688
13689
13690    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13691    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13692      # Do we have a bin/java?
13693      if test ! -x "$BOOT_JDK/bin/java"; then
13694        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13696        BOOT_JDK_FOUND=no
13697      else
13698        # Do we have a bin/javac?
13699        if test ! -x "$BOOT_JDK/bin/javac"; then
13700          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13702          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13703$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13704          BOOT_JDK_FOUND=no
13705        else
13706          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13707          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13708            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13710            BOOT_JDK_FOUND=no
13711          else
13712            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13713            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13714
13715            # Extra M4 quote needed to protect [] in grep expression.
13716            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13717            if test "x$FOUND_VERSION_78" = x; then
13718              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13720              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13721$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13722              BOOT_JDK_FOUND=no
13723            else
13724              # We're done! :-)
13725              BOOT_JDK_FOUND=yes
13726
13727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13728
13729  # Input might be given as Windows format, start by converting to
13730  # unix format.
13731  path="$BOOT_JDK"
13732  new_path=`$CYGPATH -u "$path"`
13733
13734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13737  # "foo.exe" is OK but "foo" is an error.
13738  #
13739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13740  # It is also a way to make sure we got the proper file name for the real test later on.
13741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13742  if test "x$test_shortpath" = x; then
13743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13745    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13746  fi
13747
13748  # Call helper function which possibly converts this using DOS-style short mode.
13749  # If so, the updated path is stored in $new_path.
13750
13751  input_path="$new_path"
13752  # Check if we need to convert this using DOS-style short mode. If the path
13753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13754  # take no chances and rewrite it.
13755  # Note: m4 eats our [], so we need to use [ and ] instead.
13756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13757  if test "x$has_forbidden_chars" != x; then
13758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13762      # Going to short mode and back again did indeed matter. Since short mode is
13763      # case insensitive, let's make it lowercase to improve readability.
13764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13765      # Now convert it back to Unix-stile (cygpath)
13766      input_path=`$CYGPATH -u "$shortmode_path"`
13767      new_path="$input_path"
13768    fi
13769  fi
13770
13771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13772  if test "x$test_cygdrive_prefix" = x; then
13773    # As a simple fix, exclude /usr/bin since it's not a real path.
13774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13776      # a path prefixed by /cygdrive for fixpath to work.
13777      new_path="$CYGWIN_ROOT_PATH$input_path"
13778    fi
13779  fi
13780
13781
13782  if test "x$path" != "x$new_path"; then
13783    BOOT_JDK="$new_path"
13784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13785$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13786  fi
13787
13788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13789
13790  path="$BOOT_JDK"
13791  has_colon=`$ECHO $path | $GREP ^.:`
13792  new_path="$path"
13793  if test "x$has_colon" = x; then
13794    # Not in mixed or Windows style, start by that.
13795    new_path=`cmd //c echo $path`
13796  fi
13797
13798
13799  input_path="$new_path"
13800  # Check if we need to convert this using DOS-style short mode. If the path
13801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13802  # take no chances and rewrite it.
13803  # Note: m4 eats our [], so we need to use [ and ] instead.
13804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13805  if test "x$has_forbidden_chars" != x; then
13806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13808  fi
13809
13810
13811  windows_path="$new_path"
13812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13813    unix_path=`$CYGPATH -u "$windows_path"`
13814    new_path="$unix_path"
13815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13817    new_path="$unix_path"
13818  fi
13819
13820  if test "x$path" != "x$new_path"; then
13821    BOOT_JDK="$new_path"
13822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13823$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13824  fi
13825
13826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13828
13829  else
13830    # We're on a posix platform. Hooray! :)
13831    path="$BOOT_JDK"
13832    has_space=`$ECHO "$path" | $GREP " "`
13833    if test "x$has_space" != x; then
13834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13836      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13837    fi
13838
13839    # Use eval to expand a potential ~
13840    eval path="$path"
13841    if test ! -f "$path" && test ! -d "$path"; then
13842      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13843    fi
13844
13845    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13846  fi
13847
13848              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13849$as_echo_n "checking for Boot JDK... " >&6; }
13850              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13851$as_echo "$BOOT_JDK" >&6; }
13852              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13853$as_echo_n "checking Boot JDK version... " >&6; }
13854              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13855              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13856$as_echo "$BOOT_JDK_VERSION" >&6; }
13857            fi # end check jdk version
13858          fi # end check rt.jar
13859        fi # end check javac
13860      fi # end check java
13861    fi # end check boot jdk found
13862  fi
13863
13864    done
13865  fi
13866
13867  fi
13868
13869
13870    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13871    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13872      # Do we have a bin/java?
13873      if test ! -x "$BOOT_JDK/bin/java"; then
13874        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13876        BOOT_JDK_FOUND=no
13877      else
13878        # Do we have a bin/javac?
13879        if test ! -x "$BOOT_JDK/bin/javac"; then
13880          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13882          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13883$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13884          BOOT_JDK_FOUND=no
13885        else
13886          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13887          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13888            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13890            BOOT_JDK_FOUND=no
13891          else
13892            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13893            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13894
13895            # Extra M4 quote needed to protect [] in grep expression.
13896            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13897            if test "x$FOUND_VERSION_78" = x; then
13898              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13900              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13901$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13902              BOOT_JDK_FOUND=no
13903            else
13904              # We're done! :-)
13905              BOOT_JDK_FOUND=yes
13906
13907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13908
13909  # Input might be given as Windows format, start by converting to
13910  # unix format.
13911  path="$BOOT_JDK"
13912  new_path=`$CYGPATH -u "$path"`
13913
13914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13917  # "foo.exe" is OK but "foo" is an error.
13918  #
13919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13920  # It is also a way to make sure we got the proper file name for the real test later on.
13921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13922  if test "x$test_shortpath" = x; then
13923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13925    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13926  fi
13927
13928  # Call helper function which possibly converts this using DOS-style short mode.
13929  # If so, the updated path is stored in $new_path.
13930
13931  input_path="$new_path"
13932  # Check if we need to convert this using DOS-style short mode. If the path
13933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13934  # take no chances and rewrite it.
13935  # Note: m4 eats our [], so we need to use [ and ] instead.
13936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13937  if test "x$has_forbidden_chars" != x; then
13938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13942      # Going to short mode and back again did indeed matter. Since short mode is
13943      # case insensitive, let's make it lowercase to improve readability.
13944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13945      # Now convert it back to Unix-stile (cygpath)
13946      input_path=`$CYGPATH -u "$shortmode_path"`
13947      new_path="$input_path"
13948    fi
13949  fi
13950
13951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13952  if test "x$test_cygdrive_prefix" = x; then
13953    # As a simple fix, exclude /usr/bin since it's not a real path.
13954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13956      # a path prefixed by /cygdrive for fixpath to work.
13957      new_path="$CYGWIN_ROOT_PATH$input_path"
13958    fi
13959  fi
13960
13961
13962  if test "x$path" != "x$new_path"; then
13963    BOOT_JDK="$new_path"
13964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13966  fi
13967
13968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13969
13970  path="$BOOT_JDK"
13971  has_colon=`$ECHO $path | $GREP ^.:`
13972  new_path="$path"
13973  if test "x$has_colon" = x; then
13974    # Not in mixed or Windows style, start by that.
13975    new_path=`cmd //c echo $path`
13976  fi
13977
13978
13979  input_path="$new_path"
13980  # Check if we need to convert this using DOS-style short mode. If the path
13981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13982  # take no chances and rewrite it.
13983  # Note: m4 eats our [], so we need to use [ and ] instead.
13984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13985  if test "x$has_forbidden_chars" != x; then
13986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13988  fi
13989
13990
13991  windows_path="$new_path"
13992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13993    unix_path=`$CYGPATH -u "$windows_path"`
13994    new_path="$unix_path"
13995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13997    new_path="$unix_path"
13998  fi
13999
14000  if test "x$path" != "x$new_path"; then
14001    BOOT_JDK="$new_path"
14002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14004  fi
14005
14006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14008
14009  else
14010    # We're on a posix platform. Hooray! :)
14011    path="$BOOT_JDK"
14012    has_space=`$ECHO "$path" | $GREP " "`
14013    if test "x$has_space" != x; then
14014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14016      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14017    fi
14018
14019    # Use eval to expand a potential ~
14020    eval path="$path"
14021    if test ! -f "$path" && test ! -d "$path"; then
14022      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14023    fi
14024
14025    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14026  fi
14027
14028              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14029$as_echo_n "checking for Boot JDK... " >&6; }
14030              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14031$as_echo "$BOOT_JDK" >&6; }
14032              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14033$as_echo_n "checking Boot JDK version... " >&6; }
14034              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14035              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14036$as_echo "$BOOT_JDK_VERSION" >&6; }
14037            fi # end check jdk version
14038          fi # end check rt.jar
14039        fi # end check javac
14040      fi # end check java
14041    fi # end check boot jdk found
14042  fi
14043
14044
14045  if test "x$BOOT_JDK_FOUND" = xno; then
14046    # Now execute the test
14047
14048  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14049  BOOT_JDK_SUFFIX=""
14050  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14051  if test "x$ALL_JDKS_FOUND" != x; then
14052    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14053
14054  if test "x$BOOT_JDK_FOUND" = xno; then
14055    # Now execute the test
14056
14057        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14058        if test -d "$BOOT_JDK"; then
14059          BOOT_JDK_FOUND=maybe
14060          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14061$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14062        fi
14063
14064
14065    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14066    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14067      # Do we have a bin/java?
14068      if test ! -x "$BOOT_JDK/bin/java"; then
14069        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14071        BOOT_JDK_FOUND=no
14072      else
14073        # Do we have a bin/javac?
14074        if test ! -x "$BOOT_JDK/bin/javac"; then
14075          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14077          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14078$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14079          BOOT_JDK_FOUND=no
14080        else
14081          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14082          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14083            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14085            BOOT_JDK_FOUND=no
14086          else
14087            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14088            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14089
14090            # Extra M4 quote needed to protect [] in grep expression.
14091            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14092            if test "x$FOUND_VERSION_78" = x; then
14093              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14095              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14096$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14097              BOOT_JDK_FOUND=no
14098            else
14099              # We're done! :-)
14100              BOOT_JDK_FOUND=yes
14101
14102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14103
14104  # Input might be given as Windows format, start by converting to
14105  # unix format.
14106  path="$BOOT_JDK"
14107  new_path=`$CYGPATH -u "$path"`
14108
14109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14112  # "foo.exe" is OK but "foo" is an error.
14113  #
14114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14115  # It is also a way to make sure we got the proper file name for the real test later on.
14116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14117  if test "x$test_shortpath" = x; then
14118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14120    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14121  fi
14122
14123  # Call helper function which possibly converts this using DOS-style short mode.
14124  # If so, the updated path is stored in $new_path.
14125
14126  input_path="$new_path"
14127  # Check if we need to convert this using DOS-style short mode. If the path
14128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14129  # take no chances and rewrite it.
14130  # Note: m4 eats our [], so we need to use [ and ] instead.
14131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14132  if test "x$has_forbidden_chars" != x; then
14133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14137      # Going to short mode and back again did indeed matter. Since short mode is
14138      # case insensitive, let's make it lowercase to improve readability.
14139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14140      # Now convert it back to Unix-stile (cygpath)
14141      input_path=`$CYGPATH -u "$shortmode_path"`
14142      new_path="$input_path"
14143    fi
14144  fi
14145
14146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14147  if test "x$test_cygdrive_prefix" = x; then
14148    # As a simple fix, exclude /usr/bin since it's not a real path.
14149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14151      # a path prefixed by /cygdrive for fixpath to work.
14152      new_path="$CYGWIN_ROOT_PATH$input_path"
14153    fi
14154  fi
14155
14156
14157  if test "x$path" != "x$new_path"; then
14158    BOOT_JDK="$new_path"
14159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14161  fi
14162
14163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14164
14165  path="$BOOT_JDK"
14166  has_colon=`$ECHO $path | $GREP ^.:`
14167  new_path="$path"
14168  if test "x$has_colon" = x; then
14169    # Not in mixed or Windows style, start by that.
14170    new_path=`cmd //c echo $path`
14171  fi
14172
14173
14174  input_path="$new_path"
14175  # Check if we need to convert this using DOS-style short mode. If the path
14176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14177  # take no chances and rewrite it.
14178  # Note: m4 eats our [], so we need to use [ and ] instead.
14179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14180  if test "x$has_forbidden_chars" != x; then
14181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14183  fi
14184
14185
14186  windows_path="$new_path"
14187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14188    unix_path=`$CYGPATH -u "$windows_path"`
14189    new_path="$unix_path"
14190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14192    new_path="$unix_path"
14193  fi
14194
14195  if test "x$path" != "x$new_path"; then
14196    BOOT_JDK="$new_path"
14197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14199  fi
14200
14201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14203
14204  else
14205    # We're on a posix platform. Hooray! :)
14206    path="$BOOT_JDK"
14207    has_space=`$ECHO "$path" | $GREP " "`
14208    if test "x$has_space" != x; then
14209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14211      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14212    fi
14213
14214    # Use eval to expand a potential ~
14215    eval path="$path"
14216    if test ! -f "$path" && test ! -d "$path"; then
14217      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14218    fi
14219
14220    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14221  fi
14222
14223              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14224$as_echo_n "checking for Boot JDK... " >&6; }
14225              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14226$as_echo "$BOOT_JDK" >&6; }
14227              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14228$as_echo_n "checking Boot JDK version... " >&6; }
14229              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14230              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14231$as_echo "$BOOT_JDK_VERSION" >&6; }
14232            fi # end check jdk version
14233          fi # end check rt.jar
14234        fi # end check javac
14235      fi # end check java
14236    fi # end check boot jdk found
14237  fi
14238
14239    done
14240  fi
14241
14242
14243    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14244    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14245      # Do we have a bin/java?
14246      if test ! -x "$BOOT_JDK/bin/java"; then
14247        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14249        BOOT_JDK_FOUND=no
14250      else
14251        # Do we have a bin/javac?
14252        if test ! -x "$BOOT_JDK/bin/javac"; then
14253          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14255          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14256$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14257          BOOT_JDK_FOUND=no
14258        else
14259          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14260          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14261            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14263            BOOT_JDK_FOUND=no
14264          else
14265            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14266            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14267
14268            # Extra M4 quote needed to protect [] in grep expression.
14269            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14270            if test "x$FOUND_VERSION_78" = x; then
14271              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14273              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14274$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14275              BOOT_JDK_FOUND=no
14276            else
14277              # We're done! :-)
14278              BOOT_JDK_FOUND=yes
14279
14280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14281
14282  # Input might be given as Windows format, start by converting to
14283  # unix format.
14284  path="$BOOT_JDK"
14285  new_path=`$CYGPATH -u "$path"`
14286
14287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14290  # "foo.exe" is OK but "foo" is an error.
14291  #
14292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14293  # It is also a way to make sure we got the proper file name for the real test later on.
14294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14295  if test "x$test_shortpath" = x; then
14296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14299  fi
14300
14301  # Call helper function which possibly converts this using DOS-style short mode.
14302  # If so, the updated path is stored in $new_path.
14303
14304  input_path="$new_path"
14305  # Check if we need to convert this using DOS-style short mode. If the path
14306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14307  # take no chances and rewrite it.
14308  # Note: m4 eats our [], so we need to use [ and ] instead.
14309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14310  if test "x$has_forbidden_chars" != x; then
14311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14315      # Going to short mode and back again did indeed matter. Since short mode is
14316      # case insensitive, let's make it lowercase to improve readability.
14317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14318      # Now convert it back to Unix-stile (cygpath)
14319      input_path=`$CYGPATH -u "$shortmode_path"`
14320      new_path="$input_path"
14321    fi
14322  fi
14323
14324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14325  if test "x$test_cygdrive_prefix" = x; then
14326    # As a simple fix, exclude /usr/bin since it's not a real path.
14327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14329      # a path prefixed by /cygdrive for fixpath to work.
14330      new_path="$CYGWIN_ROOT_PATH$input_path"
14331    fi
14332  fi
14333
14334
14335  if test "x$path" != "x$new_path"; then
14336    BOOT_JDK="$new_path"
14337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14339  fi
14340
14341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14342
14343  path="$BOOT_JDK"
14344  has_colon=`$ECHO $path | $GREP ^.:`
14345  new_path="$path"
14346  if test "x$has_colon" = x; then
14347    # Not in mixed or Windows style, start by that.
14348    new_path=`cmd //c echo $path`
14349  fi
14350
14351
14352  input_path="$new_path"
14353  # Check if we need to convert this using DOS-style short mode. If the path
14354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14355  # take no chances and rewrite it.
14356  # Note: m4 eats our [], so we need to use [ and ] instead.
14357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14358  if test "x$has_forbidden_chars" != x; then
14359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14361  fi
14362
14363
14364  windows_path="$new_path"
14365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14366    unix_path=`$CYGPATH -u "$windows_path"`
14367    new_path="$unix_path"
14368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14370    new_path="$unix_path"
14371  fi
14372
14373  if test "x$path" != "x$new_path"; then
14374    BOOT_JDK="$new_path"
14375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14377  fi
14378
14379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14381
14382  else
14383    # We're on a posix platform. Hooray! :)
14384    path="$BOOT_JDK"
14385    has_space=`$ECHO "$path" | $GREP " "`
14386    if test "x$has_space" != x; then
14387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14390    fi
14391
14392    # Use eval to expand a potential ~
14393    eval path="$path"
14394    if test ! -f "$path" && test ! -d "$path"; then
14395      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14396    fi
14397
14398    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14399  fi
14400
14401              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14402$as_echo_n "checking for Boot JDK... " >&6; }
14403              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14404$as_echo "$BOOT_JDK" >&6; }
14405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14406$as_echo_n "checking Boot JDK version... " >&6; }
14407              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14409$as_echo "$BOOT_JDK_VERSION" >&6; }
14410            fi # end check jdk version
14411          fi # end check rt.jar
14412        fi # end check javac
14413      fi # end check java
14414    fi # end check boot jdk found
14415  fi
14416
14417  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14418
14419  if test "x$BOOT_JDK_FOUND" = xno; then
14420    # Now execute the test
14421
14422  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14423  BOOT_JDK_SUFFIX="/Contents/Home"
14424  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14425  if test "x$ALL_JDKS_FOUND" != x; then
14426    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14427
14428  if test "x$BOOT_JDK_FOUND" = xno; then
14429    # Now execute the test
14430
14431        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14432        if test -d "$BOOT_JDK"; then
14433          BOOT_JDK_FOUND=maybe
14434          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14435$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14436        fi
14437
14438
14439    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14440    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14441      # Do we have a bin/java?
14442      if test ! -x "$BOOT_JDK/bin/java"; then
14443        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14445        BOOT_JDK_FOUND=no
14446      else
14447        # Do we have a bin/javac?
14448        if test ! -x "$BOOT_JDK/bin/javac"; then
14449          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14451          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14452$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14453          BOOT_JDK_FOUND=no
14454        else
14455          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14456          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14459            BOOT_JDK_FOUND=no
14460          else
14461            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14462            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14463
14464            # Extra M4 quote needed to protect [] in grep expression.
14465            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14466            if test "x$FOUND_VERSION_78" = x; then
14467              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14470$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14471              BOOT_JDK_FOUND=no
14472            else
14473              # We're done! :-)
14474              BOOT_JDK_FOUND=yes
14475
14476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14477
14478  # Input might be given as Windows format, start by converting to
14479  # unix format.
14480  path="$BOOT_JDK"
14481  new_path=`$CYGPATH -u "$path"`
14482
14483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14486  # "foo.exe" is OK but "foo" is an error.
14487  #
14488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14489  # It is also a way to make sure we got the proper file name for the real test later on.
14490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14491  if test "x$test_shortpath" = x; then
14492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14494    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14495  fi
14496
14497  # Call helper function which possibly converts this using DOS-style short mode.
14498  # If so, the updated path is stored in $new_path.
14499
14500  input_path="$new_path"
14501  # Check if we need to convert this using DOS-style short mode. If the path
14502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14503  # take no chances and rewrite it.
14504  # Note: m4 eats our [], so we need to use [ and ] instead.
14505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14506  if test "x$has_forbidden_chars" != x; then
14507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14511      # Going to short mode and back again did indeed matter. Since short mode is
14512      # case insensitive, let's make it lowercase to improve readability.
14513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14514      # Now convert it back to Unix-stile (cygpath)
14515      input_path=`$CYGPATH -u "$shortmode_path"`
14516      new_path="$input_path"
14517    fi
14518  fi
14519
14520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14521  if test "x$test_cygdrive_prefix" = x; then
14522    # As a simple fix, exclude /usr/bin since it's not a real path.
14523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14525      # a path prefixed by /cygdrive for fixpath to work.
14526      new_path="$CYGWIN_ROOT_PATH$input_path"
14527    fi
14528  fi
14529
14530
14531  if test "x$path" != "x$new_path"; then
14532    BOOT_JDK="$new_path"
14533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14535  fi
14536
14537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14538
14539  path="$BOOT_JDK"
14540  has_colon=`$ECHO $path | $GREP ^.:`
14541  new_path="$path"
14542  if test "x$has_colon" = x; then
14543    # Not in mixed or Windows style, start by that.
14544    new_path=`cmd //c echo $path`
14545  fi
14546
14547
14548  input_path="$new_path"
14549  # Check if we need to convert this using DOS-style short mode. If the path
14550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14551  # take no chances and rewrite it.
14552  # Note: m4 eats our [], so we need to use [ and ] instead.
14553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14554  if test "x$has_forbidden_chars" != x; then
14555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14557  fi
14558
14559
14560  windows_path="$new_path"
14561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14562    unix_path=`$CYGPATH -u "$windows_path"`
14563    new_path="$unix_path"
14564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14566    new_path="$unix_path"
14567  fi
14568
14569  if test "x$path" != "x$new_path"; then
14570    BOOT_JDK="$new_path"
14571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14573  fi
14574
14575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14577
14578  else
14579    # We're on a posix platform. Hooray! :)
14580    path="$BOOT_JDK"
14581    has_space=`$ECHO "$path" | $GREP " "`
14582    if test "x$has_space" != x; then
14583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14585      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14586    fi
14587
14588    # Use eval to expand a potential ~
14589    eval path="$path"
14590    if test ! -f "$path" && test ! -d "$path"; then
14591      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14592    fi
14593
14594    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14595  fi
14596
14597              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14598$as_echo_n "checking for Boot JDK... " >&6; }
14599              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14600$as_echo "$BOOT_JDK" >&6; }
14601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14602$as_echo_n "checking Boot JDK version... " >&6; }
14603              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14604              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14605$as_echo "$BOOT_JDK_VERSION" >&6; }
14606            fi # end check jdk version
14607          fi # end check rt.jar
14608        fi # end check javac
14609      fi # end check java
14610    fi # end check boot jdk found
14611  fi
14612
14613    done
14614  fi
14615
14616
14617    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14618    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14619      # Do we have a bin/java?
14620      if test ! -x "$BOOT_JDK/bin/java"; then
14621        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14623        BOOT_JDK_FOUND=no
14624      else
14625        # Do we have a bin/javac?
14626        if test ! -x "$BOOT_JDK/bin/javac"; then
14627          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14629          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14630$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14631          BOOT_JDK_FOUND=no
14632        else
14633          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14634          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14635            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14637            BOOT_JDK_FOUND=no
14638          else
14639            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14640            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14641
14642            # Extra M4 quote needed to protect [] in grep expression.
14643            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14644            if test "x$FOUND_VERSION_78" = x; then
14645              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14647              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14648$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14649              BOOT_JDK_FOUND=no
14650            else
14651              # We're done! :-)
14652              BOOT_JDK_FOUND=yes
14653
14654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14655
14656  # Input might be given as Windows format, start by converting to
14657  # unix format.
14658  path="$BOOT_JDK"
14659  new_path=`$CYGPATH -u "$path"`
14660
14661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14664  # "foo.exe" is OK but "foo" is an error.
14665  #
14666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14667  # It is also a way to make sure we got the proper file name for the real test later on.
14668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14669  if test "x$test_shortpath" = x; then
14670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14671$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14672    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14673  fi
14674
14675  # Call helper function which possibly converts this using DOS-style short mode.
14676  # If so, the updated path is stored in $new_path.
14677
14678  input_path="$new_path"
14679  # Check if we need to convert this using DOS-style short mode. If the path
14680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14681  # take no chances and rewrite it.
14682  # Note: m4 eats our [], so we need to use [ and ] instead.
14683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14684  if test "x$has_forbidden_chars" != x; then
14685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14689      # Going to short mode and back again did indeed matter. Since short mode is
14690      # case insensitive, let's make it lowercase to improve readability.
14691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14692      # Now convert it back to Unix-stile (cygpath)
14693      input_path=`$CYGPATH -u "$shortmode_path"`
14694      new_path="$input_path"
14695    fi
14696  fi
14697
14698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14699  if test "x$test_cygdrive_prefix" = x; then
14700    # As a simple fix, exclude /usr/bin since it's not a real path.
14701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14703      # a path prefixed by /cygdrive for fixpath to work.
14704      new_path="$CYGWIN_ROOT_PATH$input_path"
14705    fi
14706  fi
14707
14708
14709  if test "x$path" != "x$new_path"; then
14710    BOOT_JDK="$new_path"
14711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14712$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14713  fi
14714
14715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14716
14717  path="$BOOT_JDK"
14718  has_colon=`$ECHO $path | $GREP ^.:`
14719  new_path="$path"
14720  if test "x$has_colon" = x; then
14721    # Not in mixed or Windows style, start by that.
14722    new_path=`cmd //c echo $path`
14723  fi
14724
14725
14726  input_path="$new_path"
14727  # Check if we need to convert this using DOS-style short mode. If the path
14728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14729  # take no chances and rewrite it.
14730  # Note: m4 eats our [], so we need to use [ and ] instead.
14731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14732  if test "x$has_forbidden_chars" != x; then
14733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14735  fi
14736
14737
14738  windows_path="$new_path"
14739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14740    unix_path=`$CYGPATH -u "$windows_path"`
14741    new_path="$unix_path"
14742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14744    new_path="$unix_path"
14745  fi
14746
14747  if test "x$path" != "x$new_path"; then
14748    BOOT_JDK="$new_path"
14749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14750$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14751  fi
14752
14753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14755
14756  else
14757    # We're on a posix platform. Hooray! :)
14758    path="$BOOT_JDK"
14759    has_space=`$ECHO "$path" | $GREP " "`
14760    if test "x$has_space" != x; then
14761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14763      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14764    fi
14765
14766    # Use eval to expand a potential ~
14767    eval path="$path"
14768    if test ! -f "$path" && test ! -d "$path"; then
14769      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14770    fi
14771
14772    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14773  fi
14774
14775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14776$as_echo_n "checking for Boot JDK... " >&6; }
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14778$as_echo "$BOOT_JDK" >&6; }
14779              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14780$as_echo_n "checking Boot JDK version... " >&6; }
14781              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14783$as_echo "$BOOT_JDK_VERSION" >&6; }
14784            fi # end check jdk version
14785          fi # end check rt.jar
14786        fi # end check javac
14787      fi # end check java
14788    fi # end check boot jdk found
14789  fi
14790
14791
14792  if test "x$BOOT_JDK_FOUND" = xno; then
14793    # Now execute the test
14794
14795  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14796  BOOT_JDK_SUFFIX="/Contents/Home"
14797  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14798  if test "x$ALL_JDKS_FOUND" != x; then
14799    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14800
14801  if test "x$BOOT_JDK_FOUND" = xno; then
14802    # Now execute the test
14803
14804        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14805        if test -d "$BOOT_JDK"; then
14806          BOOT_JDK_FOUND=maybe
14807          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14808$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14809        fi
14810
14811
14812    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14813    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14814      # Do we have a bin/java?
14815      if test ! -x "$BOOT_JDK/bin/java"; then
14816        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14818        BOOT_JDK_FOUND=no
14819      else
14820        # Do we have a bin/javac?
14821        if test ! -x "$BOOT_JDK/bin/javac"; then
14822          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14824          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14825$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14826          BOOT_JDK_FOUND=no
14827        else
14828          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14829          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14830            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14832            BOOT_JDK_FOUND=no
14833          else
14834            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14835            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14836
14837            # Extra M4 quote needed to protect [] in grep expression.
14838            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14839            if test "x$FOUND_VERSION_78" = x; then
14840              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14842              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14843$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14844              BOOT_JDK_FOUND=no
14845            else
14846              # We're done! :-)
14847              BOOT_JDK_FOUND=yes
14848
14849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14850
14851  # Input might be given as Windows format, start by converting to
14852  # unix format.
14853  path="$BOOT_JDK"
14854  new_path=`$CYGPATH -u "$path"`
14855
14856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14859  # "foo.exe" is OK but "foo" is an error.
14860  #
14861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14862  # It is also a way to make sure we got the proper file name for the real test later on.
14863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14864  if test "x$test_shortpath" = x; then
14865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14867    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14868  fi
14869
14870  # Call helper function which possibly converts this using DOS-style short mode.
14871  # If so, the updated path is stored in $new_path.
14872
14873  input_path="$new_path"
14874  # Check if we need to convert this using DOS-style short mode. If the path
14875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14876  # take no chances and rewrite it.
14877  # Note: m4 eats our [], so we need to use [ and ] instead.
14878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14879  if test "x$has_forbidden_chars" != x; then
14880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14884      # Going to short mode and back again did indeed matter. Since short mode is
14885      # case insensitive, let's make it lowercase to improve readability.
14886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14887      # Now convert it back to Unix-stile (cygpath)
14888      input_path=`$CYGPATH -u "$shortmode_path"`
14889      new_path="$input_path"
14890    fi
14891  fi
14892
14893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14894  if test "x$test_cygdrive_prefix" = x; then
14895    # As a simple fix, exclude /usr/bin since it's not a real path.
14896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14898      # a path prefixed by /cygdrive for fixpath to work.
14899      new_path="$CYGWIN_ROOT_PATH$input_path"
14900    fi
14901  fi
14902
14903
14904  if test "x$path" != "x$new_path"; then
14905    BOOT_JDK="$new_path"
14906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14908  fi
14909
14910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14911
14912  path="$BOOT_JDK"
14913  has_colon=`$ECHO $path | $GREP ^.:`
14914  new_path="$path"
14915  if test "x$has_colon" = x; then
14916    # Not in mixed or Windows style, start by that.
14917    new_path=`cmd //c echo $path`
14918  fi
14919
14920
14921  input_path="$new_path"
14922  # Check if we need to convert this using DOS-style short mode. If the path
14923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14924  # take no chances and rewrite it.
14925  # Note: m4 eats our [], so we need to use [ and ] instead.
14926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14927  if test "x$has_forbidden_chars" != x; then
14928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14930  fi
14931
14932
14933  windows_path="$new_path"
14934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14935    unix_path=`$CYGPATH -u "$windows_path"`
14936    new_path="$unix_path"
14937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14939    new_path="$unix_path"
14940  fi
14941
14942  if test "x$path" != "x$new_path"; then
14943    BOOT_JDK="$new_path"
14944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14945$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14946  fi
14947
14948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14950
14951  else
14952    # We're on a posix platform. Hooray! :)
14953    path="$BOOT_JDK"
14954    has_space=`$ECHO "$path" | $GREP " "`
14955    if test "x$has_space" != x; then
14956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14958      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14959    fi
14960
14961    # Use eval to expand a potential ~
14962    eval path="$path"
14963    if test ! -f "$path" && test ! -d "$path"; then
14964      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14965    fi
14966
14967    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14968  fi
14969
14970              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14971$as_echo_n "checking for Boot JDK... " >&6; }
14972              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14973$as_echo "$BOOT_JDK" >&6; }
14974              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14975$as_echo_n "checking Boot JDK version... " >&6; }
14976              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14977              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14978$as_echo "$BOOT_JDK_VERSION" >&6; }
14979            fi # end check jdk version
14980          fi # end check rt.jar
14981        fi # end check javac
14982      fi # end check java
14983    fi # end check boot jdk found
14984  fi
14985
14986    done
14987  fi
14988
14989
14990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14992      # Do we have a bin/java?
14993      if test ! -x "$BOOT_JDK/bin/java"; then
14994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14996        BOOT_JDK_FOUND=no
14997      else
14998        # Do we have a bin/javac?
14999        if test ! -x "$BOOT_JDK/bin/javac"; then
15000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15004          BOOT_JDK_FOUND=no
15005        else
15006          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15007          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15008            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15010            BOOT_JDK_FOUND=no
15011          else
15012            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15013            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15014
15015            # Extra M4 quote needed to protect [] in grep expression.
15016            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15017            if test "x$FOUND_VERSION_78" = x; then
15018              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15020              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15021$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15022              BOOT_JDK_FOUND=no
15023            else
15024              # We're done! :-)
15025              BOOT_JDK_FOUND=yes
15026
15027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15028
15029  # Input might be given as Windows format, start by converting to
15030  # unix format.
15031  path="$BOOT_JDK"
15032  new_path=`$CYGPATH -u "$path"`
15033
15034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15037  # "foo.exe" is OK but "foo" is an error.
15038  #
15039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15040  # It is also a way to make sure we got the proper file name for the real test later on.
15041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15042  if test "x$test_shortpath" = x; then
15043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15045    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15046  fi
15047
15048  # Call helper function which possibly converts this using DOS-style short mode.
15049  # If so, the updated path is stored in $new_path.
15050
15051  input_path="$new_path"
15052  # Check if we need to convert this using DOS-style short mode. If the path
15053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15054  # take no chances and rewrite it.
15055  # Note: m4 eats our [], so we need to use [ and ] instead.
15056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15057  if test "x$has_forbidden_chars" != x; then
15058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15062      # Going to short mode and back again did indeed matter. Since short mode is
15063      # case insensitive, let's make it lowercase to improve readability.
15064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15065      # Now convert it back to Unix-stile (cygpath)
15066      input_path=`$CYGPATH -u "$shortmode_path"`
15067      new_path="$input_path"
15068    fi
15069  fi
15070
15071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15072  if test "x$test_cygdrive_prefix" = x; then
15073    # As a simple fix, exclude /usr/bin since it's not a real path.
15074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15076      # a path prefixed by /cygdrive for fixpath to work.
15077      new_path="$CYGWIN_ROOT_PATH$input_path"
15078    fi
15079  fi
15080
15081
15082  if test "x$path" != "x$new_path"; then
15083    BOOT_JDK="$new_path"
15084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15086  fi
15087
15088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15089
15090  path="$BOOT_JDK"
15091  has_colon=`$ECHO $path | $GREP ^.:`
15092  new_path="$path"
15093  if test "x$has_colon" = x; then
15094    # Not in mixed or Windows style, start by that.
15095    new_path=`cmd //c echo $path`
15096  fi
15097
15098
15099  input_path="$new_path"
15100  # Check if we need to convert this using DOS-style short mode. If the path
15101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15102  # take no chances and rewrite it.
15103  # Note: m4 eats our [], so we need to use [ and ] instead.
15104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15105  if test "x$has_forbidden_chars" != x; then
15106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15108  fi
15109
15110
15111  windows_path="$new_path"
15112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15113    unix_path=`$CYGPATH -u "$windows_path"`
15114    new_path="$unix_path"
15115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15117    new_path="$unix_path"
15118  fi
15119
15120  if test "x$path" != "x$new_path"; then
15121    BOOT_JDK="$new_path"
15122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15124  fi
15125
15126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15128
15129  else
15130    # We're on a posix platform. Hooray! :)
15131    path="$BOOT_JDK"
15132    has_space=`$ECHO "$path" | $GREP " "`
15133    if test "x$has_space" != x; then
15134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15136      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15137    fi
15138
15139    # Use eval to expand a potential ~
15140    eval path="$path"
15141    if test ! -f "$path" && test ! -d "$path"; then
15142      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15143    fi
15144
15145    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15146  fi
15147
15148              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15149$as_echo_n "checking for Boot JDK... " >&6; }
15150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15151$as_echo "$BOOT_JDK" >&6; }
15152              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15153$as_echo_n "checking Boot JDK version... " >&6; }
15154              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15155              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15156$as_echo "$BOOT_JDK_VERSION" >&6; }
15157            fi # end check jdk version
15158          fi # end check rt.jar
15159        fi # end check javac
15160      fi # end check java
15161    fi # end check boot jdk found
15162  fi
15163
15164  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15165
15166  if test "x$BOOT_JDK_FOUND" = xno; then
15167    # Now execute the test
15168
15169  BOOT_JDK_PREFIX="/usr/lib/jvm"
15170  BOOT_JDK_SUFFIX=""
15171  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15172  if test "x$ALL_JDKS_FOUND" != x; then
15173    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15174
15175  if test "x$BOOT_JDK_FOUND" = xno; then
15176    # Now execute the test
15177
15178        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15179        if test -d "$BOOT_JDK"; then
15180          BOOT_JDK_FOUND=maybe
15181          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15182$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15183        fi
15184
15185
15186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15188      # Do we have a bin/java?
15189      if test ! -x "$BOOT_JDK/bin/java"; then
15190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15192        BOOT_JDK_FOUND=no
15193      else
15194        # Do we have a bin/javac?
15195        if test ! -x "$BOOT_JDK/bin/javac"; then
15196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15200          BOOT_JDK_FOUND=no
15201        else
15202          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15203          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15206            BOOT_JDK_FOUND=no
15207          else
15208            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15209            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15210
15211            # Extra M4 quote needed to protect [] in grep expression.
15212            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15213            if test "x$FOUND_VERSION_78" = x; then
15214              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15216              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15217$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15218              BOOT_JDK_FOUND=no
15219            else
15220              # We're done! :-)
15221              BOOT_JDK_FOUND=yes
15222
15223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15224
15225  # Input might be given as Windows format, start by converting to
15226  # unix format.
15227  path="$BOOT_JDK"
15228  new_path=`$CYGPATH -u "$path"`
15229
15230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15233  # "foo.exe" is OK but "foo" is an error.
15234  #
15235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15236  # It is also a way to make sure we got the proper file name for the real test later on.
15237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15238  if test "x$test_shortpath" = x; then
15239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15241    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15242  fi
15243
15244  # Call helper function which possibly converts this using DOS-style short mode.
15245  # If so, the updated path is stored in $new_path.
15246
15247  input_path="$new_path"
15248  # Check if we need to convert this using DOS-style short mode. If the path
15249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15250  # take no chances and rewrite it.
15251  # Note: m4 eats our [], so we need to use [ and ] instead.
15252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15253  if test "x$has_forbidden_chars" != x; then
15254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15258      # Going to short mode and back again did indeed matter. Since short mode is
15259      # case insensitive, let's make it lowercase to improve readability.
15260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15261      # Now convert it back to Unix-stile (cygpath)
15262      input_path=`$CYGPATH -u "$shortmode_path"`
15263      new_path="$input_path"
15264    fi
15265  fi
15266
15267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15268  if test "x$test_cygdrive_prefix" = x; then
15269    # As a simple fix, exclude /usr/bin since it's not a real path.
15270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15272      # a path prefixed by /cygdrive for fixpath to work.
15273      new_path="$CYGWIN_ROOT_PATH$input_path"
15274    fi
15275  fi
15276
15277
15278  if test "x$path" != "x$new_path"; then
15279    BOOT_JDK="$new_path"
15280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15282  fi
15283
15284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15285
15286  path="$BOOT_JDK"
15287  has_colon=`$ECHO $path | $GREP ^.:`
15288  new_path="$path"
15289  if test "x$has_colon" = x; then
15290    # Not in mixed or Windows style, start by that.
15291    new_path=`cmd //c echo $path`
15292  fi
15293
15294
15295  input_path="$new_path"
15296  # Check if we need to convert this using DOS-style short mode. If the path
15297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15298  # take no chances and rewrite it.
15299  # Note: m4 eats our [], so we need to use [ and ] instead.
15300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15301  if test "x$has_forbidden_chars" != x; then
15302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15304  fi
15305
15306
15307  windows_path="$new_path"
15308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15309    unix_path=`$CYGPATH -u "$windows_path"`
15310    new_path="$unix_path"
15311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15313    new_path="$unix_path"
15314  fi
15315
15316  if test "x$path" != "x$new_path"; then
15317    BOOT_JDK="$new_path"
15318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15320  fi
15321
15322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15324
15325  else
15326    # We're on a posix platform. Hooray! :)
15327    path="$BOOT_JDK"
15328    has_space=`$ECHO "$path" | $GREP " "`
15329    if test "x$has_space" != x; then
15330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15332      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15333    fi
15334
15335    # Use eval to expand a potential ~
15336    eval path="$path"
15337    if test ! -f "$path" && test ! -d "$path"; then
15338      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15339    fi
15340
15341    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15342  fi
15343
15344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15345$as_echo_n "checking for Boot JDK... " >&6; }
15346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15347$as_echo "$BOOT_JDK" >&6; }
15348              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15349$as_echo_n "checking Boot JDK version... " >&6; }
15350              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15351              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15352$as_echo "$BOOT_JDK_VERSION" >&6; }
15353            fi # end check jdk version
15354          fi # end check rt.jar
15355        fi # end check javac
15356      fi # end check java
15357    fi # end check boot jdk found
15358  fi
15359
15360    done
15361  fi
15362
15363
15364    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15365    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15366      # Do we have a bin/java?
15367      if test ! -x "$BOOT_JDK/bin/java"; then
15368        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15370        BOOT_JDK_FOUND=no
15371      else
15372        # Do we have a bin/javac?
15373        if test ! -x "$BOOT_JDK/bin/javac"; then
15374          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15376          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15377$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15378          BOOT_JDK_FOUND=no
15379        else
15380          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15381          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15382            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15384            BOOT_JDK_FOUND=no
15385          else
15386            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15387            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15388
15389            # Extra M4 quote needed to protect [] in grep expression.
15390            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15391            if test "x$FOUND_VERSION_78" = x; then
15392              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15394              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15395$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15396              BOOT_JDK_FOUND=no
15397            else
15398              # We're done! :-)
15399              BOOT_JDK_FOUND=yes
15400
15401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15402
15403  # Input might be given as Windows format, start by converting to
15404  # unix format.
15405  path="$BOOT_JDK"
15406  new_path=`$CYGPATH -u "$path"`
15407
15408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15411  # "foo.exe" is OK but "foo" is an error.
15412  #
15413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15414  # It is also a way to make sure we got the proper file name for the real test later on.
15415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15416  if test "x$test_shortpath" = x; then
15417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15418$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15419    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15420  fi
15421
15422  # Call helper function which possibly converts this using DOS-style short mode.
15423  # If so, the updated path is stored in $new_path.
15424
15425  input_path="$new_path"
15426  # Check if we need to convert this using DOS-style short mode. If the path
15427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15428  # take no chances and rewrite it.
15429  # Note: m4 eats our [], so we need to use [ and ] instead.
15430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15431  if test "x$has_forbidden_chars" != x; then
15432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15436      # Going to short mode and back again did indeed matter. Since short mode is
15437      # case insensitive, let's make it lowercase to improve readability.
15438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15439      # Now convert it back to Unix-stile (cygpath)
15440      input_path=`$CYGPATH -u "$shortmode_path"`
15441      new_path="$input_path"
15442    fi
15443  fi
15444
15445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15446  if test "x$test_cygdrive_prefix" = x; then
15447    # As a simple fix, exclude /usr/bin since it's not a real path.
15448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15450      # a path prefixed by /cygdrive for fixpath to work.
15451      new_path="$CYGWIN_ROOT_PATH$input_path"
15452    fi
15453  fi
15454
15455
15456  if test "x$path" != "x$new_path"; then
15457    BOOT_JDK="$new_path"
15458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15460  fi
15461
15462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15463
15464  path="$BOOT_JDK"
15465  has_colon=`$ECHO $path | $GREP ^.:`
15466  new_path="$path"
15467  if test "x$has_colon" = x; then
15468    # Not in mixed or Windows style, start by that.
15469    new_path=`cmd //c echo $path`
15470  fi
15471
15472
15473  input_path="$new_path"
15474  # Check if we need to convert this using DOS-style short mode. If the path
15475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15476  # take no chances and rewrite it.
15477  # Note: m4 eats our [], so we need to use [ and ] instead.
15478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15479  if test "x$has_forbidden_chars" != x; then
15480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15482  fi
15483
15484
15485  windows_path="$new_path"
15486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15487    unix_path=`$CYGPATH -u "$windows_path"`
15488    new_path="$unix_path"
15489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15491    new_path="$unix_path"
15492  fi
15493
15494  if test "x$path" != "x$new_path"; then
15495    BOOT_JDK="$new_path"
15496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15498  fi
15499
15500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15502
15503  else
15504    # We're on a posix platform. Hooray! :)
15505    path="$BOOT_JDK"
15506    has_space=`$ECHO "$path" | $GREP " "`
15507    if test "x$has_space" != x; then
15508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15509$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15510      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15511    fi
15512
15513    # Use eval to expand a potential ~
15514    eval path="$path"
15515    if test ! -f "$path" && test ! -d "$path"; then
15516      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15517    fi
15518
15519    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15520  fi
15521
15522              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15523$as_echo_n "checking for Boot JDK... " >&6; }
15524              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15525$as_echo "$BOOT_JDK" >&6; }
15526              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15527$as_echo_n "checking Boot JDK version... " >&6; }
15528              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15529              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15530$as_echo "$BOOT_JDK_VERSION" >&6; }
15531            fi # end check jdk version
15532          fi # end check rt.jar
15533        fi # end check javac
15534      fi # end check java
15535    fi # end check boot jdk found
15536  fi
15537
15538  fi
15539
15540
15541    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15542    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15543      # Do we have a bin/java?
15544      if test ! -x "$BOOT_JDK/bin/java"; then
15545        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15547        BOOT_JDK_FOUND=no
15548      else
15549        # Do we have a bin/javac?
15550        if test ! -x "$BOOT_JDK/bin/javac"; then
15551          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15553          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15554$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15555          BOOT_JDK_FOUND=no
15556        else
15557          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15558          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15559            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15561            BOOT_JDK_FOUND=no
15562          else
15563            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15564            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15565
15566            # Extra M4 quote needed to protect [] in grep expression.
15567            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15568            if test "x$FOUND_VERSION_78" = x; then
15569              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15571              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15572$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15573              BOOT_JDK_FOUND=no
15574            else
15575              # We're done! :-)
15576              BOOT_JDK_FOUND=yes
15577
15578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15579
15580  # Input might be given as Windows format, start by converting to
15581  # unix format.
15582  path="$BOOT_JDK"
15583  new_path=`$CYGPATH -u "$path"`
15584
15585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15588  # "foo.exe" is OK but "foo" is an error.
15589  #
15590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15591  # It is also a way to make sure we got the proper file name for the real test later on.
15592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15593  if test "x$test_shortpath" = x; then
15594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15596    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15597  fi
15598
15599  # Call helper function which possibly converts this using DOS-style short mode.
15600  # If so, the updated path is stored in $new_path.
15601
15602  input_path="$new_path"
15603  # Check if we need to convert this using DOS-style short mode. If the path
15604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15605  # take no chances and rewrite it.
15606  # Note: m4 eats our [], so we need to use [ and ] instead.
15607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15608  if test "x$has_forbidden_chars" != x; then
15609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15613      # Going to short mode and back again did indeed matter. Since short mode is
15614      # case insensitive, let's make it lowercase to improve readability.
15615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15616      # Now convert it back to Unix-stile (cygpath)
15617      input_path=`$CYGPATH -u "$shortmode_path"`
15618      new_path="$input_path"
15619    fi
15620  fi
15621
15622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15623  if test "x$test_cygdrive_prefix" = x; then
15624    # As a simple fix, exclude /usr/bin since it's not a real path.
15625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15627      # a path prefixed by /cygdrive for fixpath to work.
15628      new_path="$CYGWIN_ROOT_PATH$input_path"
15629    fi
15630  fi
15631
15632
15633  if test "x$path" != "x$new_path"; then
15634    BOOT_JDK="$new_path"
15635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15637  fi
15638
15639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15640
15641  path="$BOOT_JDK"
15642  has_colon=`$ECHO $path | $GREP ^.:`
15643  new_path="$path"
15644  if test "x$has_colon" = x; then
15645    # Not in mixed or Windows style, start by that.
15646    new_path=`cmd //c echo $path`
15647  fi
15648
15649
15650  input_path="$new_path"
15651  # Check if we need to convert this using DOS-style short mode. If the path
15652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15653  # take no chances and rewrite it.
15654  # Note: m4 eats our [], so we need to use [ and ] instead.
15655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15656  if test "x$has_forbidden_chars" != x; then
15657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15659  fi
15660
15661
15662  windows_path="$new_path"
15663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15664    unix_path=`$CYGPATH -u "$windows_path"`
15665    new_path="$unix_path"
15666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15668    new_path="$unix_path"
15669  fi
15670
15671  if test "x$path" != "x$new_path"; then
15672    BOOT_JDK="$new_path"
15673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15675  fi
15676
15677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15679
15680  else
15681    # We're on a posix platform. Hooray! :)
15682    path="$BOOT_JDK"
15683    has_space=`$ECHO "$path" | $GREP " "`
15684    if test "x$has_space" != x; then
15685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15687      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15688    fi
15689
15690    # Use eval to expand a potential ~
15691    eval path="$path"
15692    if test ! -f "$path" && test ! -d "$path"; then
15693      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15694    fi
15695
15696    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15697  fi
15698
15699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15700$as_echo_n "checking for Boot JDK... " >&6; }
15701              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15702$as_echo "$BOOT_JDK" >&6; }
15703              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15704$as_echo_n "checking Boot JDK version... " >&6; }
15705              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15706              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15707$as_echo "$BOOT_JDK_VERSION" >&6; }
15708            fi # end check jdk version
15709          fi # end check rt.jar
15710        fi # end check javac
15711      fi # end check java
15712    fi # end check boot jdk found
15713  fi
15714
15715
15716# If we haven't found anything yet, we've truly lost. Give up.
15717if test "x$BOOT_JDK_FOUND" = xno; then
15718
15719    # Print a helpful message on how to acquire the necessary build dependency.
15720    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15721    MISSING_DEPENDENCY=openjdk
15722    PKGHANDLER_COMMAND=
15723
15724    case $PKGHANDLER in
15725	apt-get)
15726                apt_help     $MISSING_DEPENDENCY ;;
15727    yum)
15728                yum_help     $MISSING_DEPENDENCY ;;
15729	port)
15730                port_help    $MISSING_DEPENDENCY ;;
15731	pkgutil)
15732                pkgutil_help $MISSING_DEPENDENCY ;;
15733	pkgadd)
15734                pkgadd_help  $MISSING_DEPENDENCY ;;
15735    * )
15736      break ;;
15737    esac
15738
15739    if test "x$PKGHANDLER_COMMAND" != x; then
15740        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15741    fi
15742
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15744$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15745  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15746$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15747  as_fn_error $? "Cannot continue" "$LINENO" 5
15748fi
15749
15750# Setup proper paths for what we found
15751BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15752if test ! -f "$BOOT_RTJAR"; then
15753    # On MacOSX it is called classes.jar
15754    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15755    if test -f "$BOOT_RTJAR"; then
15756      # Remove the ..
15757      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15758    fi
15759fi
15760BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15761BOOT_JDK="$BOOT_JDK"
15762
15763
15764
15765
15766# Setup tools from the Boot JDK.
15767
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15769$as_echo_n "checking for java in Boot JDK... " >&6; }
15770  JAVA=$BOOT_JDK/bin/java
15771  if test ! -x $JAVA; then
15772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15773$as_echo "not found" >&6; }
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15775$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15776      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15777  fi
15778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15779$as_echo "ok" >&6; }
15780
15781
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15783$as_echo_n "checking for javac in Boot JDK... " >&6; }
15784  JAVAC=$BOOT_JDK/bin/javac
15785  if test ! -x $JAVAC; then
15786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15787$as_echo "not found" >&6; }
15788      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15789$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15790      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15791  fi
15792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15793$as_echo "ok" >&6; }
15794
15795
15796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15797$as_echo_n "checking for javah in Boot JDK... " >&6; }
15798  JAVAH=$BOOT_JDK/bin/javah
15799  if test ! -x $JAVAH; then
15800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15801$as_echo "not found" >&6; }
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15803$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15804      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15805  fi
15806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15807$as_echo "ok" >&6; }
15808
15809
15810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15811$as_echo_n "checking for javap in Boot JDK... " >&6; }
15812  JAVAP=$BOOT_JDK/bin/javap
15813  if test ! -x $JAVAP; then
15814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15815$as_echo "not found" >&6; }
15816      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15817$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15818      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15819  fi
15820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15821$as_echo "ok" >&6; }
15822
15823
15824  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15825$as_echo_n "checking for jar in Boot JDK... " >&6; }
15826  JAR=$BOOT_JDK/bin/jar
15827  if test ! -x $JAR; then
15828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15829$as_echo "not found" >&6; }
15830      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15831$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15832      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15833  fi
15834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15835$as_echo "ok" >&6; }
15836
15837
15838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15839$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15840  RMIC=$BOOT_JDK/bin/rmic
15841  if test ! -x $RMIC; then
15842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15843$as_echo "not found" >&6; }
15844      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15845$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15846      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15847  fi
15848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15849$as_echo "ok" >&6; }
15850
15851
15852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15853$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15854  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15855  if test ! -x $NATIVE2ASCII; then
15856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15857$as_echo "not found" >&6; }
15858      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15859$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15860      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15861  fi
15862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15863$as_echo "ok" >&6; }
15864
15865
15866# Finally, set some other options...
15867
15868# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15869BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15870
15871
15872
15873
15874##############################################################################
15875#
15876# Specify options for anything that is run with the Boot JDK.
15877#
15878
15879# Check whether --with-boot-jdk-jvmargs was given.
15880if test "${with_boot_jdk_jvmargs+set}" = set; then :
15881  withval=$with_boot_jdk_jvmargs;
15882fi
15883
15884
15885if test "x$with_boot_jdk_jvmargs" = x; then
15886    # Not all JVM:s accept the same arguments on the command line.
15887    # OpenJDK specific increase in thread stack for JDK build,
15888    # well more specifically, when running javac.
15889    if test "x$BUILD_NUM_BITS" = x32; then
15890       STACK_SIZE=768
15891    else
15892       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15893       # since 64-bit pointers are pushed on the stach. Apparently, we need
15894       # to increase the stack space when javacing the JDK....
15895       STACK_SIZE=1536
15896    fi
15897
15898    # Minimum amount of heap memory.
15899
15900    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15901    $ECHO "Command: $JAVA -Xms64M -version" >&5
15902    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15903    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15904    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15905    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15906        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15907	JVM_ARG_OK=true
15908    else
15909	$ECHO "Arg failed:" >&5
15910	$ECHO "$OUTPUT" >&5
15911	JVM_ARG_OK=false
15912    fi
15913
15914    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15915        # Why does macosx need more heap? Its the huge JDK batch.
15916
15917    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15918    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15919    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15920    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15921    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15922    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15923        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15924	JVM_ARG_OK=true
15925    else
15926	$ECHO "Arg failed:" >&5
15927	$ECHO "$OUTPUT" >&5
15928	JVM_ARG_OK=false
15929    fi
15930
15931    else
15932
15933    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15934    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15935    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15936    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15937    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15938    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15939        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15940	JVM_ARG_OK=true
15941    else
15942	$ECHO "Arg failed:" >&5
15943	$ECHO "$OUTPUT" >&5
15944	JVM_ARG_OK=false
15945    fi
15946
15947    fi
15948    # When is adding -client something that speeds up the JVM?
15949    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15950
15951    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15952    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15953    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15954    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15955    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15956    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15957        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15958	JVM_ARG_OK=true
15959    else
15960	$ECHO "Arg failed:" >&5
15961	$ECHO "$OUTPUT" >&5
15962	JVM_ARG_OK=false
15963    fi
15964
15965
15966    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15967    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15968    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15969    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15970    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15971    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15972        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15973	JVM_ARG_OK=true
15974    else
15975	$ECHO "Arg failed:" >&5
15976	$ECHO "$OUTPUT" >&5
15977	JVM_ARG_OK=false
15978    fi
15979
15980
15981    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15982    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15983    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15984    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15985    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15986    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15987        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15988	JVM_ARG_OK=true
15989    else
15990	$ECHO "Arg failed:" >&5
15991	$ECHO "$OUTPUT" >&5
15992	JVM_ARG_OK=false
15993    fi
15994
15995    # Disable special log output when a debug build is used as Boot JDK...
15996
15997    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15998    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15999    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16000    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16001    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16002    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16003        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16004	JVM_ARG_OK=true
16005    else
16006	$ECHO "Arg failed:" >&5
16007	$ECHO "$OUTPUT" >&5
16008	JVM_ARG_OK=false
16009    fi
16010
16011fi
16012
16013BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16014
16015
16016
16017###############################################################################
16018#
16019# Configure the sources to use. We can add or override individual directories.
16020#
16021###############################################################################
16022
16023
16024
16025# Where are the sources. Any of these can be overridden
16026# using --with-override-corba and the likes.
16027LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16028CORBA_TOPDIR="$SRC_ROOT/corba"
16029JAXP_TOPDIR="$SRC_ROOT/jaxp"
16030JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16031HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16032NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16033JDK_TOPDIR="$SRC_ROOT/jdk"
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044###############################################################################
16045#
16046# Pickup additional source for a component from outside of the source root
16047# or override source for a component.
16048#
16049
16050# Check whether --with-add-source-root was given.
16051if test "${with_add_source_root+set}" = set; then :
16052  withval=$with_add_source_root;
16053fi
16054
16055
16056
16057# Check whether --with-override-source-root was given.
16058if test "${with_override_source_root+set}" = set; then :
16059  withval=$with_override_source_root;
16060fi
16061
16062
16063
16064# Check whether --with-adds-and-overrides was given.
16065if test "${with_adds_and_overrides+set}" = set; then :
16066  withval=$with_adds_and_overrides;
16067fi
16068
16069
16070if test "x$with_adds_and_overrides" != x; then
16071    with_add_source_root="$with_adds_and_overrides/adds"
16072    with_override_source_root="$with_adds_and_overrides/overrides"
16073fi
16074
16075if test "x$with_add_source_root" != x; then
16076    if ! test -d $with_add_source_root; then
16077       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16078    fi
16079    CURDIR="$PWD"
16080    cd "$with_add_source_root"
16081    ADD_SRC_ROOT="`pwd`"
16082    cd "$CURDIR"
16083    # Verify that the addon source root does not have any root makefiles.
16084    # If it does, then it is usually an error, prevent this.
16085    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16086       test -f $with_add_source_root/langtools/make/Makefile; then
16087        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
16088    fi
16089    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16090       test -f $with_add_source_root/corba/make/Makefile; then
16091        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
16092    fi
16093    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16094       test -f $with_add_source_root/jaxp/make/Makefile; then
16095        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
16096    fi
16097    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16098       test -f $with_add_source_root/jaxws/make/Makefile; then
16099        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
16100    fi
16101    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16102       test -f $with_add_source_root/hotspot/make/Makefile; then
16103        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
16104    fi
16105    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16106       test -f $with_add_source_root/nashorn/make/Makefile; then
16107        as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
16108    fi
16109    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16110       test -f $with_add_source_root/jdk/make/Makefile; then
16111        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
16112    fi
16113fi
16114
16115
16116if test "x$with_override_source_root" != x; then
16117    if ! test -d $with_override_source_root; then
16118       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16119    fi
16120    CURDIR="$PWD"
16121    cd "$with_override_source_root"
16122    OVERRIDE_SRC_ROOT="`pwd`"
16123    cd "$CURDIR"
16124    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16125       test -f $with_override_source_root/langtools/make/Makefile; then
16126        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
16127    fi
16128    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16129       test -f $with_override_source_root/corba/make/Makefile; then
16130        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
16131    fi
16132    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16133       test -f $with_override_source_root/jaxp/make/Makefile; then
16134        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
16135    fi
16136    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16137       test -f $with_override_source_root/jaxws/make/Makefile; then
16138        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
16139    fi
16140    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16141       test -f $with_override_source_root/hotspot/make/Makefile; then
16142        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
16143    fi
16144    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16145       test -f $with_override_source_root/nashorn/make/Makefile; then
16146        as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
16147    fi
16148    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16149       test -f $with_override_source_root/jdk/make/Makefile; then
16150        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
16151    fi
16152fi
16153
16154
16155###############################################################################
16156#
16157# Override a repo completely, this is used for example when you have 3 small
16158# development sandboxes of the langtools sources and want to avoid having 3 full
16159# OpenJDK sources checked out on disk.
16160#
16161# Assuming that the 3 langtools sandboxes are located here:
16162# /home/fredrik/sandbox1/langtools
16163# /home/fredrik/sandbox2/langtools
16164# /home/fredrik/sandbox3/langtools
16165#
16166# From the source root you create build subdirs manually:
16167#     mkdir -p build1 build2 build3
16168# in each build directory run:
16169#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16170#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16171#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16172#
16173
16174
16175# Check whether --with-override-langtools was given.
16176if test "${with_override_langtools+set}" = set; then :
16177  withval=$with_override_langtools;
16178fi
16179
16180
16181
16182# Check whether --with-override-corba was given.
16183if test "${with_override_corba+set}" = set; then :
16184  withval=$with_override_corba;
16185fi
16186
16187
16188
16189# Check whether --with-override-jaxp was given.
16190if test "${with_override_jaxp+set}" = set; then :
16191  withval=$with_override_jaxp;
16192fi
16193
16194
16195
16196# Check whether --with-override-jaxws was given.
16197if test "${with_override_jaxws+set}" = set; then :
16198  withval=$with_override_jaxws;
16199fi
16200
16201
16202
16203# Check whether --with-override-hotspot was given.
16204if test "${with_override_hotspot+set}" = set; then :
16205  withval=$with_override_hotspot;
16206fi
16207
16208
16209
16210# Check whether --with-override-nashorn was given.
16211if test "${with_override_nashorn+set}" = set; then :
16212  withval=$with_override_nashorn;
16213fi
16214
16215
16216
16217# Check whether --with-override-jdk was given.
16218if test "${with_override_jdk+set}" = set; then :
16219  withval=$with_override_jdk;
16220fi
16221
16222
16223if test "x$with_override_langtools" != x; then
16224    CURDIR="$PWD"
16225    cd "$with_override_langtools"
16226    LANGTOOLS_TOPDIR="`pwd`"
16227    cd "$CURDIR"
16228    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16229        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16230    fi
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16232$as_echo_n "checking if langtools should be overridden... " >&6; }
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16234$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16235fi
16236if test "x$with_override_corba" != x; then
16237    CURDIR="$PWD"
16238    cd "$with_override_corba"
16239    CORBA_TOPDIR="`pwd`"
16240    cd "$CURDIR"
16241    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16242        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16243    fi
16244    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16245$as_echo_n "checking if corba should be overridden... " >&6; }
16246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16247$as_echo "yes with $CORBA_TOPDIR" >&6; }
16248fi
16249if test "x$with_override_jaxp" != x; then
16250    CURDIR="$PWD"
16251    cd "$with_override_jaxp"
16252    JAXP_TOPDIR="`pwd`"
16253    cd "$CURDIR"
16254    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16255        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16256    fi
16257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16258$as_echo_n "checking if jaxp should be overridden... " >&6; }
16259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16260$as_echo "yes with $JAXP_TOPDIR" >&6; }
16261fi
16262if test "x$with_override_jaxws" != x; then
16263    CURDIR="$PWD"
16264    cd "$with_override_jaxws"
16265    JAXWS_TOPDIR="`pwd`"
16266    cd "$CURDIR"
16267    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16268        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16269    fi
16270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16271$as_echo_n "checking if jaxws should be overridden... " >&6; }
16272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16273$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16274fi
16275if test "x$with_override_hotspot" != x; then
16276    CURDIR="$PWD"
16277    cd "$with_override_hotspot"
16278    HOTSPOT_TOPDIR="`pwd`"
16279    cd "$CURDIR"
16280    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16281       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16282        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16283    fi
16284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16285$as_echo_n "checking if hotspot should be overridden... " >&6; }
16286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16287$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16288fi
16289if test "x$with_override_nashorn" != x; then
16290    CURDIR="$PWD"
16291    cd "$with_override_nashorn"
16292    NASHORN_TOPDIR="`pwd`"
16293    cd "$CURDIR"
16294    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16295        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16296    fi
16297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16298$as_echo_n "checking if nashorn should be overridden... " >&6; }
16299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16300$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16301fi
16302if test "x$with_override_jdk" != x; then
16303    CURDIR="$PWD"
16304    cd "$with_override_jdk"
16305    JDK_TOPDIR="`pwd`"
16306    cd "$CURDIR"
16307    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16308        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16309    fi
16310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16311$as_echo_n "checking if JDK should be overridden... " >&6; }
16312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16313$as_echo "yes with $JDK_TOPDIR" >&6; }
16314fi
16315
16316
16317
16318BUILD_OUTPUT="$OUTPUT_ROOT"
16319
16320
16321HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16322BUILD_HOTSPOT=true
16323
16324
16325
16326# Check whether --with-import-hotspot was given.
16327if test "${with_import_hotspot+set}" = set; then :
16328  withval=$with_import_hotspot;
16329fi
16330
16331if test "x$with_import_hotspot" != x; then
16332    CURDIR="$PWD"
16333    cd "$with_import_hotspot"
16334    HOTSPOT_DIST="`pwd`"
16335    cd "$CURDIR"
16336    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16337        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16338    fi
16339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16340$as_echo_n "checking if hotspot should be imported... " >&6; }
16341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16342$as_echo "yes from $HOTSPOT_DIST" >&6; }
16343    BUILD_HOTSPOT=false
16344fi
16345
16346JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16347
16348
16349###############################################################################
16350#
16351# Setup the toolchain (compilers etc), i.e. the tools that need to be
16352# cross-compilation aware.
16353#
16354###############################################################################
16355
16356
16357###############################################################################
16358#
16359# Configure the development tool paths and potential sysroot.
16360#
16361ac_ext=cpp
16362ac_cpp='$CXXCPP $CPPFLAGS'
16363ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16364ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16365ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16366
16367
16368# The option used to specify the target .o,.a or .so file.
16369# When compiling, how to specify the to be created object file.
16370CC_OUT_OPTION='-o$(SPACE)'
16371# When linking, how to specify the to be created executable.
16372EXE_OUT_OPTION='-o$(SPACE)'
16373# When linking, how to specify the to be created dynamically linkable library.
16374LD_OUT_OPTION='-o$(SPACE)'
16375# When archiving, how to specify the to be create static archive for object files.
16376AR_OUT_OPTION='rcs$(SPACE)'
16377
16378
16379
16380
16381
16382# Locate the actual tools
16383
16384
16385# Check whether --with-jtreg was given.
16386if test "${with_jtreg+set}" = set; then :
16387  withval=$with_jtreg;
16388else
16389  with_jtreg=no
16390fi
16391
16392
16393  if test "x$with_jtreg" = xno; then
16394    # jtreg disabled
16395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16396$as_echo_n "checking for jtreg... " >&6; }
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16398$as_echo "no" >&6; }
16399  else
16400    if test "x$with_jtreg" != xyes; then
16401      # with path specified.
16402      JT_HOME="$with_jtreg"
16403    fi
16404
16405    if test "x$JT_HOME" != x; then
16406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16407$as_echo_n "checking for jtreg... " >&6; }
16408
16409      # use JT_HOME enviroment var.
16410
16411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16412
16413  # Input might be given as Windows format, start by converting to
16414  # unix format.
16415  path="$JT_HOME"
16416  new_path=`$CYGPATH -u "$path"`
16417
16418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16421  # "foo.exe" is OK but "foo" is an error.
16422  #
16423  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16424  # It is also a way to make sure we got the proper file name for the real test later on.
16425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16426  if test "x$test_shortpath" = x; then
16427    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16428$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16429    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16430  fi
16431
16432  # Call helper function which possibly converts this using DOS-style short mode.
16433  # If so, the updated path is stored in $new_path.
16434
16435  input_path="$new_path"
16436  # Check if we need to convert this using DOS-style short mode. If the path
16437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16438  # take no chances and rewrite it.
16439  # Note: m4 eats our [], so we need to use [ and ] instead.
16440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16441  if test "x$has_forbidden_chars" != x; then
16442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16446      # Going to short mode and back again did indeed matter. Since short mode is
16447      # case insensitive, let's make it lowercase to improve readability.
16448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16449      # Now convert it back to Unix-stile (cygpath)
16450      input_path=`$CYGPATH -u "$shortmode_path"`
16451      new_path="$input_path"
16452    fi
16453  fi
16454
16455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16456  if test "x$test_cygdrive_prefix" = x; then
16457    # As a simple fix, exclude /usr/bin since it's not a real path.
16458    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16460      # a path prefixed by /cygdrive for fixpath to work.
16461      new_path="$CYGWIN_ROOT_PATH$input_path"
16462    fi
16463  fi
16464
16465
16466  if test "x$path" != "x$new_path"; then
16467    JT_HOME="$new_path"
16468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16469$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16470  fi
16471
16472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16473
16474  path="$JT_HOME"
16475  has_colon=`$ECHO $path | $GREP ^.:`
16476  new_path="$path"
16477  if test "x$has_colon" = x; then
16478    # Not in mixed or Windows style, start by that.
16479    new_path=`cmd //c echo $path`
16480  fi
16481
16482
16483  input_path="$new_path"
16484  # Check if we need to convert this using DOS-style short mode. If the path
16485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16486  # take no chances and rewrite it.
16487  # Note: m4 eats our [], so we need to use [ and ] instead.
16488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16489  if test "x$has_forbidden_chars" != x; then
16490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16492  fi
16493
16494
16495  windows_path="$new_path"
16496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16497    unix_path=`$CYGPATH -u "$windows_path"`
16498    new_path="$unix_path"
16499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16501    new_path="$unix_path"
16502  fi
16503
16504  if test "x$path" != "x$new_path"; then
16505    JT_HOME="$new_path"
16506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16507$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16508  fi
16509
16510  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16511  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16512
16513  else
16514    # We're on a posix platform. Hooray! :)
16515    path="$JT_HOME"
16516    has_space=`$ECHO "$path" | $GREP " "`
16517    if test "x$has_space" != x; then
16518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16519$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16520      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16521    fi
16522
16523    # Use eval to expand a potential ~
16524    eval path="$path"
16525    if test ! -f "$path" && test ! -d "$path"; then
16526      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16527    fi
16528
16529    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16530  fi
16531
16532
16533      # jtreg win32 script works for everybody
16534      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16535
16536      if test ! -f "$JTREGEXE"; then
16537        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16538      fi
16539
16540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16541$as_echo "$JTREGEXE" >&6; }
16542    else
16543      # try to find jtreg on path
16544
16545    for ac_prog in jtreg
16546do
16547  # Extract the first word of "$ac_prog", so it can be a program name with args.
16548set dummy $ac_prog; ac_word=$2
16549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16550$as_echo_n "checking for $ac_word... " >&6; }
16551if ${ac_cv_path_JTREGEXE+:} false; then :
16552  $as_echo_n "(cached) " >&6
16553else
16554  case $JTREGEXE in
16555  [\\/]* | ?:[\\/]*)
16556  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16557  ;;
16558  *)
16559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16560for as_dir in $PATH
16561do
16562  IFS=$as_save_IFS
16563  test -z "$as_dir" && as_dir=.
16564    for ac_exec_ext in '' $ac_executable_extensions; do
16565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16566    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16568    break 2
16569  fi
16570done
16571  done
16572IFS=$as_save_IFS
16573
16574  ;;
16575esac
16576fi
16577JTREGEXE=$ac_cv_path_JTREGEXE
16578if test -n "$JTREGEXE"; then
16579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16580$as_echo "$JTREGEXE" >&6; }
16581else
16582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16583$as_echo "no" >&6; }
16584fi
16585
16586
16587  test -n "$JTREGEXE" && break
16588done
16589
16590
16591    if test "x$JTREGEXE" = x; then
16592        if test "xjtreg" = x; then
16593          PROG_NAME=jtregexe
16594        else
16595          PROG_NAME=jtreg
16596        fi
16597        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16598$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16599        as_fn_error $? "Cannot continue" "$LINENO" 5
16600    fi
16601
16602
16603      JT_HOME="`$DIRNAME $JTREGEXE`"
16604    fi
16605  fi
16606
16607
16608
16609
16610
16611if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16612
16613  # Store path to cygwin link.exe to help excluding it when searching for
16614  # VS linker. This must be done before changing the PATH when looking for VS.
16615  # Extract the first word of "link", so it can be a program name with args.
16616set dummy link; ac_word=$2
16617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16618$as_echo_n "checking for $ac_word... " >&6; }
16619if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16620  $as_echo_n "(cached) " >&6
16621else
16622  case $CYGWIN_LINK in
16623  [\\/]* | ?:[\\/]*)
16624  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16625  ;;
16626  *)
16627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16628for as_dir in $PATH
16629do
16630  IFS=$as_save_IFS
16631  test -z "$as_dir" && as_dir=.
16632    for ac_exec_ext in '' $ac_executable_extensions; do
16633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16634    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16636    break 2
16637  fi
16638done
16639  done
16640IFS=$as_save_IFS
16641
16642  ;;
16643esac
16644fi
16645CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16646if test -n "$CYGWIN_LINK"; then
16647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16648$as_echo "$CYGWIN_LINK" >&6; }
16649else
16650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16651$as_echo "no" >&6; }
16652fi
16653
16654
16655  if test "x$CYGWIN_LINK" != x; then
16656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16657$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16658    "$CYGWIN_LINK" --version > /dev/null
16659    if test $? -eq 0 ; then
16660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16661$as_echo "yes" >&6; }
16662    else
16663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16664$as_echo "no" >&6; }
16665      # This might be the VS linker. Don't exclude it later on.
16666      CYGWIN_LINK=""
16667    fi
16668  fi
16669
16670  # First-hand choice is to locate and run the vsvars bat file.
16671
16672  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16673    VCVARSFILE="vc/bin/vcvars32.bat"
16674  else
16675    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16676  fi
16677
16678  VS_ENV_CMD=""
16679  VS_ENV_ARGS=""
16680  if test "x$with_toolsdir" != x; then
16681
16682  if test "x$VS_ENV_CMD" = x; then
16683    VS100BASE="$with_toolsdir/../.."
16684    METHOD="--with-tools-dir"
16685
16686  windows_path="$VS100BASE"
16687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16688    unix_path=`$CYGPATH -u "$windows_path"`
16689    VS100BASE="$unix_path"
16690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16692    VS100BASE="$unix_path"
16693  fi
16694
16695    if test -d "$VS100BASE"; then
16696      if test -f "$VS100BASE/$VCVARSFILE"; then
16697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16698$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16699        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16700      else
16701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16702$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16703        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16704$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16705      fi
16706    fi
16707  fi
16708
16709  fi
16710
16711  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16712    # Having specified an argument which is incorrect will produce an instant failure;
16713    # we should not go on looking
16714    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16715$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16716    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16717$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16718    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16719  fi
16720
16721  if test "x$VS100COMNTOOLS" != x; then
16722
16723  if test "x$VS_ENV_CMD" = x; then
16724    VS100BASE="$VS100COMNTOOLS/../.."
16725    METHOD="VS100COMNTOOLS variable"
16726
16727  windows_path="$VS100BASE"
16728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16729    unix_path=`$CYGPATH -u "$windows_path"`
16730    VS100BASE="$unix_path"
16731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16733    VS100BASE="$unix_path"
16734  fi
16735
16736    if test -d "$VS100BASE"; then
16737      if test -f "$VS100BASE/$VCVARSFILE"; then
16738        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16739$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16740        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16741      else
16742        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16743$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16744        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16745$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16746      fi
16747    fi
16748  fi
16749
16750  fi
16751  if test "x$PROGRAMFILES" != x; then
16752
16753  if test "x$VS_ENV_CMD" = x; then
16754    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16755    METHOD="well-known name"
16756
16757  windows_path="$VS100BASE"
16758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16759    unix_path=`$CYGPATH -u "$windows_path"`
16760    VS100BASE="$unix_path"
16761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16763    VS100BASE="$unix_path"
16764  fi
16765
16766    if test -d "$VS100BASE"; then
16767      if test -f "$VS100BASE/$VCVARSFILE"; then
16768        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16769$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16770        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16771      else
16772        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16773$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16774        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16775$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16776      fi
16777    fi
16778  fi
16779
16780  fi
16781
16782  if test "x$VS_ENV_CMD" = x; then
16783    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16784    METHOD="well-known name"
16785
16786  windows_path="$VS100BASE"
16787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16788    unix_path=`$CYGPATH -u "$windows_path"`
16789    VS100BASE="$unix_path"
16790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16792    VS100BASE="$unix_path"
16793  fi
16794
16795    if test -d "$VS100BASE"; then
16796      if test -f "$VS100BASE/$VCVARSFILE"; then
16797        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16798$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16799        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16800      else
16801        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16802$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16803        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16804$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16805      fi
16806    fi
16807  fi
16808
16809
16810  if test "x$VS_ENV_CMD" = x; then
16811    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16812    METHOD="well-known name"
16813
16814  windows_path="$VS100BASE"
16815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16816    unix_path=`$CYGPATH -u "$windows_path"`
16817    VS100BASE="$unix_path"
16818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16820    VS100BASE="$unix_path"
16821  fi
16822
16823    if test -d "$VS100BASE"; then
16824      if test -f "$VS100BASE/$VCVARSFILE"; then
16825        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16826$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16827        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16828      else
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16830$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16832$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16833      fi
16834    fi
16835  fi
16836
16837
16838  if test "x$ProgramW6432" != x; then
16839
16840  if test "x$VS_ENV_CMD" = x; then
16841    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16842    METHOD="well-known name"
16843
16844  windows_path="$WIN_SDK_BASE"
16845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16846    unix_path=`$CYGPATH -u "$windows_path"`
16847    WIN_SDK_BASE="$unix_path"
16848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16850    WIN_SDK_BASE="$unix_path"
16851  fi
16852
16853    if test -d "$WIN_SDK_BASE"; then
16854      # There have been cases of partial or broken SDK installations. A missing
16855      # lib dir is not going to work.
16856      if test ! -d "$WIN_SDK_BASE/../lib"; then
16857        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16858$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16859        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16860$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16861      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16862        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16863$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16864        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16865        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16866          VS_ENV_ARGS="/x86"
16867        else
16868          VS_ENV_ARGS="/x64"
16869        fi
16870      else
16871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16872$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16874$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16875      fi
16876    fi
16877  fi
16878
16879  fi
16880  if test "x$PROGRAMW6432" != x; then
16881
16882  if test "x$VS_ENV_CMD" = x; then
16883    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16884    METHOD="well-known name"
16885
16886  windows_path="$WIN_SDK_BASE"
16887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16888    unix_path=`$CYGPATH -u "$windows_path"`
16889    WIN_SDK_BASE="$unix_path"
16890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16892    WIN_SDK_BASE="$unix_path"
16893  fi
16894
16895    if test -d "$WIN_SDK_BASE"; then
16896      # There have been cases of partial or broken SDK installations. A missing
16897      # lib dir is not going to work.
16898      if test ! -d "$WIN_SDK_BASE/../lib"; then
16899        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16900$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16901        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16902$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16903      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16904        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16905$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16906        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16907        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16908          VS_ENV_ARGS="/x86"
16909        else
16910          VS_ENV_ARGS="/x64"
16911        fi
16912      else
16913        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16914$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16915        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16916$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16917      fi
16918    fi
16919  fi
16920
16921  fi
16922  if test "x$PROGRAMFILES" != x; then
16923
16924  if test "x$VS_ENV_CMD" = x; then
16925    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16926    METHOD="well-known name"
16927
16928  windows_path="$WIN_SDK_BASE"
16929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16930    unix_path=`$CYGPATH -u "$windows_path"`
16931    WIN_SDK_BASE="$unix_path"
16932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16934    WIN_SDK_BASE="$unix_path"
16935  fi
16936
16937    if test -d "$WIN_SDK_BASE"; then
16938      # There have been cases of partial or broken SDK installations. A missing
16939      # lib dir is not going to work.
16940      if test ! -d "$WIN_SDK_BASE/../lib"; then
16941        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16942$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16943        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16944$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16945      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16946        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16947$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16948        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16949        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16950          VS_ENV_ARGS="/x86"
16951        else
16952          VS_ENV_ARGS="/x64"
16953        fi
16954      else
16955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16956$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16957        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16958$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16959      fi
16960    fi
16961  fi
16962
16963  fi
16964
16965  if test "x$VS_ENV_CMD" = x; then
16966    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16967    METHOD="well-known name"
16968
16969  windows_path="$WIN_SDK_BASE"
16970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16971    unix_path=`$CYGPATH -u "$windows_path"`
16972    WIN_SDK_BASE="$unix_path"
16973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16975    WIN_SDK_BASE="$unix_path"
16976  fi
16977
16978    if test -d "$WIN_SDK_BASE"; then
16979      # There have been cases of partial or broken SDK installations. A missing
16980      # lib dir is not going to work.
16981      if test ! -d "$WIN_SDK_BASE/../lib"; then
16982        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16983$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16984        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16985$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16986      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16987        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16988$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16989        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16990        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16991          VS_ENV_ARGS="/x86"
16992        else
16993          VS_ENV_ARGS="/x64"
16994        fi
16995      else
16996        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16997$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16998        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16999$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17000      fi
17001    fi
17002  fi
17003
17004
17005  if test "x$VS_ENV_CMD" = x; then
17006    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17007    METHOD="well-known name"
17008
17009  windows_path="$WIN_SDK_BASE"
17010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17011    unix_path=`$CYGPATH -u "$windows_path"`
17012    WIN_SDK_BASE="$unix_path"
17013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17015    WIN_SDK_BASE="$unix_path"
17016  fi
17017
17018    if test -d "$WIN_SDK_BASE"; then
17019      # There have been cases of partial or broken SDK installations. A missing
17020      # lib dir is not going to work.
17021      if test ! -d "$WIN_SDK_BASE/../lib"; then
17022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17024        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17025$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17026      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17028$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17029        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17030        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17031          VS_ENV_ARGS="/x86"
17032        else
17033          VS_ENV_ARGS="/x64"
17034        fi
17035      else
17036        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17037$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17038        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17039$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17040      fi
17041    fi
17042  fi
17043
17044
17045  if test "x$VS_ENV_CMD" != x; then
17046    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17047
17048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17049
17050  # First separate the path from the arguments. This will split at the first
17051  # space.
17052  complete="$VS_ENV_CMD"
17053  path="${complete%% *}"
17054  tmp="$complete EOL"
17055  arguments="${tmp#* }"
17056
17057  # Input might be given as Windows format, start by converting to
17058  # unix format.
17059  new_path=`$CYGPATH -u "$path"`
17060
17061  # Now try to locate executable using which
17062  new_path=`$WHICH "$new_path" 2> /dev/null`
17063  # bat and cmd files are not always considered executable in cygwin causing which
17064  # to not find them
17065  if test "x$new_path" = x \
17066           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17067           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17068    new_path=`$CYGPATH -u "$path"`
17069  fi
17070  if test "x$new_path" = x; then
17071    # Oops. Which didn't find the executable.
17072    # The splitting of arguments from the executable at a space might have been incorrect,
17073    # since paths with space are more likely in Windows. Give it another try with the whole
17074    # argument.
17075    path="$complete"
17076    arguments="EOL"
17077    new_path=`$CYGPATH -u "$path"`
17078    new_path=`$WHICH "$new_path" 2> /dev/null`
17079    # bat and cmd files are not always considered executable in cygwin causing which
17080    # to not find them
17081    if test "x$new_path" = x \
17082             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17083             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17084      new_path=`$CYGPATH -u "$path"`
17085    fi
17086    if test "x$new_path" = x; then
17087      # It's still not found. Now this is an unrecoverable error.
17088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17089$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17090      has_space=`$ECHO "$complete" | $GREP " "`
17091      if test "x$has_space" != x; then
17092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17094      fi
17095      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17096    fi
17097  fi
17098
17099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17102  # "foo.exe" is OK but "foo" is an error.
17103  #
17104  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17105  # It is also a way to make sure we got the proper file name for the real test later on.
17106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17107  if test "x$test_shortpath" = x; then
17108    # Short path failed, file does not exist as specified.
17109    # Try adding .exe or .cmd
17110    if test -f "${new_path}.exe"; then
17111       input_to_shortpath="${new_path}.exe"
17112    elif test -f "${new_path}.cmd"; then
17113       input_to_shortpath="${new_path}.cmd"
17114    else
17115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17116$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17117      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17118$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17119      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17120    fi
17121  else
17122    input_to_shortpath="$new_path"
17123  fi
17124
17125  # Call helper function which possibly converts this using DOS-style short mode.
17126  # If so, the updated path is stored in $new_path.
17127  new_path="$input_to_shortpath"
17128
17129  input_path="$input_to_shortpath"
17130  # Check if we need to convert this using DOS-style short mode. If the path
17131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17132  # take no chances and rewrite it.
17133  # Note: m4 eats our [], so we need to use [ and ] instead.
17134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17135  if test "x$has_forbidden_chars" != x; then
17136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17140      # Going to short mode and back again did indeed matter. Since short mode is
17141      # case insensitive, let's make it lowercase to improve readability.
17142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17143      # Now convert it back to Unix-stile (cygpath)
17144      input_path=`$CYGPATH -u "$shortmode_path"`
17145      new_path="$input_path"
17146    fi
17147  fi
17148
17149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17150  if test "x$test_cygdrive_prefix" = x; then
17151    # As a simple fix, exclude /usr/bin since it's not a real path.
17152    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17154      # a path prefixed by /cygdrive for fixpath to work.
17155      new_path="$CYGWIN_ROOT_PATH$input_path"
17156    fi
17157  fi
17158
17159  # remove trailing .exe if any
17160  new_path="${new_path/%.exe/}"
17161
17162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17163
17164  # First separate the path from the arguments. This will split at the first
17165  # space.
17166  complete="$VS_ENV_CMD"
17167  path="${complete%% *}"
17168  tmp="$complete EOL"
17169  arguments="${tmp#* }"
17170
17171  # Input might be given as Windows format, start by converting to
17172  # unix format.
17173  new_path="$path"
17174
17175  windows_path="$new_path"
17176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17177    unix_path=`$CYGPATH -u "$windows_path"`
17178    new_path="$unix_path"
17179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17181    new_path="$unix_path"
17182  fi
17183
17184
17185  # Now try to locate executable using which
17186  new_path=`$WHICH "$new_path" 2> /dev/null`
17187
17188  if test "x$new_path" = x; then
17189    # Oops. Which didn't find the executable.
17190    # The splitting of arguments from the executable at a space might have been incorrect,
17191    # since paths with space are more likely in Windows. Give it another try with the whole
17192    # argument.
17193    path="$complete"
17194    arguments="EOL"
17195    new_path="$path"
17196
17197  windows_path="$new_path"
17198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17199    unix_path=`$CYGPATH -u "$windows_path"`
17200    new_path="$unix_path"
17201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17203    new_path="$unix_path"
17204  fi
17205
17206
17207    new_path=`$WHICH "$new_path" 2> /dev/null`
17208
17209    if test "x$new_path" = x; then
17210      # It's still not found. Now this is an unrecoverable error.
17211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17212$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17213      has_space=`$ECHO "$complete" | $GREP " "`
17214      if test "x$has_space" != x; then
17215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17217      fi
17218      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17219    fi
17220  fi
17221
17222  # Now new_path has a complete unix path to the binary
17223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17224    # Keep paths in /bin as-is, but remove trailing .exe if any
17225    new_path="${new_path/%.exe/}"
17226    # Do not save /bin paths to all_fixpath_prefixes!
17227  else
17228    # Not in mixed or Windows style, start by that.
17229    new_path=`cmd //c echo $new_path`
17230
17231  input_path="$new_path"
17232  # Check if we need to convert this using DOS-style short mode. If the path
17233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17234  # take no chances and rewrite it.
17235  # Note: m4 eats our [], so we need to use [ and ] instead.
17236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17237  if test "x$has_forbidden_chars" != x; then
17238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17240  fi
17241
17242    # Output is in $new_path
17243
17244  windows_path="$new_path"
17245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17246    unix_path=`$CYGPATH -u "$windows_path"`
17247    new_path="$unix_path"
17248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17250    new_path="$unix_path"
17251  fi
17252
17253    # remove trailing .exe if any
17254    new_path="${new_path/%.exe/}"
17255
17256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17258  fi
17259
17260  else
17261    # We're on a posix platform. Hooray! :)
17262    # First separate the path from the arguments. This will split at the first
17263    # space.
17264    complete="$VS_ENV_CMD"
17265    path="${complete%% *}"
17266    tmp="$complete EOL"
17267    arguments="${tmp#* }"
17268
17269    # Cannot rely on the command "which" here since it doesn't always work.
17270    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17271    if test -z "$is_absolute_path"; then
17272      # Path to executable is not absolute. Find it.
17273      IFS_save="$IFS"
17274      IFS=:
17275      for p in $PATH; do
17276        if test -f "$p/$path" && test -x "$p/$path"; then
17277          new_path="$p/$path"
17278          break
17279        fi
17280      done
17281      IFS="$IFS_save"
17282    else
17283      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17284$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17285      new_path="$path"
17286    fi
17287
17288    if test "x$new_path" = x; then
17289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17290$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17291        has_space=`$ECHO "$complete" | $GREP " "`
17292        if test "x$has_space" != x; then
17293          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17294$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17295        fi
17296        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17297      fi
17298  fi
17299
17300      # Now join together the path and the arguments once again
17301      if test "x$arguments" != xEOL; then
17302        new_complete="$new_path ${arguments% *}"
17303      else
17304        new_complete="$new_path"
17305      fi
17306
17307  if test "x$complete" != "x$new_complete"; then
17308      VS_ENV_CMD="$new_complete"
17309      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17310$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17311    fi
17312
17313
17314    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17315    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17316$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17317    cd $OUTPUT_ROOT
17318    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17319    # to autoconf standards.
17320
17321    #----
17322
17323    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17324    # but calculate the difference in Cygwin environment before/after running it and then
17325    # apply the diff.
17326
17327    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17328      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17329      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17330      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17331    else
17332      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17333      _dosbash=`cmd //c echo \`which bash\``
17334    fi
17335
17336    # generate the set of exported vars before/after the vs10 setup
17337    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17338    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17339    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17340    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17341
17342    # Now execute the newly created bat file.
17343    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17344    cmd /c localdevenvtmp.bat | cat
17345
17346    # apply the diff (less some non-vs10 vars named by "!")
17347    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17348    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17349    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17350
17351    # cleanup
17352    $RM localdevenvtmp*
17353    #----
17354    cd $CURDIR
17355    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17357$as_echo "no" >&6; }
17358      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17359$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17360      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17361$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17362      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17363$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17364      as_fn_error $? "Cannot continue" "$LINENO" 5
17365    fi
17366
17367    # Now set all paths and other env variables. This will allow the rest of
17368    # the configure script to find and run the compiler in the proper way.
17369    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17370$as_echo "$as_me: Setting extracted environment variables" >&6;}
17371    . $OUTPUT_ROOT/localdevenv.sh
17372  else
17373    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17374    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17375$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17376  fi
17377
17378  # At this point, we should have corrent variables in the environment, or we can't continue.
17379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17380$as_echo_n "checking for Visual Studio variables... " >&6; }
17381
17382  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17383    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17385$as_echo "present but broken" >&6; }
17386      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17387    else
17388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17389$as_echo "ok" >&6; }
17390      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17391      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17392      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17393      # Remove any paths containing # (typically F#) as that messes up make
17394      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17395      VS_PATH="$PATH"
17396
17397
17398
17399    fi
17400  else
17401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17402$as_echo "not found" >&6; }
17403
17404    if test "x$VS_ENV_CMD" = x; then
17405      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17406$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17407      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17408$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17409    else
17410      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17411$as_echo "$as_me: Running the extraction script failed." >&6;}
17412    fi
17413    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17414$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17415    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17416$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17417    as_fn_error $? "Cannot continue" "$LINENO" 5
17418  fi
17419
17420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17421$as_echo_n "checking for msvcr100.dll... " >&6; }
17422
17423# Check whether --with-msvcr-dll was given.
17424if test "${with_msvcr_dll+set}" = set; then :
17425  withval=$with_msvcr_dll;
17426fi
17427
17428  if test "x$with_msvcr_dll" != x; then
17429    MSVCR_DLL="$with_msvcr_dll"
17430  else
17431    if test "x$VCINSTALLDIR" != x; then
17432      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17433        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17434      else
17435        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17436        if test "x$MSVCR_DLL" = x; then
17437          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17438        fi
17439      fi
17440      if test "x$MSVCR_DLL" != x; then
17441        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17442$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17443      else
17444        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17445$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17446      fi
17447    fi
17448    # Try some fallback alternatives
17449    if test "x$MSVCR_DLL" = x; then
17450      # If visual studio express is installed, there is usually one with the debugger
17451      if test "x$VS100COMNTOOLS" != x; then
17452        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17453          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17454          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17455$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17456        fi
17457      fi
17458    fi
17459    if test "x$MSVCR_DLL" = x; then
17460      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17461        # Fallback for 32bit builds, look in the windows directory.
17462        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17463          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17464$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17465          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17466        fi
17467      fi
17468    fi
17469  fi
17470  if test "x$MSVCR_DLL" = x; then
17471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17472$as_echo "no" >&6; }
17473    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17474  fi
17475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17476$as_echo "$MSVCR_DLL" >&6; }
17477
17478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17479
17480  # Input might be given as Windows format, start by converting to
17481  # unix format.
17482  path="$MSVCR_DLL"
17483  new_path=`$CYGPATH -u "$path"`
17484
17485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17488  # "foo.exe" is OK but "foo" is an error.
17489  #
17490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17491  # It is also a way to make sure we got the proper file name for the real test later on.
17492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17493  if test "x$test_shortpath" = x; then
17494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17495$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17496    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17497  fi
17498
17499  # Call helper function which possibly converts this using DOS-style short mode.
17500  # If so, the updated path is stored in $new_path.
17501
17502  input_path="$new_path"
17503  # Check if we need to convert this using DOS-style short mode. If the path
17504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17505  # take no chances and rewrite it.
17506  # Note: m4 eats our [], so we need to use [ and ] instead.
17507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17508  if test "x$has_forbidden_chars" != x; then
17509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17513      # Going to short mode and back again did indeed matter. Since short mode is
17514      # case insensitive, let's make it lowercase to improve readability.
17515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17516      # Now convert it back to Unix-stile (cygpath)
17517      input_path=`$CYGPATH -u "$shortmode_path"`
17518      new_path="$input_path"
17519    fi
17520  fi
17521
17522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17523  if test "x$test_cygdrive_prefix" = x; then
17524    # As a simple fix, exclude /usr/bin since it's not a real path.
17525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17527      # a path prefixed by /cygdrive for fixpath to work.
17528      new_path="$CYGWIN_ROOT_PATH$input_path"
17529    fi
17530  fi
17531
17532
17533  if test "x$path" != "x$new_path"; then
17534    MSVCR_DLL="$new_path"
17535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17536$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17537  fi
17538
17539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17540
17541  path="$MSVCR_DLL"
17542  has_colon=`$ECHO $path | $GREP ^.:`
17543  new_path="$path"
17544  if test "x$has_colon" = x; then
17545    # Not in mixed or Windows style, start by that.
17546    new_path=`cmd //c echo $path`
17547  fi
17548
17549
17550  input_path="$new_path"
17551  # Check if we need to convert this using DOS-style short mode. If the path
17552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17553  # take no chances and rewrite it.
17554  # Note: m4 eats our [], so we need to use [ and ] instead.
17555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17556  if test "x$has_forbidden_chars" != x; then
17557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17559  fi
17560
17561
17562  windows_path="$new_path"
17563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17564    unix_path=`$CYGPATH -u "$windows_path"`
17565    new_path="$unix_path"
17566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17568    new_path="$unix_path"
17569  fi
17570
17571  if test "x$path" != "x$new_path"; then
17572    MSVCR_DLL="$new_path"
17573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17574$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17575  fi
17576
17577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17579
17580  else
17581    # We're on a posix platform. Hooray! :)
17582    path="$MSVCR_DLL"
17583    has_space=`$ECHO "$path" | $GREP " "`
17584    if test "x$has_space" != x; then
17585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17586$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17587      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17588    fi
17589
17590    # Use eval to expand a potential ~
17591    eval path="$path"
17592    if test ! -f "$path" && test ! -d "$path"; then
17593      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17594    fi
17595
17596    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17597  fi
17598
17599
17600
17601
17602# Check whether --with-dxsdk was given.
17603if test "${with_dxsdk+set}" = set; then :
17604  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17605$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17606fi
17607
17608
17609
17610
17611# Check whether --with-dxsdk-lib was given.
17612if test "${with_dxsdk_lib+set}" = set; then :
17613  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17614$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17615fi
17616
17617
17618
17619
17620# Check whether --with-dxsdk-include was given.
17621if test "${with_dxsdk_include+set}" = set; then :
17622  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17623$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17624fi
17625
17626
17627fi
17628
17629
17630
17631# If --build AND --host is set, then the configure script will find any
17632# cross compilation tools in the PATH. Cross compilation tools
17633# follows the cross compilation standard where they are prefixed with ${host}.
17634# For example the binary i686-sun-solaris2.10-gcc
17635# will cross compile for i686-sun-solaris2.10
17636# If neither of build and host is not set, then build=host and the
17637# default compiler found in the path will be used.
17638# Setting only --host, does not seem to be really supported.
17639# Please set both --build and --host if you want to cross compile.
17640
17641if test "x$COMPILE_TYPE" = "xcross"; then
17642    # Now we to find a C/C++ compiler that can build executables for the build
17643    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17644    # once. Also, we need to do this before adding a tools dir to the path,
17645    # otherwise we might pick up cross-compilers which don't use standard naming.
17646    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17647    # to wait until they are properly discovered.
17648    for ac_prog in cl cc gcc
17649do
17650  # Extract the first word of "$ac_prog", so it can be a program name with args.
17651set dummy $ac_prog; ac_word=$2
17652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17653$as_echo_n "checking for $ac_word... " >&6; }
17654if ${ac_cv_path_BUILD_CC+:} false; then :
17655  $as_echo_n "(cached) " >&6
17656else
17657  case $BUILD_CC in
17658  [\\/]* | ?:[\\/]*)
17659  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17660  ;;
17661  *)
17662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17663for as_dir in $PATH
17664do
17665  IFS=$as_save_IFS
17666  test -z "$as_dir" && as_dir=.
17667    for ac_exec_ext in '' $ac_executable_extensions; do
17668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17669    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17671    break 2
17672  fi
17673done
17674  done
17675IFS=$as_save_IFS
17676
17677  ;;
17678esac
17679fi
17680BUILD_CC=$ac_cv_path_BUILD_CC
17681if test -n "$BUILD_CC"; then
17682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17683$as_echo "$BUILD_CC" >&6; }
17684else
17685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17686$as_echo "no" >&6; }
17687fi
17688
17689
17690  test -n "$BUILD_CC" && break
17691done
17692
17693
17694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17695
17696  # First separate the path from the arguments. This will split at the first
17697  # space.
17698  complete="$BUILD_CC"
17699  path="${complete%% *}"
17700  tmp="$complete EOL"
17701  arguments="${tmp#* }"
17702
17703  # Input might be given as Windows format, start by converting to
17704  # unix format.
17705  new_path=`$CYGPATH -u "$path"`
17706
17707  # Now try to locate executable using which
17708  new_path=`$WHICH "$new_path" 2> /dev/null`
17709  # bat and cmd files are not always considered executable in cygwin causing which
17710  # to not find them
17711  if test "x$new_path" = x \
17712           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17713           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17714    new_path=`$CYGPATH -u "$path"`
17715  fi
17716  if test "x$new_path" = x; then
17717    # Oops. Which didn't find the executable.
17718    # The splitting of arguments from the executable at a space might have been incorrect,
17719    # since paths with space are more likely in Windows. Give it another try with the whole
17720    # argument.
17721    path="$complete"
17722    arguments="EOL"
17723    new_path=`$CYGPATH -u "$path"`
17724    new_path=`$WHICH "$new_path" 2> /dev/null`
17725    # bat and cmd files are not always considered executable in cygwin causing which
17726    # to not find them
17727    if test "x$new_path" = x \
17728             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17729             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17730      new_path=`$CYGPATH -u "$path"`
17731    fi
17732    if test "x$new_path" = x; then
17733      # It's still not found. Now this is an unrecoverable error.
17734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17735$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17736      has_space=`$ECHO "$complete" | $GREP " "`
17737      if test "x$has_space" != x; then
17738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17740      fi
17741      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17742    fi
17743  fi
17744
17745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17748  # "foo.exe" is OK but "foo" is an error.
17749  #
17750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17751  # It is also a way to make sure we got the proper file name for the real test later on.
17752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17753  if test "x$test_shortpath" = x; then
17754    # Short path failed, file does not exist as specified.
17755    # Try adding .exe or .cmd
17756    if test -f "${new_path}.exe"; then
17757       input_to_shortpath="${new_path}.exe"
17758    elif test -f "${new_path}.cmd"; then
17759       input_to_shortpath="${new_path}.cmd"
17760    else
17761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17762$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17765      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17766    fi
17767  else
17768    input_to_shortpath="$new_path"
17769  fi
17770
17771  # Call helper function which possibly converts this using DOS-style short mode.
17772  # If so, the updated path is stored in $new_path.
17773  new_path="$input_to_shortpath"
17774
17775  input_path="$input_to_shortpath"
17776  # Check if we need to convert this using DOS-style short mode. If the path
17777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17778  # take no chances and rewrite it.
17779  # Note: m4 eats our [], so we need to use [ and ] instead.
17780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17781  if test "x$has_forbidden_chars" != x; then
17782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17786      # Going to short mode and back again did indeed matter. Since short mode is
17787      # case insensitive, let's make it lowercase to improve readability.
17788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17789      # Now convert it back to Unix-stile (cygpath)
17790      input_path=`$CYGPATH -u "$shortmode_path"`
17791      new_path="$input_path"
17792    fi
17793  fi
17794
17795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17796  if test "x$test_cygdrive_prefix" = x; then
17797    # As a simple fix, exclude /usr/bin since it's not a real path.
17798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17800      # a path prefixed by /cygdrive for fixpath to work.
17801      new_path="$CYGWIN_ROOT_PATH$input_path"
17802    fi
17803  fi
17804
17805  # remove trailing .exe if any
17806  new_path="${new_path/%.exe/}"
17807
17808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17809
17810  # First separate the path from the arguments. This will split at the first
17811  # space.
17812  complete="$BUILD_CC"
17813  path="${complete%% *}"
17814  tmp="$complete EOL"
17815  arguments="${tmp#* }"
17816
17817  # Input might be given as Windows format, start by converting to
17818  # unix format.
17819  new_path="$path"
17820
17821  windows_path="$new_path"
17822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17823    unix_path=`$CYGPATH -u "$windows_path"`
17824    new_path="$unix_path"
17825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17827    new_path="$unix_path"
17828  fi
17829
17830
17831  # Now try to locate executable using which
17832  new_path=`$WHICH "$new_path" 2> /dev/null`
17833
17834  if test "x$new_path" = x; then
17835    # Oops. Which didn't find the executable.
17836    # The splitting of arguments from the executable at a space might have been incorrect,
17837    # since paths with space are more likely in Windows. Give it another try with the whole
17838    # argument.
17839    path="$complete"
17840    arguments="EOL"
17841    new_path="$path"
17842
17843  windows_path="$new_path"
17844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17845    unix_path=`$CYGPATH -u "$windows_path"`
17846    new_path="$unix_path"
17847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17849    new_path="$unix_path"
17850  fi
17851
17852
17853    new_path=`$WHICH "$new_path" 2> /dev/null`
17854
17855    if test "x$new_path" = x; then
17856      # It's still not found. Now this is an unrecoverable error.
17857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17858$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17859      has_space=`$ECHO "$complete" | $GREP " "`
17860      if test "x$has_space" != x; then
17861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17863      fi
17864      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17865    fi
17866  fi
17867
17868  # Now new_path has a complete unix path to the binary
17869  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17870    # Keep paths in /bin as-is, but remove trailing .exe if any
17871    new_path="${new_path/%.exe/}"
17872    # Do not save /bin paths to all_fixpath_prefixes!
17873  else
17874    # Not in mixed or Windows style, start by that.
17875    new_path=`cmd //c echo $new_path`
17876
17877  input_path="$new_path"
17878  # Check if we need to convert this using DOS-style short mode. If the path
17879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17880  # take no chances and rewrite it.
17881  # Note: m4 eats our [], so we need to use [ and ] instead.
17882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17883  if test "x$has_forbidden_chars" != x; then
17884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17886  fi
17887
17888    # Output is in $new_path
17889
17890  windows_path="$new_path"
17891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17892    unix_path=`$CYGPATH -u "$windows_path"`
17893    new_path="$unix_path"
17894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17896    new_path="$unix_path"
17897  fi
17898
17899    # remove trailing .exe if any
17900    new_path="${new_path/%.exe/}"
17901
17902    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17903    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17904  fi
17905
17906  else
17907    # We're on a posix platform. Hooray! :)
17908    # First separate the path from the arguments. This will split at the first
17909    # space.
17910    complete="$BUILD_CC"
17911    path="${complete%% *}"
17912    tmp="$complete EOL"
17913    arguments="${tmp#* }"
17914
17915    # Cannot rely on the command "which" here since it doesn't always work.
17916    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17917    if test -z "$is_absolute_path"; then
17918      # Path to executable is not absolute. Find it.
17919      IFS_save="$IFS"
17920      IFS=:
17921      for p in $PATH; do
17922        if test -f "$p/$path" && test -x "$p/$path"; then
17923          new_path="$p/$path"
17924          break
17925        fi
17926      done
17927      IFS="$IFS_save"
17928    else
17929      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17930$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17931      new_path="$path"
17932    fi
17933
17934    if test "x$new_path" = x; then
17935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17936$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17937        has_space=`$ECHO "$complete" | $GREP " "`
17938        if test "x$has_space" != x; then
17939          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17940$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17941        fi
17942        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17943      fi
17944  fi
17945
17946      # Now join together the path and the arguments once again
17947      if test "x$arguments" != xEOL; then
17948        new_complete="$new_path ${arguments% *}"
17949      else
17950        new_complete="$new_path"
17951      fi
17952
17953  if test "x$complete" != "x$new_complete"; then
17954      BUILD_CC="$new_complete"
17955      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17956$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17957    fi
17958
17959    for ac_prog in cl CC g++
17960do
17961  # Extract the first word of "$ac_prog", so it can be a program name with args.
17962set dummy $ac_prog; ac_word=$2
17963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17964$as_echo_n "checking for $ac_word... " >&6; }
17965if ${ac_cv_path_BUILD_CXX+:} false; then :
17966  $as_echo_n "(cached) " >&6
17967else
17968  case $BUILD_CXX in
17969  [\\/]* | ?:[\\/]*)
17970  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17971  ;;
17972  *)
17973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17974for as_dir in $PATH
17975do
17976  IFS=$as_save_IFS
17977  test -z "$as_dir" && as_dir=.
17978    for ac_exec_ext in '' $ac_executable_extensions; do
17979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17980    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17982    break 2
17983  fi
17984done
17985  done
17986IFS=$as_save_IFS
17987
17988  ;;
17989esac
17990fi
17991BUILD_CXX=$ac_cv_path_BUILD_CXX
17992if test -n "$BUILD_CXX"; then
17993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17994$as_echo "$BUILD_CXX" >&6; }
17995else
17996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17997$as_echo "no" >&6; }
17998fi
17999
18000
18001  test -n "$BUILD_CXX" && break
18002done
18003
18004
18005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18006
18007  # First separate the path from the arguments. This will split at the first
18008  # space.
18009  complete="$BUILD_CXX"
18010  path="${complete%% *}"
18011  tmp="$complete EOL"
18012  arguments="${tmp#* }"
18013
18014  # Input might be given as Windows format, start by converting to
18015  # unix format.
18016  new_path=`$CYGPATH -u "$path"`
18017
18018  # Now try to locate executable using which
18019  new_path=`$WHICH "$new_path" 2> /dev/null`
18020  # bat and cmd files are not always considered executable in cygwin causing which
18021  # to not find them
18022  if test "x$new_path" = x \
18023           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18024           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18025    new_path=`$CYGPATH -u "$path"`
18026  fi
18027  if test "x$new_path" = x; then
18028    # Oops. Which didn't find the executable.
18029    # The splitting of arguments from the executable at a space might have been incorrect,
18030    # since paths with space are more likely in Windows. Give it another try with the whole
18031    # argument.
18032    path="$complete"
18033    arguments="EOL"
18034    new_path=`$CYGPATH -u "$path"`
18035    new_path=`$WHICH "$new_path" 2> /dev/null`
18036    # bat and cmd files are not always considered executable in cygwin causing which
18037    # to not find them
18038    if test "x$new_path" = x \
18039             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18040             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18041      new_path=`$CYGPATH -u "$path"`
18042    fi
18043    if test "x$new_path" = x; then
18044      # It's still not found. Now this is an unrecoverable error.
18045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18046$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18047      has_space=`$ECHO "$complete" | $GREP " "`
18048      if test "x$has_space" != x; then
18049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18051      fi
18052      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18053    fi
18054  fi
18055
18056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18059  # "foo.exe" is OK but "foo" is an error.
18060  #
18061  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18062  # It is also a way to make sure we got the proper file name for the real test later on.
18063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18064  if test "x$test_shortpath" = x; then
18065    # Short path failed, file does not exist as specified.
18066    # Try adding .exe or .cmd
18067    if test -f "${new_path}.exe"; then
18068       input_to_shortpath="${new_path}.exe"
18069    elif test -f "${new_path}.cmd"; then
18070       input_to_shortpath="${new_path}.cmd"
18071    else
18072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18073$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18076      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18077    fi
18078  else
18079    input_to_shortpath="$new_path"
18080  fi
18081
18082  # Call helper function which possibly converts this using DOS-style short mode.
18083  # If so, the updated path is stored in $new_path.
18084  new_path="$input_to_shortpath"
18085
18086  input_path="$input_to_shortpath"
18087  # Check if we need to convert this using DOS-style short mode. If the path
18088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18089  # take no chances and rewrite it.
18090  # Note: m4 eats our [], so we need to use [ and ] instead.
18091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18092  if test "x$has_forbidden_chars" != x; then
18093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18097      # Going to short mode and back again did indeed matter. Since short mode is
18098      # case insensitive, let's make it lowercase to improve readability.
18099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18100      # Now convert it back to Unix-stile (cygpath)
18101      input_path=`$CYGPATH -u "$shortmode_path"`
18102      new_path="$input_path"
18103    fi
18104  fi
18105
18106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18107  if test "x$test_cygdrive_prefix" = x; then
18108    # As a simple fix, exclude /usr/bin since it's not a real path.
18109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18111      # a path prefixed by /cygdrive for fixpath to work.
18112      new_path="$CYGWIN_ROOT_PATH$input_path"
18113    fi
18114  fi
18115
18116  # remove trailing .exe if any
18117  new_path="${new_path/%.exe/}"
18118
18119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18120
18121  # First separate the path from the arguments. This will split at the first
18122  # space.
18123  complete="$BUILD_CXX"
18124  path="${complete%% *}"
18125  tmp="$complete EOL"
18126  arguments="${tmp#* }"
18127
18128  # Input might be given as Windows format, start by converting to
18129  # unix format.
18130  new_path="$path"
18131
18132  windows_path="$new_path"
18133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18134    unix_path=`$CYGPATH -u "$windows_path"`
18135    new_path="$unix_path"
18136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18138    new_path="$unix_path"
18139  fi
18140
18141
18142  # Now try to locate executable using which
18143  new_path=`$WHICH "$new_path" 2> /dev/null`
18144
18145  if test "x$new_path" = x; then
18146    # Oops. Which didn't find the executable.
18147    # The splitting of arguments from the executable at a space might have been incorrect,
18148    # since paths with space are more likely in Windows. Give it another try with the whole
18149    # argument.
18150    path="$complete"
18151    arguments="EOL"
18152    new_path="$path"
18153
18154  windows_path="$new_path"
18155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18156    unix_path=`$CYGPATH -u "$windows_path"`
18157    new_path="$unix_path"
18158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18160    new_path="$unix_path"
18161  fi
18162
18163
18164    new_path=`$WHICH "$new_path" 2> /dev/null`
18165
18166    if test "x$new_path" = x; then
18167      # It's still not found. Now this is an unrecoverable error.
18168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18169$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18170      has_space=`$ECHO "$complete" | $GREP " "`
18171      if test "x$has_space" != x; then
18172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18174      fi
18175      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18176    fi
18177  fi
18178
18179  # Now new_path has a complete unix path to the binary
18180  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18181    # Keep paths in /bin as-is, but remove trailing .exe if any
18182    new_path="${new_path/%.exe/}"
18183    # Do not save /bin paths to all_fixpath_prefixes!
18184  else
18185    # Not in mixed or Windows style, start by that.
18186    new_path=`cmd //c echo $new_path`
18187
18188  input_path="$new_path"
18189  # Check if we need to convert this using DOS-style short mode. If the path
18190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18191  # take no chances and rewrite it.
18192  # Note: m4 eats our [], so we need to use [ and ] instead.
18193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18194  if test "x$has_forbidden_chars" != x; then
18195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18197  fi
18198
18199    # Output is in $new_path
18200
18201  windows_path="$new_path"
18202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18203    unix_path=`$CYGPATH -u "$windows_path"`
18204    new_path="$unix_path"
18205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18207    new_path="$unix_path"
18208  fi
18209
18210    # remove trailing .exe if any
18211    new_path="${new_path/%.exe/}"
18212
18213    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18214    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18215  fi
18216
18217  else
18218    # We're on a posix platform. Hooray! :)
18219    # First separate the path from the arguments. This will split at the first
18220    # space.
18221    complete="$BUILD_CXX"
18222    path="${complete%% *}"
18223    tmp="$complete EOL"
18224    arguments="${tmp#* }"
18225
18226    # Cannot rely on the command "which" here since it doesn't always work.
18227    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18228    if test -z "$is_absolute_path"; then
18229      # Path to executable is not absolute. Find it.
18230      IFS_save="$IFS"
18231      IFS=:
18232      for p in $PATH; do
18233        if test -f "$p/$path" && test -x "$p/$path"; then
18234          new_path="$p/$path"
18235          break
18236        fi
18237      done
18238      IFS="$IFS_save"
18239    else
18240      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18241$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18242      new_path="$path"
18243    fi
18244
18245    if test "x$new_path" = x; then
18246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18247$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18248        has_space=`$ECHO "$complete" | $GREP " "`
18249        if test "x$has_space" != x; then
18250          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18251$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18252        fi
18253        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18254      fi
18255  fi
18256
18257      # Now join together the path and the arguments once again
18258      if test "x$arguments" != xEOL; then
18259        new_complete="$new_path ${arguments% *}"
18260      else
18261        new_complete="$new_path"
18262      fi
18263
18264  if test "x$complete" != "x$new_complete"; then
18265      BUILD_CXX="$new_complete"
18266      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18267$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18268    fi
18269
18270    # Extract the first word of "ld", so it can be a program name with args.
18271set dummy ld; ac_word=$2
18272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18273$as_echo_n "checking for $ac_word... " >&6; }
18274if ${ac_cv_path_BUILD_LD+:} false; then :
18275  $as_echo_n "(cached) " >&6
18276else
18277  case $BUILD_LD in
18278  [\\/]* | ?:[\\/]*)
18279  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18280  ;;
18281  *)
18282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18283for as_dir in $PATH
18284do
18285  IFS=$as_save_IFS
18286  test -z "$as_dir" && as_dir=.
18287    for ac_exec_ext in '' $ac_executable_extensions; do
18288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18289    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18291    break 2
18292  fi
18293done
18294  done
18295IFS=$as_save_IFS
18296
18297  ;;
18298esac
18299fi
18300BUILD_LD=$ac_cv_path_BUILD_LD
18301if test -n "$BUILD_LD"; then
18302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18303$as_echo "$BUILD_LD" >&6; }
18304else
18305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18306$as_echo "no" >&6; }
18307fi
18308
18309
18310
18311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18312
18313  # First separate the path from the arguments. This will split at the first
18314  # space.
18315  complete="$BUILD_LD"
18316  path="${complete%% *}"
18317  tmp="$complete EOL"
18318  arguments="${tmp#* }"
18319
18320  # Input might be given as Windows format, start by converting to
18321  # unix format.
18322  new_path=`$CYGPATH -u "$path"`
18323
18324  # Now try to locate executable using which
18325  new_path=`$WHICH "$new_path" 2> /dev/null`
18326  # bat and cmd files are not always considered executable in cygwin causing which
18327  # to not find them
18328  if test "x$new_path" = x \
18329           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18330           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18331    new_path=`$CYGPATH -u "$path"`
18332  fi
18333  if test "x$new_path" = x; then
18334    # Oops. Which didn't find the executable.
18335    # The splitting of arguments from the executable at a space might have been incorrect,
18336    # since paths with space are more likely in Windows. Give it another try with the whole
18337    # argument.
18338    path="$complete"
18339    arguments="EOL"
18340    new_path=`$CYGPATH -u "$path"`
18341    new_path=`$WHICH "$new_path" 2> /dev/null`
18342    # bat and cmd files are not always considered executable in cygwin causing which
18343    # to not find them
18344    if test "x$new_path" = x \
18345             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18346             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18347      new_path=`$CYGPATH -u "$path"`
18348    fi
18349    if test "x$new_path" = x; then
18350      # It's still not found. Now this is an unrecoverable error.
18351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18352$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18353      has_space=`$ECHO "$complete" | $GREP " "`
18354      if test "x$has_space" != x; then
18355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18357      fi
18358      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18359    fi
18360  fi
18361
18362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18365  # "foo.exe" is OK but "foo" is an error.
18366  #
18367  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18368  # It is also a way to make sure we got the proper file name for the real test later on.
18369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18370  if test "x$test_shortpath" = x; then
18371    # Short path failed, file does not exist as specified.
18372    # Try adding .exe or .cmd
18373    if test -f "${new_path}.exe"; then
18374       input_to_shortpath="${new_path}.exe"
18375    elif test -f "${new_path}.cmd"; then
18376       input_to_shortpath="${new_path}.cmd"
18377    else
18378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18379$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18380      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18381$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18382      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18383    fi
18384  else
18385    input_to_shortpath="$new_path"
18386  fi
18387
18388  # Call helper function which possibly converts this using DOS-style short mode.
18389  # If so, the updated path is stored in $new_path.
18390  new_path="$input_to_shortpath"
18391
18392  input_path="$input_to_shortpath"
18393  # Check if we need to convert this using DOS-style short mode. If the path
18394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18395  # take no chances and rewrite it.
18396  # Note: m4 eats our [], so we need to use [ and ] instead.
18397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18398  if test "x$has_forbidden_chars" != x; then
18399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18403      # Going to short mode and back again did indeed matter. Since short mode is
18404      # case insensitive, let's make it lowercase to improve readability.
18405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18406      # Now convert it back to Unix-stile (cygpath)
18407      input_path=`$CYGPATH -u "$shortmode_path"`
18408      new_path="$input_path"
18409    fi
18410  fi
18411
18412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18413  if test "x$test_cygdrive_prefix" = x; then
18414    # As a simple fix, exclude /usr/bin since it's not a real path.
18415    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18417      # a path prefixed by /cygdrive for fixpath to work.
18418      new_path="$CYGWIN_ROOT_PATH$input_path"
18419    fi
18420  fi
18421
18422  # remove trailing .exe if any
18423  new_path="${new_path/%.exe/}"
18424
18425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18426
18427  # First separate the path from the arguments. This will split at the first
18428  # space.
18429  complete="$BUILD_LD"
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="$path"
18437
18438  windows_path="$new_path"
18439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18440    unix_path=`$CYGPATH -u "$windows_path"`
18441    new_path="$unix_path"
18442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18444    new_path="$unix_path"
18445  fi
18446
18447
18448  # Now try to locate executable using which
18449  new_path=`$WHICH "$new_path" 2> /dev/null`
18450
18451  if test "x$new_path" = x; then
18452    # Oops. Which didn't find the executable.
18453    # The splitting of arguments from the executable at a space might have been incorrect,
18454    # since paths with space are more likely in Windows. Give it another try with the whole
18455    # argument.
18456    path="$complete"
18457    arguments="EOL"
18458    new_path="$path"
18459
18460  windows_path="$new_path"
18461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18462    unix_path=`$CYGPATH -u "$windows_path"`
18463    new_path="$unix_path"
18464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18466    new_path="$unix_path"
18467  fi
18468
18469
18470    new_path=`$WHICH "$new_path" 2> /dev/null`
18471
18472    if test "x$new_path" = x; then
18473      # It's still not found. Now this is an unrecoverable error.
18474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18475$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18476      has_space=`$ECHO "$complete" | $GREP " "`
18477      if test "x$has_space" != x; then
18478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18480      fi
18481      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18482    fi
18483  fi
18484
18485  # Now new_path has a complete unix path to the binary
18486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18487    # Keep paths in /bin as-is, but remove trailing .exe if any
18488    new_path="${new_path/%.exe/}"
18489    # Do not save /bin paths to all_fixpath_prefixes!
18490  else
18491    # Not in mixed or Windows style, start by that.
18492    new_path=`cmd //c echo $new_path`
18493
18494  input_path="$new_path"
18495  # Check if we need to convert this using DOS-style short mode. If the path
18496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18497  # take no chances and rewrite it.
18498  # Note: m4 eats our [], so we need to use [ and ] instead.
18499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18500  if test "x$has_forbidden_chars" != x; then
18501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18503  fi
18504
18505    # Output is in $new_path
18506
18507  windows_path="$new_path"
18508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18509    unix_path=`$CYGPATH -u "$windows_path"`
18510    new_path="$unix_path"
18511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18513    new_path="$unix_path"
18514  fi
18515
18516    # remove trailing .exe if any
18517    new_path="${new_path/%.exe/}"
18518
18519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18521  fi
18522
18523  else
18524    # We're on a posix platform. Hooray! :)
18525    # First separate the path from the arguments. This will split at the first
18526    # space.
18527    complete="$BUILD_LD"
18528    path="${complete%% *}"
18529    tmp="$complete EOL"
18530    arguments="${tmp#* }"
18531
18532    # Cannot rely on the command "which" here since it doesn't always work.
18533    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18534    if test -z "$is_absolute_path"; then
18535      # Path to executable is not absolute. Find it.
18536      IFS_save="$IFS"
18537      IFS=:
18538      for p in $PATH; do
18539        if test -f "$p/$path" && test -x "$p/$path"; then
18540          new_path="$p/$path"
18541          break
18542        fi
18543      done
18544      IFS="$IFS_save"
18545    else
18546      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18547$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18548      new_path="$path"
18549    fi
18550
18551    if test "x$new_path" = x; then
18552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18553$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18554        has_space=`$ECHO "$complete" | $GREP " "`
18555        if test "x$has_space" != x; then
18556          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18557$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18558        fi
18559        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18560      fi
18561  fi
18562
18563      # Now join together the path and the arguments once again
18564      if test "x$arguments" != xEOL; then
18565        new_complete="$new_path ${arguments% *}"
18566      else
18567        new_complete="$new_path"
18568      fi
18569
18570  if test "x$complete" != "x$new_complete"; then
18571      BUILD_LD="$new_complete"
18572      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18573$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18574    fi
18575
18576fi
18577
18578
18579
18580
18581# If a devkit is found on the builddeps server, then prepend its path to the
18582# PATH variable. If there are cross compilers available in the devkit, these
18583# will be found by AC_PROG_CC et al.
18584DEVKIT=
18585
18586
18587    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18588        # Source the builddeps file again, to make sure it uses the latest variables!
18589        . $builddepsfile
18590        # Look for a target and build machine specific resource!
18591        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18592        if test "x$resource" = x; then
18593            # Ok, lets instead look for a target specific resource
18594            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18595        fi
18596        if test "x$resource" = x; then
18597            # Ok, lets instead look for a build specific resource
18598            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18599        fi
18600        if test "x$resource" = x; then
18601            # Ok, lets instead look for a generic resource
18602            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18603            resource=${builddep_devkit}
18604        fi
18605        if test "x$resource" != x; then
18606            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18607$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18608	    # If the resource in the builddeps.conf file is an existing directory,
18609	    # for example /java/linux/cups
18610	    if test -d ${resource}; then
18611	       depdir=${resource}
18612	    else
18613
18614# devkit is for example mymodule
18615# $resource is for example libs/general/libmymod_1_2_3.zip
18616# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18617# $with_builddeps_dir is for example /localhome/builddeps
18618# depdir is the name of the variable into which we store the depdir, eg MYMOD
18619# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18620# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18621    filename=`basename $resource`
18622    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18623    filebase=${filename%%.*}
18624    extension=${filename#*.}
18625    installdir=$with_builddeps_dir/$filebase
18626    if test ! -f $installdir/$filename.unpacked; then
18627        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18628$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18629        if test ! -d $installdir; then
18630            mkdir -p $installdir
18631        fi
18632        if test ! -d $installdir; then
18633            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18634        fi
18635        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18636        touch $tmpfile
18637        if test ! -f $tmpfile; then
18638            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18639        fi
18640
18641    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18642    # $tmpfile is the local file name for the downloaded file.
18643    VALID_TOOL=no
18644    if test "x$BDEPS_FTP" = xwget; then
18645       VALID_TOOL=yes
18646       wget -O $tmpfile $with_builddeps_server/$resource
18647    fi
18648    if test "x$BDEPS_FTP" = xlftp; then
18649       VALID_TOOL=yes
18650       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18651    fi
18652    if test "x$BDEPS_FTP" = xftp; then
18653        VALID_TOOL=yes
18654        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18655        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18656        FTPUSERPWD=${FTPSERVER%%@*}
18657        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18658            FTPUSER=${userpwd%%:*}
18659            FTPPWD=${userpwd#*@}
18660            FTPSERVER=${FTPSERVER#*@}
18661        else
18662            FTPUSER=ftp
18663            FTPPWD=ftp
18664        fi
18665        # the "pass" command does not work on some
18666        # ftp clients (read ftp.exe) but if it works,
18667        # passive mode is better!
18668        (\
18669            echo "user $FTPUSER $FTPPWD"        ;\
18670            echo "pass"                         ;\
18671            echo "bin"                          ;\
18672            echo "get $FTPPATH $tmpfile"              ;\
18673        ) | ftp -in $FTPSERVER
18674    fi
18675    if test "x$VALID_TOOL" != xyes; then
18676       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18677    fi
18678
18679        mv $tmpfile $installdir/$filename
18680        if test ! -s $installdir/$filename; then
18681            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18682        fi
18683        case "$extension" in
18684            zip)  echo "Unzipping $installdir/$filename..."
18685               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18686            ;;
18687            tar.gz) echo "Untaring $installdir/$filename..."
18688               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18689            ;;
18690            tgz) echo "Untaring $installdir/$filename..."
18691               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18692            ;;
18693            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18694            ;;
18695        esac
18696    fi
18697    if test -f $installdir/$filename.unpacked; then
18698        depdir=$installdir
18699    fi
18700
18701	    fi
18702            # Source the builddeps file again, because in the previous command, the depdir
18703            # was updated to point at the current build dependency install directory.
18704            . $builddepsfile
18705            # Now extract variables from the builddeps.conf files.
18706            theroot=${builddep_devkit_ROOT}
18707            thecflags=${builddep_devkit_CFLAGS}
18708            thelibs=${builddep_devkit_LIBS}
18709            if test "x$depdir" = x; then
18710                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18711            fi
18712            DEVKIT=$depdir
18713            if test "x$theroot" != x; then
18714               DEVKIT="$theroot"
18715            fi
18716            if test "x$thecflags" != x; then
18717               DEVKIT_CFLAGS="$thecflags"
18718            fi
18719            if test "x$thelibs" != x; then
18720               DEVKIT_LIBS="$thelibs"
18721            fi
18722            # Found devkit
18723                     PATH="$DEVKIT/bin:$PATH"
18724                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18725                     if test "x$x_includes" = "xNONE"; then
18726                         x_includes="$SYS_ROOT/usr/include/X11"
18727                     fi
18728                     if test "x$x_libraries" = "xNONE"; then
18729                         x_libraries="$SYS_ROOT/usr/lib"
18730                     fi
18731
18732
18733        fi
18734
18735    fi
18736
18737
18738# Store the CFLAGS etal passed to the configure script.
18739ORG_CFLAGS="$CFLAGS"
18740ORG_CXXFLAGS="$CXXFLAGS"
18741ORG_OBJCFLAGS="$OBJCFLAGS"
18742
18743# autoconf magic only relies on PATH, so update it if tools dir is specified
18744OLD_PATH="$PATH"
18745if test "x$TOOLS_DIR" != x; then
18746  PATH=$TOOLS_DIR:$PATH
18747fi
18748
18749
18750### Locate C compiler (CC)
18751
18752# On windows, only cl.exe is supported.
18753# On Solaris, cc is preferred to gcc.
18754# Elsewhere, gcc is preferred to cc.
18755
18756if test "x$CC" != x; then
18757  COMPILER_CHECK_LIST="$CC"
18758elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18759  COMPILER_CHECK_LIST="cl"
18760elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18761  COMPILER_CHECK_LIST="cc gcc"
18762else
18763  COMPILER_CHECK_LIST="gcc cc"
18764fi
18765
18766
18767  COMPILER_NAME=C
18768
18769  CC=
18770  # If TOOLS_DIR is set, check for all compiler names in there first
18771  # before checking the rest of the PATH.
18772  if test -n "$TOOLS_DIR"; then
18773    PATH_save="$PATH"
18774    PATH="$TOOLS_DIR"
18775    for ac_prog in $COMPILER_CHECK_LIST
18776do
18777  # Extract the first word of "$ac_prog", so it can be a program name with args.
18778set dummy $ac_prog; ac_word=$2
18779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18780$as_echo_n "checking for $ac_word... " >&6; }
18781if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18782  $as_echo_n "(cached) " >&6
18783else
18784  case $TOOLS_DIR_CC in
18785  [\\/]* | ?:[\\/]*)
18786  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18787  ;;
18788  *)
18789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18790for as_dir in $PATH
18791do
18792  IFS=$as_save_IFS
18793  test -z "$as_dir" && as_dir=.
18794    for ac_exec_ext in '' $ac_executable_extensions; do
18795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18796    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18798    break 2
18799  fi
18800done
18801  done
18802IFS=$as_save_IFS
18803
18804  ;;
18805esac
18806fi
18807TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18808if test -n "$TOOLS_DIR_CC"; then
18809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18810$as_echo "$TOOLS_DIR_CC" >&6; }
18811else
18812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18813$as_echo "no" >&6; }
18814fi
18815
18816
18817  test -n "$TOOLS_DIR_CC" && break
18818done
18819
18820    CC=$TOOLS_DIR_CC
18821    PATH="$PATH_save"
18822  fi
18823
18824  # AC_PATH_PROGS can't be run multiple times with the same variable,
18825  # so create a new name for this run.
18826  if test "x$CC" = x; then
18827    for ac_prog in $COMPILER_CHECK_LIST
18828do
18829  # Extract the first word of "$ac_prog", so it can be a program name with args.
18830set dummy $ac_prog; ac_word=$2
18831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18832$as_echo_n "checking for $ac_word... " >&6; }
18833if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18834  $as_echo_n "(cached) " >&6
18835else
18836  case $POTENTIAL_CC in
18837  [\\/]* | ?:[\\/]*)
18838  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18839  ;;
18840  *)
18841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18842for as_dir in $PATH
18843do
18844  IFS=$as_save_IFS
18845  test -z "$as_dir" && as_dir=.
18846    for ac_exec_ext in '' $ac_executable_extensions; do
18847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18848    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18850    break 2
18851  fi
18852done
18853  done
18854IFS=$as_save_IFS
18855
18856  ;;
18857esac
18858fi
18859POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18860if test -n "$POTENTIAL_CC"; then
18861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18862$as_echo "$POTENTIAL_CC" >&6; }
18863else
18864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18865$as_echo "no" >&6; }
18866fi
18867
18868
18869  test -n "$POTENTIAL_CC" && break
18870done
18871
18872    CC=$POTENTIAL_CC
18873  fi
18874
18875  if test "x$CC" = x; then
18876
18877    # Print a helpful message on how to acquire the necessary build dependency.
18878    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18879    MISSING_DEPENDENCY=devkit
18880    PKGHANDLER_COMMAND=
18881
18882    case $PKGHANDLER in
18883	apt-get)
18884                apt_help     $MISSING_DEPENDENCY ;;
18885    yum)
18886                yum_help     $MISSING_DEPENDENCY ;;
18887	port)
18888                port_help    $MISSING_DEPENDENCY ;;
18889	pkgutil)
18890                pkgutil_help $MISSING_DEPENDENCY ;;
18891	pkgadd)
18892                pkgadd_help  $MISSING_DEPENDENCY ;;
18893    * )
18894      break ;;
18895    esac
18896
18897    if test "x$PKGHANDLER_COMMAND" != x; then
18898        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18899    fi
18900
18901      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18902  fi
18903
18904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18905
18906  # First separate the path from the arguments. This will split at the first
18907  # space.
18908  complete="$CC"
18909  path="${complete%% *}"
18910  tmp="$complete EOL"
18911  arguments="${tmp#* }"
18912
18913  # Input might be given as Windows format, start by converting to
18914  # unix format.
18915  new_path=`$CYGPATH -u "$path"`
18916
18917  # Now try to locate executable using which
18918  new_path=`$WHICH "$new_path" 2> /dev/null`
18919  # bat and cmd files are not always considered executable in cygwin causing which
18920  # to not find them
18921  if test "x$new_path" = x \
18922           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18923           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18924    new_path=`$CYGPATH -u "$path"`
18925  fi
18926  if test "x$new_path" = x; then
18927    # Oops. Which didn't find the executable.
18928    # The splitting of arguments from the executable at a space might have been incorrect,
18929    # since paths with space are more likely in Windows. Give it another try with the whole
18930    # argument.
18931    path="$complete"
18932    arguments="EOL"
18933    new_path=`$CYGPATH -u "$path"`
18934    new_path=`$WHICH "$new_path" 2> /dev/null`
18935    # bat and cmd files are not always considered executable in cygwin causing which
18936    # to not find them
18937    if test "x$new_path" = x \
18938             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18939             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18940      new_path=`$CYGPATH -u "$path"`
18941    fi
18942    if test "x$new_path" = x; then
18943      # It's still not found. Now this is an unrecoverable error.
18944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18945$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18946      has_space=`$ECHO "$complete" | $GREP " "`
18947      if test "x$has_space" != x; then
18948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18950      fi
18951      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18952    fi
18953  fi
18954
18955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18958  # "foo.exe" is OK but "foo" is an error.
18959  #
18960  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18961  # It is also a way to make sure we got the proper file name for the real test later on.
18962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18963  if test "x$test_shortpath" = x; then
18964    # Short path failed, file does not exist as specified.
18965    # Try adding .exe or .cmd
18966    if test -f "${new_path}.exe"; then
18967       input_to_shortpath="${new_path}.exe"
18968    elif test -f "${new_path}.cmd"; then
18969       input_to_shortpath="${new_path}.cmd"
18970    else
18971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18972$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18973      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18974$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18975      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18976    fi
18977  else
18978    input_to_shortpath="$new_path"
18979  fi
18980
18981  # Call helper function which possibly converts this using DOS-style short mode.
18982  # If so, the updated path is stored in $new_path.
18983  new_path="$input_to_shortpath"
18984
18985  input_path="$input_to_shortpath"
18986  # Check if we need to convert this using DOS-style short mode. If the path
18987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18988  # take no chances and rewrite it.
18989  # Note: m4 eats our [], so we need to use [ and ] instead.
18990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18991  if test "x$has_forbidden_chars" != x; then
18992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18996      # Going to short mode and back again did indeed matter. Since short mode is
18997      # case insensitive, let's make it lowercase to improve readability.
18998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18999      # Now convert it back to Unix-stile (cygpath)
19000      input_path=`$CYGPATH -u "$shortmode_path"`
19001      new_path="$input_path"
19002    fi
19003  fi
19004
19005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19006  if test "x$test_cygdrive_prefix" = x; then
19007    # As a simple fix, exclude /usr/bin since it's not a real path.
19008    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19010      # a path prefixed by /cygdrive for fixpath to work.
19011      new_path="$CYGWIN_ROOT_PATH$input_path"
19012    fi
19013  fi
19014
19015  # remove trailing .exe if any
19016  new_path="${new_path/%.exe/}"
19017
19018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19019
19020  # First separate the path from the arguments. This will split at the first
19021  # space.
19022  complete="$CC"
19023  path="${complete%% *}"
19024  tmp="$complete EOL"
19025  arguments="${tmp#* }"
19026
19027  # Input might be given as Windows format, start by converting to
19028  # unix format.
19029  new_path="$path"
19030
19031  windows_path="$new_path"
19032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19033    unix_path=`$CYGPATH -u "$windows_path"`
19034    new_path="$unix_path"
19035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19037    new_path="$unix_path"
19038  fi
19039
19040
19041  # Now try to locate executable using which
19042  new_path=`$WHICH "$new_path" 2> /dev/null`
19043
19044  if test "x$new_path" = x; then
19045    # Oops. Which didn't find the executable.
19046    # The splitting of arguments from the executable at a space might have been incorrect,
19047    # since paths with space are more likely in Windows. Give it another try with the whole
19048    # argument.
19049    path="$complete"
19050    arguments="EOL"
19051    new_path="$path"
19052
19053  windows_path="$new_path"
19054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19055    unix_path=`$CYGPATH -u "$windows_path"`
19056    new_path="$unix_path"
19057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19059    new_path="$unix_path"
19060  fi
19061
19062
19063    new_path=`$WHICH "$new_path" 2> /dev/null`
19064
19065    if test "x$new_path" = x; then
19066      # It's still not found. Now this is an unrecoverable error.
19067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19068$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19069      has_space=`$ECHO "$complete" | $GREP " "`
19070      if test "x$has_space" != x; then
19071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19073      fi
19074      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19075    fi
19076  fi
19077
19078  # Now new_path has a complete unix path to the binary
19079  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19080    # Keep paths in /bin as-is, but remove trailing .exe if any
19081    new_path="${new_path/%.exe/}"
19082    # Do not save /bin paths to all_fixpath_prefixes!
19083  else
19084    # Not in mixed or Windows style, start by that.
19085    new_path=`cmd //c echo $new_path`
19086
19087  input_path="$new_path"
19088  # Check if we need to convert this using DOS-style short mode. If the path
19089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19090  # take no chances and rewrite it.
19091  # Note: m4 eats our [], so we need to use [ and ] instead.
19092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19093  if test "x$has_forbidden_chars" != x; then
19094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19096  fi
19097
19098    # Output is in $new_path
19099
19100  windows_path="$new_path"
19101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19102    unix_path=`$CYGPATH -u "$windows_path"`
19103    new_path="$unix_path"
19104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19106    new_path="$unix_path"
19107  fi
19108
19109    # remove trailing .exe if any
19110    new_path="${new_path/%.exe/}"
19111
19112    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19113    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19114  fi
19115
19116  else
19117    # We're on a posix platform. Hooray! :)
19118    # First separate the path from the arguments. This will split at the first
19119    # space.
19120    complete="$CC"
19121    path="${complete%% *}"
19122    tmp="$complete EOL"
19123    arguments="${tmp#* }"
19124
19125    # Cannot rely on the command "which" here since it doesn't always work.
19126    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19127    if test -z "$is_absolute_path"; then
19128      # Path to executable is not absolute. Find it.
19129      IFS_save="$IFS"
19130      IFS=:
19131      for p in $PATH; do
19132        if test -f "$p/$path" && test -x "$p/$path"; then
19133          new_path="$p/$path"
19134          break
19135        fi
19136      done
19137      IFS="$IFS_save"
19138    else
19139      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19140$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19141      new_path="$path"
19142    fi
19143
19144    if test "x$new_path" = x; then
19145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19146$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19147        has_space=`$ECHO "$complete" | $GREP " "`
19148        if test "x$has_space" != x; then
19149          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19150$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19151        fi
19152        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19153      fi
19154  fi
19155
19156      # Now join together the path and the arguments once again
19157      if test "x$arguments" != xEOL; then
19158        new_complete="$new_path ${arguments% *}"
19159      else
19160        new_complete="$new_path"
19161      fi
19162
19163  if test "x$complete" != "x$new_complete"; then
19164      CC="$new_complete"
19165      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19166$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19167    fi
19168
19169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19170$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19171  TEST_COMPILER="$CC"
19172
19173    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19174        # Follow a chain of symbolic links. Use readlink
19175        # where it exists, else fall back to horribly
19176        # complicated shell code.
19177        if test "x$READLINK_TESTED" != yes; then
19178            # On MacOSX there is a readlink tool with a different
19179            # purpose than the GNU readlink tool. Check the found readlink.
19180            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19181            if test "x$ISGNU" = x; then
19182                 # A readlink that we do not know how to use.
19183                 # Are there other non-GNU readlinks out there?
19184                 READLINK_TESTED=yes
19185                 READLINK=
19186            fi
19187        fi
19188
19189        if test "x$READLINK" != x; then
19190            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19191        else
19192            # Save the current directory for restoring afterwards
19193            STARTDIR=$PWD
19194            COUNTER=0
19195            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19196            sym_link_file=`$BASENAME $TEST_COMPILER`
19197            cd $sym_link_dir
19198            # Use -P flag to resolve symlinks in directories.
19199            cd `$THEPWDCMD -P`
19200            sym_link_dir=`$THEPWDCMD -P`
19201            # Resolve file symlinks
19202            while test $COUNTER -lt 20; do
19203                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19204                if test "x$ISLINK" == x; then
19205                    # This is not a symbolic link! We are done!
19206                    break
19207                fi
19208                # Again resolve directory symlinks since the target of the just found
19209                # link could be in a different directory
19210                cd `$DIRNAME $ISLINK`
19211                sym_link_dir=`$THEPWDCMD -P`
19212                sym_link_file=`$BASENAME $ISLINK`
19213                let COUNTER=COUNTER+1
19214            done
19215            cd $STARTDIR
19216            TEST_COMPILER=$sym_link_dir/$sym_link_file
19217        fi
19218    fi
19219
19220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19221$as_echo "$TEST_COMPILER" >&6; }
19222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19223$as_echo_n "checking if CC is disguised ccache... " >&6; }
19224
19225  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19226  if test "x$COMPILER_BASENAME" = "xccache"; then
19227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19228$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19229    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19230    # We want to control ccache invocation ourselves, so ignore this cc and try
19231    # searching again.
19232
19233    # Remove the path to the fake ccache cc from the PATH
19234    RETRY_COMPILER_SAVED_PATH="$PATH"
19235    COMPILER_DIRNAME=`$DIRNAME $CC`
19236    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19237
19238    # Try again looking for our compiler
19239    if test -n "$ac_tool_prefix"; then
19240  for ac_prog in $COMPILER_CHECK_LIST
19241  do
19242    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19243set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19245$as_echo_n "checking for $ac_word... " >&6; }
19246if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19247  $as_echo_n "(cached) " >&6
19248else
19249  if test -n "$PROPER_COMPILER_CC"; then
19250  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19251else
19252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19253for as_dir in $PATH
19254do
19255  IFS=$as_save_IFS
19256  test -z "$as_dir" && as_dir=.
19257    for ac_exec_ext in '' $ac_executable_extensions; do
19258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19259    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19261    break 2
19262  fi
19263done
19264  done
19265IFS=$as_save_IFS
19266
19267fi
19268fi
19269PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19270if test -n "$PROPER_COMPILER_CC"; then
19271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19272$as_echo "$PROPER_COMPILER_CC" >&6; }
19273else
19274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19275$as_echo "no" >&6; }
19276fi
19277
19278
19279    test -n "$PROPER_COMPILER_CC" && break
19280  done
19281fi
19282if test -z "$PROPER_COMPILER_CC"; then
19283  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19284  for ac_prog in $COMPILER_CHECK_LIST
19285do
19286  # Extract the first word of "$ac_prog", so it can be a program name with args.
19287set dummy $ac_prog; ac_word=$2
19288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19289$as_echo_n "checking for $ac_word... " >&6; }
19290if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19291  $as_echo_n "(cached) " >&6
19292else
19293  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19294  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19295else
19296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19297for as_dir in $PATH
19298do
19299  IFS=$as_save_IFS
19300  test -z "$as_dir" && as_dir=.
19301    for ac_exec_ext in '' $ac_executable_extensions; do
19302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19303    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19305    break 2
19306  fi
19307done
19308  done
19309IFS=$as_save_IFS
19310
19311fi
19312fi
19313ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19314if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19316$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19317else
19318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19319$as_echo "no" >&6; }
19320fi
19321
19322
19323  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19324done
19325
19326  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19327    PROPER_COMPILER_CC=""
19328  else
19329    case $cross_compiling:$ac_tool_warned in
19330yes:)
19331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19333ac_tool_warned=yes ;;
19334esac
19335    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19336  fi
19337fi
19338
19339
19340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19341
19342  # First separate the path from the arguments. This will split at the first
19343  # space.
19344  complete="$PROPER_COMPILER_CC"
19345  path="${complete%% *}"
19346  tmp="$complete EOL"
19347  arguments="${tmp#* }"
19348
19349  # Input might be given as Windows format, start by converting to
19350  # unix format.
19351  new_path=`$CYGPATH -u "$path"`
19352
19353  # Now try to locate executable using which
19354  new_path=`$WHICH "$new_path" 2> /dev/null`
19355  # bat and cmd files are not always considered executable in cygwin causing which
19356  # to not find them
19357  if test "x$new_path" = x \
19358           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19359           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19360    new_path=`$CYGPATH -u "$path"`
19361  fi
19362  if test "x$new_path" = x; then
19363    # Oops. Which didn't find the executable.
19364    # The splitting of arguments from the executable at a space might have been incorrect,
19365    # since paths with space are more likely in Windows. Give it another try with the whole
19366    # argument.
19367    path="$complete"
19368    arguments="EOL"
19369    new_path=`$CYGPATH -u "$path"`
19370    new_path=`$WHICH "$new_path" 2> /dev/null`
19371    # bat and cmd files are not always considered executable in cygwin causing which
19372    # to not find them
19373    if test "x$new_path" = x \
19374             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19375             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19376      new_path=`$CYGPATH -u "$path"`
19377    fi
19378    if test "x$new_path" = x; then
19379      # It's still not found. Now this is an unrecoverable error.
19380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19381$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19382      has_space=`$ECHO "$complete" | $GREP " "`
19383      if test "x$has_space" != x; then
19384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19386      fi
19387      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19388    fi
19389  fi
19390
19391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19394  # "foo.exe" is OK but "foo" is an error.
19395  #
19396  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19397  # It is also a way to make sure we got the proper file name for the real test later on.
19398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19399  if test "x$test_shortpath" = x; then
19400    # Short path failed, file does not exist as specified.
19401    # Try adding .exe or .cmd
19402    if test -f "${new_path}.exe"; then
19403       input_to_shortpath="${new_path}.exe"
19404    elif test -f "${new_path}.cmd"; then
19405       input_to_shortpath="${new_path}.cmd"
19406    else
19407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19408$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19409      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19410$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19411      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19412    fi
19413  else
19414    input_to_shortpath="$new_path"
19415  fi
19416
19417  # Call helper function which possibly converts this using DOS-style short mode.
19418  # If so, the updated path is stored in $new_path.
19419  new_path="$input_to_shortpath"
19420
19421  input_path="$input_to_shortpath"
19422  # Check if we need to convert this using DOS-style short mode. If the path
19423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19424  # take no chances and rewrite it.
19425  # Note: m4 eats our [], so we need to use [ and ] instead.
19426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19427  if test "x$has_forbidden_chars" != x; then
19428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19432      # Going to short mode and back again did indeed matter. Since short mode is
19433      # case insensitive, let's make it lowercase to improve readability.
19434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19435      # Now convert it back to Unix-stile (cygpath)
19436      input_path=`$CYGPATH -u "$shortmode_path"`
19437      new_path="$input_path"
19438    fi
19439  fi
19440
19441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19442  if test "x$test_cygdrive_prefix" = x; then
19443    # As a simple fix, exclude /usr/bin since it's not a real path.
19444    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19446      # a path prefixed by /cygdrive for fixpath to work.
19447      new_path="$CYGWIN_ROOT_PATH$input_path"
19448    fi
19449  fi
19450
19451  # remove trailing .exe if any
19452  new_path="${new_path/%.exe/}"
19453
19454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19455
19456  # First separate the path from the arguments. This will split at the first
19457  # space.
19458  complete="$PROPER_COMPILER_CC"
19459  path="${complete%% *}"
19460  tmp="$complete EOL"
19461  arguments="${tmp#* }"
19462
19463  # Input might be given as Windows format, start by converting to
19464  # unix format.
19465  new_path="$path"
19466
19467  windows_path="$new_path"
19468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19469    unix_path=`$CYGPATH -u "$windows_path"`
19470    new_path="$unix_path"
19471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19473    new_path="$unix_path"
19474  fi
19475
19476
19477  # Now try to locate executable using which
19478  new_path=`$WHICH "$new_path" 2> /dev/null`
19479
19480  if test "x$new_path" = x; then
19481    # Oops. Which didn't find the executable.
19482    # The splitting of arguments from the executable at a space might have been incorrect,
19483    # since paths with space are more likely in Windows. Give it another try with the whole
19484    # argument.
19485    path="$complete"
19486    arguments="EOL"
19487    new_path="$path"
19488
19489  windows_path="$new_path"
19490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19491    unix_path=`$CYGPATH -u "$windows_path"`
19492    new_path="$unix_path"
19493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19495    new_path="$unix_path"
19496  fi
19497
19498
19499    new_path=`$WHICH "$new_path" 2> /dev/null`
19500
19501    if test "x$new_path" = x; then
19502      # It's still not found. Now this is an unrecoverable error.
19503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19504$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19505      has_space=`$ECHO "$complete" | $GREP " "`
19506      if test "x$has_space" != x; then
19507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19509      fi
19510      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19511    fi
19512  fi
19513
19514  # Now new_path has a complete unix path to the binary
19515  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19516    # Keep paths in /bin as-is, but remove trailing .exe if any
19517    new_path="${new_path/%.exe/}"
19518    # Do not save /bin paths to all_fixpath_prefixes!
19519  else
19520    # Not in mixed or Windows style, start by that.
19521    new_path=`cmd //c echo $new_path`
19522
19523  input_path="$new_path"
19524  # Check if we need to convert this using DOS-style short mode. If the path
19525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19526  # take no chances and rewrite it.
19527  # Note: m4 eats our [], so we need to use [ and ] instead.
19528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19529  if test "x$has_forbidden_chars" != x; then
19530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19532  fi
19533
19534    # Output is in $new_path
19535
19536  windows_path="$new_path"
19537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19538    unix_path=`$CYGPATH -u "$windows_path"`
19539    new_path="$unix_path"
19540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19542    new_path="$unix_path"
19543  fi
19544
19545    # remove trailing .exe if any
19546    new_path="${new_path/%.exe/}"
19547
19548    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19549    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19550  fi
19551
19552  else
19553    # We're on a posix platform. Hooray! :)
19554    # First separate the path from the arguments. This will split at the first
19555    # space.
19556    complete="$PROPER_COMPILER_CC"
19557    path="${complete%% *}"
19558    tmp="$complete EOL"
19559    arguments="${tmp#* }"
19560
19561    # Cannot rely on the command "which" here since it doesn't always work.
19562    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19563    if test -z "$is_absolute_path"; then
19564      # Path to executable is not absolute. Find it.
19565      IFS_save="$IFS"
19566      IFS=:
19567      for p in $PATH; do
19568        if test -f "$p/$path" && test -x "$p/$path"; then
19569          new_path="$p/$path"
19570          break
19571        fi
19572      done
19573      IFS="$IFS_save"
19574    else
19575      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19576$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19577      new_path="$path"
19578    fi
19579
19580    if test "x$new_path" = x; then
19581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19582$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19583        has_space=`$ECHO "$complete" | $GREP " "`
19584        if test "x$has_space" != x; then
19585          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19586$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19587        fi
19588        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19589      fi
19590  fi
19591
19592      # Now join together the path and the arguments once again
19593      if test "x$arguments" != xEOL; then
19594        new_complete="$new_path ${arguments% *}"
19595      else
19596        new_complete="$new_path"
19597      fi
19598
19599  if test "x$complete" != "x$new_complete"; then
19600      PROPER_COMPILER_CC="$new_complete"
19601      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19602$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19603    fi
19604
19605    PATH="$RETRY_COMPILER_SAVED_PATH"
19606
19607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19608$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19609
19610    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19611        # Follow a chain of symbolic links. Use readlink
19612        # where it exists, else fall back to horribly
19613        # complicated shell code.
19614        if test "x$READLINK_TESTED" != yes; then
19615            # On MacOSX there is a readlink tool with a different
19616            # purpose than the GNU readlink tool. Check the found readlink.
19617            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19618            if test "x$ISGNU" = x; then
19619                 # A readlink that we do not know how to use.
19620                 # Are there other non-GNU readlinks out there?
19621                 READLINK_TESTED=yes
19622                 READLINK=
19623            fi
19624        fi
19625
19626        if test "x$READLINK" != x; then
19627            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19628        else
19629            # Save the current directory for restoring afterwards
19630            STARTDIR=$PWD
19631            COUNTER=0
19632            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19633            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19634            cd $sym_link_dir
19635            # Use -P flag to resolve symlinks in directories.
19636            cd `$THEPWDCMD -P`
19637            sym_link_dir=`$THEPWDCMD -P`
19638            # Resolve file symlinks
19639            while test $COUNTER -lt 20; do
19640                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19641                if test "x$ISLINK" == x; then
19642                    # This is not a symbolic link! We are done!
19643                    break
19644                fi
19645                # Again resolve directory symlinks since the target of the just found
19646                # link could be in a different directory
19647                cd `$DIRNAME $ISLINK`
19648                sym_link_dir=`$THEPWDCMD -P`
19649                sym_link_file=`$BASENAME $ISLINK`
19650                let COUNTER=COUNTER+1
19651            done
19652            cd $STARTDIR
19653            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19654        fi
19655    fi
19656
19657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19658$as_echo "$PROPER_COMPILER_CC" >&6; }
19659    CC="$PROPER_COMPILER_CC"
19660  else
19661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19662$as_echo "no, keeping CC" >&6; }
19663    CC="$TEST_COMPILER"
19664  fi
19665
19666  COMPILER=$CC
19667  COMPILER_NAME=$COMPILER_NAME
19668
19669  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19670    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19671    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19672    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19673    if test $? -ne 0; then
19674      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19675
19676      { $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
19677$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19678      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19679$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19680      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19681    else
19682      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19683      COMPILER_VENDOR="Sun Studio"
19684    fi
19685  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19686    # First line typically looks something like:
19687    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19688    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19689    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19690    COMPILER_VENDOR="Microsoft CL.EXE"
19691    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19692    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19693      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19694        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19695      fi
19696    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19697      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19698        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19699      fi
19700    fi
19701  else
19702    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19703    # Check that this is likely to be GCC.
19704    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19705    if test $? -ne 0; then
19706      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19707$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19708      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19709$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19710      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19711    fi
19712
19713    # First line typically looks something like:
19714    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19715    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19716    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19717  fi
19718  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19719  CC_VERSION="$COMPILER_VERSION"
19720  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19721  CC_VENDOR="$COMPILER_VENDOR"
19722
19723  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19724$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19725
19726
19727# Now that we have resolved CC ourself, let autoconf have its go at it
19728ac_ext=c
19729ac_cpp='$CPP $CPPFLAGS'
19730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19732ac_compiler_gnu=$ac_cv_c_compiler_gnu
19733if test -n "$ac_tool_prefix"; then
19734  for ac_prog in $CC
19735  do
19736    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19739$as_echo_n "checking for $ac_word... " >&6; }
19740if ${ac_cv_prog_CC+:} false; then :
19741  $as_echo_n "(cached) " >&6
19742else
19743  if test -n "$CC"; then
19744  ac_cv_prog_CC="$CC" # Let the user override the test.
19745else
19746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19747for as_dir in $PATH
19748do
19749  IFS=$as_save_IFS
19750  test -z "$as_dir" && as_dir=.
19751    for ac_exec_ext in '' $ac_executable_extensions; do
19752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19753    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19755    break 2
19756  fi
19757done
19758  done
19759IFS=$as_save_IFS
19760
19761fi
19762fi
19763CC=$ac_cv_prog_CC
19764if test -n "$CC"; then
19765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19766$as_echo "$CC" >&6; }
19767else
19768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19769$as_echo "no" >&6; }
19770fi
19771
19772
19773    test -n "$CC" && break
19774  done
19775fi
19776if test -z "$CC"; then
19777  ac_ct_CC=$CC
19778  for ac_prog in $CC
19779do
19780  # Extract the first word of "$ac_prog", so it can be a program name with args.
19781set dummy $ac_prog; ac_word=$2
19782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19783$as_echo_n "checking for $ac_word... " >&6; }
19784if ${ac_cv_prog_ac_ct_CC+:} false; then :
19785  $as_echo_n "(cached) " >&6
19786else
19787  if test -n "$ac_ct_CC"; then
19788  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19789else
19790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19791for as_dir in $PATH
19792do
19793  IFS=$as_save_IFS
19794  test -z "$as_dir" && as_dir=.
19795    for ac_exec_ext in '' $ac_executable_extensions; do
19796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19797    ac_cv_prog_ac_ct_CC="$ac_prog"
19798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19799    break 2
19800  fi
19801done
19802  done
19803IFS=$as_save_IFS
19804
19805fi
19806fi
19807ac_ct_CC=$ac_cv_prog_ac_ct_CC
19808if test -n "$ac_ct_CC"; then
19809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19810$as_echo "$ac_ct_CC" >&6; }
19811else
19812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19813$as_echo "no" >&6; }
19814fi
19815
19816
19817  test -n "$ac_ct_CC" && break
19818done
19819
19820  if test "x$ac_ct_CC" = x; then
19821    CC=""
19822  else
19823    case $cross_compiling:$ac_tool_warned in
19824yes:)
19825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19827ac_tool_warned=yes ;;
19828esac
19829    CC=$ac_ct_CC
19830  fi
19831fi
19832
19833
19834test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19836as_fn_error $? "no acceptable C compiler found in \$PATH
19837See \`config.log' for more details" "$LINENO" 5; }
19838
19839# Provide some information about the compiler.
19840$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19841set X $ac_compile
19842ac_compiler=$2
19843for ac_option in --version -v -V -qversion; do
19844  { { ac_try="$ac_compiler $ac_option >&5"
19845case "(($ac_try" in
19846  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19847  *) ac_try_echo=$ac_try;;
19848esac
19849eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19850$as_echo "$ac_try_echo"; } >&5
19851  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19852  ac_status=$?
19853  if test -s conftest.err; then
19854    sed '10a\
19855... rest of stderr output deleted ...
19856         10q' conftest.err >conftest.er1
19857    cat conftest.er1 >&5
19858  fi
19859  rm -f conftest.er1 conftest.err
19860  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19861  test $ac_status = 0; }
19862done
19863
19864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19865/* end confdefs.h.  */
19866
19867int
19868main ()
19869{
19870
19871  ;
19872  return 0;
19873}
19874_ACEOF
19875ac_clean_files_save=$ac_clean_files
19876ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19877# Try to create an executable without -o first, disregard a.out.
19878# It will help us diagnose broken compilers, and finding out an intuition
19879# of exeext.
19880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19881$as_echo_n "checking whether the C compiler works... " >&6; }
19882ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19883
19884# The possible output files:
19885ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19886
19887ac_rmfiles=
19888for ac_file in $ac_files
19889do
19890  case $ac_file in
19891    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19892    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19893  esac
19894done
19895rm -f $ac_rmfiles
19896
19897if { { ac_try="$ac_link_default"
19898case "(($ac_try" in
19899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19900  *) ac_try_echo=$ac_try;;
19901esac
19902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19903$as_echo "$ac_try_echo"; } >&5
19904  (eval "$ac_link_default") 2>&5
19905  ac_status=$?
19906  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19907  test $ac_status = 0; }; then :
19908  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19909# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19910# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19911# so that the user can short-circuit this test for compilers unknown to
19912# Autoconf.
19913for ac_file in $ac_files ''
19914do
19915  test -f "$ac_file" || continue
19916  case $ac_file in
19917    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19918	;;
19919    [ab].out )
19920	# We found the default executable, but exeext='' is most
19921	# certainly right.
19922	break;;
19923    *.* )
19924	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19925	then :; else
19926	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19927	fi
19928	# We set ac_cv_exeext here because the later test for it is not
19929	# safe: cross compilers may not add the suffix if given an `-o'
19930	# argument, so we may need to know it at that point already.
19931	# Even if this section looks crufty: it has the advantage of
19932	# actually working.
19933	break;;
19934    * )
19935	break;;
19936  esac
19937done
19938test "$ac_cv_exeext" = no && ac_cv_exeext=
19939
19940else
19941  ac_file=''
19942fi
19943if test -z "$ac_file"; then :
19944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19945$as_echo "no" >&6; }
19946$as_echo "$as_me: failed program was:" >&5
19947sed 's/^/| /' conftest.$ac_ext >&5
19948
19949{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19951as_fn_error 77 "C compiler cannot create executables
19952See \`config.log' for more details" "$LINENO" 5; }
19953else
19954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19955$as_echo "yes" >&6; }
19956fi
19957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19958$as_echo_n "checking for C compiler default output file name... " >&6; }
19959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19960$as_echo "$ac_file" >&6; }
19961ac_exeext=$ac_cv_exeext
19962
19963rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19964ac_clean_files=$ac_clean_files_save
19965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19966$as_echo_n "checking for suffix of executables... " >&6; }
19967if { { ac_try="$ac_link"
19968case "(($ac_try" in
19969  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19970  *) ac_try_echo=$ac_try;;
19971esac
19972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19973$as_echo "$ac_try_echo"; } >&5
19974  (eval "$ac_link") 2>&5
19975  ac_status=$?
19976  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19977  test $ac_status = 0; }; then :
19978  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19979# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19980# work properly (i.e., refer to `conftest.exe'), while it won't with
19981# `rm'.
19982for ac_file in conftest.exe conftest conftest.*; do
19983  test -f "$ac_file" || continue
19984  case $ac_file in
19985    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19986    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19987	  break;;
19988    * ) break;;
19989  esac
19990done
19991else
19992  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19994as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19995See \`config.log' for more details" "$LINENO" 5; }
19996fi
19997rm -f conftest conftest$ac_cv_exeext
19998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19999$as_echo "$ac_cv_exeext" >&6; }
20000
20001rm -f conftest.$ac_ext
20002EXEEXT=$ac_cv_exeext
20003ac_exeext=$EXEEXT
20004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20005/* end confdefs.h.  */
20006#include <stdio.h>
20007int
20008main ()
20009{
20010FILE *f = fopen ("conftest.out", "w");
20011 return ferror (f) || fclose (f) != 0;
20012
20013  ;
20014  return 0;
20015}
20016_ACEOF
20017ac_clean_files="$ac_clean_files conftest.out"
20018# Check that the compiler produces executables we can run.  If not, either
20019# the compiler is broken, or we cross compile.
20020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20021$as_echo_n "checking whether we are cross compiling... " >&6; }
20022if test "$cross_compiling" != yes; then
20023  { { ac_try="$ac_link"
20024case "(($ac_try" in
20025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20026  *) ac_try_echo=$ac_try;;
20027esac
20028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20029$as_echo "$ac_try_echo"; } >&5
20030  (eval "$ac_link") 2>&5
20031  ac_status=$?
20032  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20033  test $ac_status = 0; }
20034  if { ac_try='./conftest$ac_cv_exeext'
20035  { { case "(($ac_try" in
20036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20037  *) ac_try_echo=$ac_try;;
20038esac
20039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20040$as_echo "$ac_try_echo"; } >&5
20041  (eval "$ac_try") 2>&5
20042  ac_status=$?
20043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20044  test $ac_status = 0; }; }; then
20045    cross_compiling=no
20046  else
20047    if test "$cross_compiling" = maybe; then
20048	cross_compiling=yes
20049    else
20050	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20052as_fn_error $? "cannot run C compiled programs.
20053If you meant to cross compile, use \`--host'.
20054See \`config.log' for more details" "$LINENO" 5; }
20055    fi
20056  fi
20057fi
20058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20059$as_echo "$cross_compiling" >&6; }
20060
20061rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20062ac_clean_files=$ac_clean_files_save
20063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20064$as_echo_n "checking for suffix of object files... " >&6; }
20065if ${ac_cv_objext+:} false; then :
20066  $as_echo_n "(cached) " >&6
20067else
20068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20069/* end confdefs.h.  */
20070
20071int
20072main ()
20073{
20074
20075  ;
20076  return 0;
20077}
20078_ACEOF
20079rm -f conftest.o conftest.obj
20080if { { ac_try="$ac_compile"
20081case "(($ac_try" in
20082  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20083  *) ac_try_echo=$ac_try;;
20084esac
20085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20086$as_echo "$ac_try_echo"; } >&5
20087  (eval "$ac_compile") 2>&5
20088  ac_status=$?
20089  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20090  test $ac_status = 0; }; then :
20091  for ac_file in conftest.o conftest.obj conftest.*; do
20092  test -f "$ac_file" || continue;
20093  case $ac_file in
20094    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20095    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20096       break;;
20097  esac
20098done
20099else
20100  $as_echo "$as_me: failed program was:" >&5
20101sed 's/^/| /' conftest.$ac_ext >&5
20102
20103{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20105as_fn_error $? "cannot compute suffix of object files: cannot compile
20106See \`config.log' for more details" "$LINENO" 5; }
20107fi
20108rm -f conftest.$ac_cv_objext conftest.$ac_ext
20109fi
20110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20111$as_echo "$ac_cv_objext" >&6; }
20112OBJEXT=$ac_cv_objext
20113ac_objext=$OBJEXT
20114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20115$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20116if ${ac_cv_c_compiler_gnu+:} false; then :
20117  $as_echo_n "(cached) " >&6
20118else
20119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20120/* end confdefs.h.  */
20121
20122int
20123main ()
20124{
20125#ifndef __GNUC__
20126       choke me
20127#endif
20128
20129  ;
20130  return 0;
20131}
20132_ACEOF
20133if ac_fn_c_try_compile "$LINENO"; then :
20134  ac_compiler_gnu=yes
20135else
20136  ac_compiler_gnu=no
20137fi
20138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20139ac_cv_c_compiler_gnu=$ac_compiler_gnu
20140
20141fi
20142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20143$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20144if test $ac_compiler_gnu = yes; then
20145  GCC=yes
20146else
20147  GCC=
20148fi
20149ac_test_CFLAGS=${CFLAGS+set}
20150ac_save_CFLAGS=$CFLAGS
20151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20152$as_echo_n "checking whether $CC accepts -g... " >&6; }
20153if ${ac_cv_prog_cc_g+:} false; then :
20154  $as_echo_n "(cached) " >&6
20155else
20156  ac_save_c_werror_flag=$ac_c_werror_flag
20157   ac_c_werror_flag=yes
20158   ac_cv_prog_cc_g=no
20159   CFLAGS="-g"
20160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20161/* end confdefs.h.  */
20162
20163int
20164main ()
20165{
20166
20167  ;
20168  return 0;
20169}
20170_ACEOF
20171if ac_fn_c_try_compile "$LINENO"; then :
20172  ac_cv_prog_cc_g=yes
20173else
20174  CFLAGS=""
20175      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20176/* end confdefs.h.  */
20177
20178int
20179main ()
20180{
20181
20182  ;
20183  return 0;
20184}
20185_ACEOF
20186if ac_fn_c_try_compile "$LINENO"; then :
20187
20188else
20189  ac_c_werror_flag=$ac_save_c_werror_flag
20190	 CFLAGS="-g"
20191	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20192/* end confdefs.h.  */
20193
20194int
20195main ()
20196{
20197
20198  ;
20199  return 0;
20200}
20201_ACEOF
20202if ac_fn_c_try_compile "$LINENO"; then :
20203  ac_cv_prog_cc_g=yes
20204fi
20205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20206fi
20207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20208fi
20209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20210   ac_c_werror_flag=$ac_save_c_werror_flag
20211fi
20212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20213$as_echo "$ac_cv_prog_cc_g" >&6; }
20214if test "$ac_test_CFLAGS" = set; then
20215  CFLAGS=$ac_save_CFLAGS
20216elif test $ac_cv_prog_cc_g = yes; then
20217  if test "$GCC" = yes; then
20218    CFLAGS="-g -O2"
20219  else
20220    CFLAGS="-g"
20221  fi
20222else
20223  if test "$GCC" = yes; then
20224    CFLAGS="-O2"
20225  else
20226    CFLAGS=
20227  fi
20228fi
20229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20230$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20231if ${ac_cv_prog_cc_c89+:} false; then :
20232  $as_echo_n "(cached) " >&6
20233else
20234  ac_cv_prog_cc_c89=no
20235ac_save_CC=$CC
20236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20237/* end confdefs.h.  */
20238#include <stdarg.h>
20239#include <stdio.h>
20240struct stat;
20241/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20242struct buf { int x; };
20243FILE * (*rcsopen) (struct buf *, struct stat *, int);
20244static char *e (p, i)
20245     char **p;
20246     int i;
20247{
20248  return p[i];
20249}
20250static char *f (char * (*g) (char **, int), char **p, ...)
20251{
20252  char *s;
20253  va_list v;
20254  va_start (v,p);
20255  s = g (p, va_arg (v,int));
20256  va_end (v);
20257  return s;
20258}
20259
20260/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20261   function prototypes and stuff, but not '\xHH' hex character constants.
20262   These don't provoke an error unfortunately, instead are silently treated
20263   as 'x'.  The following induces an error, until -std is added to get
20264   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20265   array size at least.  It's necessary to write '\x00'==0 to get something
20266   that's true only with -std.  */
20267int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20268
20269/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20270   inside strings and character constants.  */
20271#define FOO(x) 'x'
20272int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20273
20274int test (int i, double x);
20275struct s1 {int (*f) (int a);};
20276struct s2 {int (*f) (double a);};
20277int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20278int argc;
20279char **argv;
20280int
20281main ()
20282{
20283return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20284  ;
20285  return 0;
20286}
20287_ACEOF
20288for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20289	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20290do
20291  CC="$ac_save_CC $ac_arg"
20292  if ac_fn_c_try_compile "$LINENO"; then :
20293  ac_cv_prog_cc_c89=$ac_arg
20294fi
20295rm -f core conftest.err conftest.$ac_objext
20296  test "x$ac_cv_prog_cc_c89" != "xno" && break
20297done
20298rm -f conftest.$ac_ext
20299CC=$ac_save_CC
20300
20301fi
20302# AC_CACHE_VAL
20303case "x$ac_cv_prog_cc_c89" in
20304  x)
20305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20306$as_echo "none needed" >&6; } ;;
20307  xno)
20308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20309$as_echo "unsupported" >&6; } ;;
20310  *)
20311    CC="$CC $ac_cv_prog_cc_c89"
20312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20313$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20314esac
20315if test "x$ac_cv_prog_cc_c89" != xno; then :
20316
20317fi
20318
20319ac_ext=cpp
20320ac_cpp='$CXXCPP $CPPFLAGS'
20321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20324
20325
20326### Locate C++ compiler (CXX)
20327
20328if test "x$CXX" != x; then
20329  COMPILER_CHECK_LIST="$CXX"
20330elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20331  COMPILER_CHECK_LIST="cl"
20332elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20333  COMPILER_CHECK_LIST="CC g++"
20334else
20335  COMPILER_CHECK_LIST="g++ CC"
20336fi
20337
20338
20339  COMPILER_NAME=C++
20340
20341  CXX=
20342  # If TOOLS_DIR is set, check for all compiler names in there first
20343  # before checking the rest of the PATH.
20344  if test -n "$TOOLS_DIR"; then
20345    PATH_save="$PATH"
20346    PATH="$TOOLS_DIR"
20347    for ac_prog in $COMPILER_CHECK_LIST
20348do
20349  # Extract the first word of "$ac_prog", so it can be a program name with args.
20350set dummy $ac_prog; ac_word=$2
20351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20352$as_echo_n "checking for $ac_word... " >&6; }
20353if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20354  $as_echo_n "(cached) " >&6
20355else
20356  case $TOOLS_DIR_CXX in
20357  [\\/]* | ?:[\\/]*)
20358  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20359  ;;
20360  *)
20361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20362for as_dir in $PATH
20363do
20364  IFS=$as_save_IFS
20365  test -z "$as_dir" && as_dir=.
20366    for ac_exec_ext in '' $ac_executable_extensions; do
20367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20368    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20370    break 2
20371  fi
20372done
20373  done
20374IFS=$as_save_IFS
20375
20376  ;;
20377esac
20378fi
20379TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20380if test -n "$TOOLS_DIR_CXX"; then
20381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20382$as_echo "$TOOLS_DIR_CXX" >&6; }
20383else
20384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20385$as_echo "no" >&6; }
20386fi
20387
20388
20389  test -n "$TOOLS_DIR_CXX" && break
20390done
20391
20392    CXX=$TOOLS_DIR_CXX
20393    PATH="$PATH_save"
20394  fi
20395
20396  # AC_PATH_PROGS can't be run multiple times with the same variable,
20397  # so create a new name for this run.
20398  if test "x$CXX" = x; then
20399    for ac_prog in $COMPILER_CHECK_LIST
20400do
20401  # Extract the first word of "$ac_prog", so it can be a program name with args.
20402set dummy $ac_prog; ac_word=$2
20403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20404$as_echo_n "checking for $ac_word... " >&6; }
20405if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20406  $as_echo_n "(cached) " >&6
20407else
20408  case $POTENTIAL_CXX in
20409  [\\/]* | ?:[\\/]*)
20410  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20411  ;;
20412  *)
20413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20414for as_dir in $PATH
20415do
20416  IFS=$as_save_IFS
20417  test -z "$as_dir" && as_dir=.
20418    for ac_exec_ext in '' $ac_executable_extensions; do
20419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20420    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20422    break 2
20423  fi
20424done
20425  done
20426IFS=$as_save_IFS
20427
20428  ;;
20429esac
20430fi
20431POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20432if test -n "$POTENTIAL_CXX"; then
20433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20434$as_echo "$POTENTIAL_CXX" >&6; }
20435else
20436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20437$as_echo "no" >&6; }
20438fi
20439
20440
20441  test -n "$POTENTIAL_CXX" && break
20442done
20443
20444    CXX=$POTENTIAL_CXX
20445  fi
20446
20447  if test "x$CXX" = x; then
20448
20449    # Print a helpful message on how to acquire the necessary build dependency.
20450    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20451    MISSING_DEPENDENCY=devkit
20452    PKGHANDLER_COMMAND=
20453
20454    case $PKGHANDLER in
20455	apt-get)
20456                apt_help     $MISSING_DEPENDENCY ;;
20457    yum)
20458                yum_help     $MISSING_DEPENDENCY ;;
20459	port)
20460                port_help    $MISSING_DEPENDENCY ;;
20461	pkgutil)
20462                pkgutil_help $MISSING_DEPENDENCY ;;
20463	pkgadd)
20464                pkgadd_help  $MISSING_DEPENDENCY ;;
20465    * )
20466      break ;;
20467    esac
20468
20469    if test "x$PKGHANDLER_COMMAND" != x; then
20470        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20471    fi
20472
20473      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20474  fi
20475
20476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20477
20478  # First separate the path from the arguments. This will split at the first
20479  # space.
20480  complete="$CXX"
20481  path="${complete%% *}"
20482  tmp="$complete EOL"
20483  arguments="${tmp#* }"
20484
20485  # Input might be given as Windows format, start by converting to
20486  # unix format.
20487  new_path=`$CYGPATH -u "$path"`
20488
20489  # Now try to locate executable using which
20490  new_path=`$WHICH "$new_path" 2> /dev/null`
20491  # bat and cmd files are not always considered executable in cygwin causing which
20492  # to not find them
20493  if test "x$new_path" = x \
20494           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20495           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20496    new_path=`$CYGPATH -u "$path"`
20497  fi
20498  if test "x$new_path" = x; then
20499    # Oops. Which didn't find the executable.
20500    # The splitting of arguments from the executable at a space might have been incorrect,
20501    # since paths with space are more likely in Windows. Give it another try with the whole
20502    # argument.
20503    path="$complete"
20504    arguments="EOL"
20505    new_path=`$CYGPATH -u "$path"`
20506    new_path=`$WHICH "$new_path" 2> /dev/null`
20507    # bat and cmd files are not always considered executable in cygwin causing which
20508    # to not find them
20509    if test "x$new_path" = x \
20510             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20511             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20512      new_path=`$CYGPATH -u "$path"`
20513    fi
20514    if test "x$new_path" = x; then
20515      # It's still not found. Now this is an unrecoverable error.
20516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20517$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20518      has_space=`$ECHO "$complete" | $GREP " "`
20519      if test "x$has_space" != x; then
20520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20522      fi
20523      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20524    fi
20525  fi
20526
20527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20530  # "foo.exe" is OK but "foo" is an error.
20531  #
20532  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20533  # It is also a way to make sure we got the proper file name for the real test later on.
20534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20535  if test "x$test_shortpath" = x; then
20536    # Short path failed, file does not exist as specified.
20537    # Try adding .exe or .cmd
20538    if test -f "${new_path}.exe"; then
20539       input_to_shortpath="${new_path}.exe"
20540    elif test -f "${new_path}.cmd"; then
20541       input_to_shortpath="${new_path}.cmd"
20542    else
20543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20544$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20545      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20546$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20547      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20548    fi
20549  else
20550    input_to_shortpath="$new_path"
20551  fi
20552
20553  # Call helper function which possibly converts this using DOS-style short mode.
20554  # If so, the updated path is stored in $new_path.
20555  new_path="$input_to_shortpath"
20556
20557  input_path="$input_to_shortpath"
20558  # Check if we need to convert this using DOS-style short mode. If the path
20559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20560  # take no chances and rewrite it.
20561  # Note: m4 eats our [], so we need to use [ and ] instead.
20562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20563  if test "x$has_forbidden_chars" != x; then
20564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20568      # Going to short mode and back again did indeed matter. Since short mode is
20569      # case insensitive, let's make it lowercase to improve readability.
20570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20571      # Now convert it back to Unix-stile (cygpath)
20572      input_path=`$CYGPATH -u "$shortmode_path"`
20573      new_path="$input_path"
20574    fi
20575  fi
20576
20577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20578  if test "x$test_cygdrive_prefix" = x; then
20579    # As a simple fix, exclude /usr/bin since it's not a real path.
20580    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20582      # a path prefixed by /cygdrive for fixpath to work.
20583      new_path="$CYGWIN_ROOT_PATH$input_path"
20584    fi
20585  fi
20586
20587  # remove trailing .exe if any
20588  new_path="${new_path/%.exe/}"
20589
20590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20591
20592  # First separate the path from the arguments. This will split at the first
20593  # space.
20594  complete="$CXX"
20595  path="${complete%% *}"
20596  tmp="$complete EOL"
20597  arguments="${tmp#* }"
20598
20599  # Input might be given as Windows format, start by converting to
20600  # unix format.
20601  new_path="$path"
20602
20603  windows_path="$new_path"
20604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20605    unix_path=`$CYGPATH -u "$windows_path"`
20606    new_path="$unix_path"
20607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20609    new_path="$unix_path"
20610  fi
20611
20612
20613  # Now try to locate executable using which
20614  new_path=`$WHICH "$new_path" 2> /dev/null`
20615
20616  if test "x$new_path" = x; then
20617    # Oops. Which didn't find the executable.
20618    # The splitting of arguments from the executable at a space might have been incorrect,
20619    # since paths with space are more likely in Windows. Give it another try with the whole
20620    # argument.
20621    path="$complete"
20622    arguments="EOL"
20623    new_path="$path"
20624
20625  windows_path="$new_path"
20626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20627    unix_path=`$CYGPATH -u "$windows_path"`
20628    new_path="$unix_path"
20629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20631    new_path="$unix_path"
20632  fi
20633
20634
20635    new_path=`$WHICH "$new_path" 2> /dev/null`
20636
20637    if test "x$new_path" = x; then
20638      # It's still not found. Now this is an unrecoverable error.
20639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20640$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20641      has_space=`$ECHO "$complete" | $GREP " "`
20642      if test "x$has_space" != x; then
20643        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20644$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20645      fi
20646      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20647    fi
20648  fi
20649
20650  # Now new_path has a complete unix path to the binary
20651  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20652    # Keep paths in /bin as-is, but remove trailing .exe if any
20653    new_path="${new_path/%.exe/}"
20654    # Do not save /bin paths to all_fixpath_prefixes!
20655  else
20656    # Not in mixed or Windows style, start by that.
20657    new_path=`cmd //c echo $new_path`
20658
20659  input_path="$new_path"
20660  # Check if we need to convert this using DOS-style short mode. If the path
20661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20662  # take no chances and rewrite it.
20663  # Note: m4 eats our [], so we need to use [ and ] instead.
20664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20665  if test "x$has_forbidden_chars" != x; then
20666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20668  fi
20669
20670    # Output is in $new_path
20671
20672  windows_path="$new_path"
20673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20674    unix_path=`$CYGPATH -u "$windows_path"`
20675    new_path="$unix_path"
20676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20678    new_path="$unix_path"
20679  fi
20680
20681    # remove trailing .exe if any
20682    new_path="${new_path/%.exe/}"
20683
20684    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20685    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20686  fi
20687
20688  else
20689    # We're on a posix platform. Hooray! :)
20690    # First separate the path from the arguments. This will split at the first
20691    # space.
20692    complete="$CXX"
20693    path="${complete%% *}"
20694    tmp="$complete EOL"
20695    arguments="${tmp#* }"
20696
20697    # Cannot rely on the command "which" here since it doesn't always work.
20698    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20699    if test -z "$is_absolute_path"; then
20700      # Path to executable is not absolute. Find it.
20701      IFS_save="$IFS"
20702      IFS=:
20703      for p in $PATH; do
20704        if test -f "$p/$path" && test -x "$p/$path"; then
20705          new_path="$p/$path"
20706          break
20707        fi
20708      done
20709      IFS="$IFS_save"
20710    else
20711      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20712$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20713      new_path="$path"
20714    fi
20715
20716    if test "x$new_path" = x; then
20717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20718$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20719        has_space=`$ECHO "$complete" | $GREP " "`
20720        if test "x$has_space" != x; then
20721          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20722$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20723        fi
20724        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20725      fi
20726  fi
20727
20728      # Now join together the path and the arguments once again
20729      if test "x$arguments" != xEOL; then
20730        new_complete="$new_path ${arguments% *}"
20731      else
20732        new_complete="$new_path"
20733      fi
20734
20735  if test "x$complete" != "x$new_complete"; then
20736      CXX="$new_complete"
20737      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20738$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20739    fi
20740
20741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20742$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20743  TEST_COMPILER="$CXX"
20744
20745    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20746        # Follow a chain of symbolic links. Use readlink
20747        # where it exists, else fall back to horribly
20748        # complicated shell code.
20749        if test "x$READLINK_TESTED" != yes; then
20750            # On MacOSX there is a readlink tool with a different
20751            # purpose than the GNU readlink tool. Check the found readlink.
20752            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20753            if test "x$ISGNU" = x; then
20754                 # A readlink that we do not know how to use.
20755                 # Are there other non-GNU readlinks out there?
20756                 READLINK_TESTED=yes
20757                 READLINK=
20758            fi
20759        fi
20760
20761        if test "x$READLINK" != x; then
20762            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20763        else
20764            # Save the current directory for restoring afterwards
20765            STARTDIR=$PWD
20766            COUNTER=0
20767            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20768            sym_link_file=`$BASENAME $TEST_COMPILER`
20769            cd $sym_link_dir
20770            # Use -P flag to resolve symlinks in directories.
20771            cd `$THEPWDCMD -P`
20772            sym_link_dir=`$THEPWDCMD -P`
20773            # Resolve file symlinks
20774            while test $COUNTER -lt 20; do
20775                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20776                if test "x$ISLINK" == x; then
20777                    # This is not a symbolic link! We are done!
20778                    break
20779                fi
20780                # Again resolve directory symlinks since the target of the just found
20781                # link could be in a different directory
20782                cd `$DIRNAME $ISLINK`
20783                sym_link_dir=`$THEPWDCMD -P`
20784                sym_link_file=`$BASENAME $ISLINK`
20785                let COUNTER=COUNTER+1
20786            done
20787            cd $STARTDIR
20788            TEST_COMPILER=$sym_link_dir/$sym_link_file
20789        fi
20790    fi
20791
20792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20793$as_echo "$TEST_COMPILER" >&6; }
20794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20795$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20796
20797  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20798  if test "x$COMPILER_BASENAME" = "xccache"; then
20799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20800$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20801    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20802    # We want to control ccache invocation ourselves, so ignore this cc and try
20803    # searching again.
20804
20805    # Remove the path to the fake ccache cc from the PATH
20806    RETRY_COMPILER_SAVED_PATH="$PATH"
20807    COMPILER_DIRNAME=`$DIRNAME $CXX`
20808    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20809
20810    # Try again looking for our compiler
20811    if test -n "$ac_tool_prefix"; then
20812  for ac_prog in $COMPILER_CHECK_LIST
20813  do
20814    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20815set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20817$as_echo_n "checking for $ac_word... " >&6; }
20818if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20819  $as_echo_n "(cached) " >&6
20820else
20821  if test -n "$PROPER_COMPILER_CXX"; then
20822  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20823else
20824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20825for as_dir in $PATH
20826do
20827  IFS=$as_save_IFS
20828  test -z "$as_dir" && as_dir=.
20829    for ac_exec_ext in '' $ac_executable_extensions; do
20830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20831    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20833    break 2
20834  fi
20835done
20836  done
20837IFS=$as_save_IFS
20838
20839fi
20840fi
20841PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20842if test -n "$PROPER_COMPILER_CXX"; then
20843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20844$as_echo "$PROPER_COMPILER_CXX" >&6; }
20845else
20846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20847$as_echo "no" >&6; }
20848fi
20849
20850
20851    test -n "$PROPER_COMPILER_CXX" && break
20852  done
20853fi
20854if test -z "$PROPER_COMPILER_CXX"; then
20855  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20856  for ac_prog in $COMPILER_CHECK_LIST
20857do
20858  # Extract the first word of "$ac_prog", so it can be a program name with args.
20859set dummy $ac_prog; ac_word=$2
20860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20861$as_echo_n "checking for $ac_word... " >&6; }
20862if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20863  $as_echo_n "(cached) " >&6
20864else
20865  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20866  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20867else
20868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20869for as_dir in $PATH
20870do
20871  IFS=$as_save_IFS
20872  test -z "$as_dir" && as_dir=.
20873    for ac_exec_ext in '' $ac_executable_extensions; do
20874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20875    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20877    break 2
20878  fi
20879done
20880  done
20881IFS=$as_save_IFS
20882
20883fi
20884fi
20885ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20886if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20888$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20889else
20890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20891$as_echo "no" >&6; }
20892fi
20893
20894
20895  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20896done
20897
20898  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20899    PROPER_COMPILER_CXX=""
20900  else
20901    case $cross_compiling:$ac_tool_warned in
20902yes:)
20903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20905ac_tool_warned=yes ;;
20906esac
20907    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20908  fi
20909fi
20910
20911
20912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20913
20914  # First separate the path from the arguments. This will split at the first
20915  # space.
20916  complete="$PROPER_COMPILER_CXX"
20917  path="${complete%% *}"
20918  tmp="$complete EOL"
20919  arguments="${tmp#* }"
20920
20921  # Input might be given as Windows format, start by converting to
20922  # unix format.
20923  new_path=`$CYGPATH -u "$path"`
20924
20925  # Now try to locate executable using which
20926  new_path=`$WHICH "$new_path" 2> /dev/null`
20927  # bat and cmd files are not always considered executable in cygwin causing which
20928  # to not find them
20929  if test "x$new_path" = x \
20930           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20931           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20932    new_path=`$CYGPATH -u "$path"`
20933  fi
20934  if test "x$new_path" = x; then
20935    # Oops. Which didn't find the executable.
20936    # The splitting of arguments from the executable at a space might have been incorrect,
20937    # since paths with space are more likely in Windows. Give it another try with the whole
20938    # argument.
20939    path="$complete"
20940    arguments="EOL"
20941    new_path=`$CYGPATH -u "$path"`
20942    new_path=`$WHICH "$new_path" 2> /dev/null`
20943    # bat and cmd files are not always considered executable in cygwin causing which
20944    # to not find them
20945    if test "x$new_path" = x \
20946             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20947             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20948      new_path=`$CYGPATH -u "$path"`
20949    fi
20950    if test "x$new_path" = x; then
20951      # It's still not found. Now this is an unrecoverable error.
20952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20953$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20954      has_space=`$ECHO "$complete" | $GREP " "`
20955      if test "x$has_space" != x; then
20956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20958      fi
20959      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20960    fi
20961  fi
20962
20963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20966  # "foo.exe" is OK but "foo" is an error.
20967  #
20968  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20969  # It is also a way to make sure we got the proper file name for the real test later on.
20970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20971  if test "x$test_shortpath" = x; then
20972    # Short path failed, file does not exist as specified.
20973    # Try adding .exe or .cmd
20974    if test -f "${new_path}.exe"; then
20975       input_to_shortpath="${new_path}.exe"
20976    elif test -f "${new_path}.cmd"; then
20977       input_to_shortpath="${new_path}.cmd"
20978    else
20979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20980$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20981      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20982$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20983      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20984    fi
20985  else
20986    input_to_shortpath="$new_path"
20987  fi
20988
20989  # Call helper function which possibly converts this using DOS-style short mode.
20990  # If so, the updated path is stored in $new_path.
20991  new_path="$input_to_shortpath"
20992
20993  input_path="$input_to_shortpath"
20994  # Check if we need to convert this using DOS-style short mode. If the path
20995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20996  # take no chances and rewrite it.
20997  # Note: m4 eats our [], so we need to use [ and ] instead.
20998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20999  if test "x$has_forbidden_chars" != x; then
21000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21004      # Going to short mode and back again did indeed matter. Since short mode is
21005      # case insensitive, let's make it lowercase to improve readability.
21006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21007      # Now convert it back to Unix-stile (cygpath)
21008      input_path=`$CYGPATH -u "$shortmode_path"`
21009      new_path="$input_path"
21010    fi
21011  fi
21012
21013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21014  if test "x$test_cygdrive_prefix" = x; then
21015    # As a simple fix, exclude /usr/bin since it's not a real path.
21016    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21018      # a path prefixed by /cygdrive for fixpath to work.
21019      new_path="$CYGWIN_ROOT_PATH$input_path"
21020    fi
21021  fi
21022
21023  # remove trailing .exe if any
21024  new_path="${new_path/%.exe/}"
21025
21026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21027
21028  # First separate the path from the arguments. This will split at the first
21029  # space.
21030  complete="$PROPER_COMPILER_CXX"
21031  path="${complete%% *}"
21032  tmp="$complete EOL"
21033  arguments="${tmp#* }"
21034
21035  # Input might be given as Windows format, start by converting to
21036  # unix format.
21037  new_path="$path"
21038
21039  windows_path="$new_path"
21040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21041    unix_path=`$CYGPATH -u "$windows_path"`
21042    new_path="$unix_path"
21043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21045    new_path="$unix_path"
21046  fi
21047
21048
21049  # Now try to locate executable using which
21050  new_path=`$WHICH "$new_path" 2> /dev/null`
21051
21052  if test "x$new_path" = x; then
21053    # Oops. Which didn't find the executable.
21054    # The splitting of arguments from the executable at a space might have been incorrect,
21055    # since paths with space are more likely in Windows. Give it another try with the whole
21056    # argument.
21057    path="$complete"
21058    arguments="EOL"
21059    new_path="$path"
21060
21061  windows_path="$new_path"
21062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21063    unix_path=`$CYGPATH -u "$windows_path"`
21064    new_path="$unix_path"
21065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21067    new_path="$unix_path"
21068  fi
21069
21070
21071    new_path=`$WHICH "$new_path" 2> /dev/null`
21072
21073    if test "x$new_path" = x; then
21074      # It's still not found. Now this is an unrecoverable error.
21075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21076$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21077      has_space=`$ECHO "$complete" | $GREP " "`
21078      if test "x$has_space" != x; then
21079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21081      fi
21082      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21083    fi
21084  fi
21085
21086  # Now new_path has a complete unix path to the binary
21087  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21088    # Keep paths in /bin as-is, but remove trailing .exe if any
21089    new_path="${new_path/%.exe/}"
21090    # Do not save /bin paths to all_fixpath_prefixes!
21091  else
21092    # Not in mixed or Windows style, start by that.
21093    new_path=`cmd //c echo $new_path`
21094
21095  input_path="$new_path"
21096  # Check if we need to convert this using DOS-style short mode. If the path
21097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21098  # take no chances and rewrite it.
21099  # Note: m4 eats our [], so we need to use [ and ] instead.
21100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21101  if test "x$has_forbidden_chars" != x; then
21102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21104  fi
21105
21106    # Output is in $new_path
21107
21108  windows_path="$new_path"
21109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21110    unix_path=`$CYGPATH -u "$windows_path"`
21111    new_path="$unix_path"
21112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21114    new_path="$unix_path"
21115  fi
21116
21117    # remove trailing .exe if any
21118    new_path="${new_path/%.exe/}"
21119
21120    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21121    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21122  fi
21123
21124  else
21125    # We're on a posix platform. Hooray! :)
21126    # First separate the path from the arguments. This will split at the first
21127    # space.
21128    complete="$PROPER_COMPILER_CXX"
21129    path="${complete%% *}"
21130    tmp="$complete EOL"
21131    arguments="${tmp#* }"
21132
21133    # Cannot rely on the command "which" here since it doesn't always work.
21134    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21135    if test -z "$is_absolute_path"; then
21136      # Path to executable is not absolute. Find it.
21137      IFS_save="$IFS"
21138      IFS=:
21139      for p in $PATH; do
21140        if test -f "$p/$path" && test -x "$p/$path"; then
21141          new_path="$p/$path"
21142          break
21143        fi
21144      done
21145      IFS="$IFS_save"
21146    else
21147      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21148$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21149      new_path="$path"
21150    fi
21151
21152    if test "x$new_path" = x; then
21153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21154$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21155        has_space=`$ECHO "$complete" | $GREP " "`
21156        if test "x$has_space" != x; then
21157          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21158$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21159        fi
21160        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21161      fi
21162  fi
21163
21164      # Now join together the path and the arguments once again
21165      if test "x$arguments" != xEOL; then
21166        new_complete="$new_path ${arguments% *}"
21167      else
21168        new_complete="$new_path"
21169      fi
21170
21171  if test "x$complete" != "x$new_complete"; then
21172      PROPER_COMPILER_CXX="$new_complete"
21173      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21174$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21175    fi
21176
21177    PATH="$RETRY_COMPILER_SAVED_PATH"
21178
21179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21180$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21181
21182    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21183        # Follow a chain of symbolic links. Use readlink
21184        # where it exists, else fall back to horribly
21185        # complicated shell code.
21186        if test "x$READLINK_TESTED" != yes; then
21187            # On MacOSX there is a readlink tool with a different
21188            # purpose than the GNU readlink tool. Check the found readlink.
21189            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21190            if test "x$ISGNU" = x; then
21191                 # A readlink that we do not know how to use.
21192                 # Are there other non-GNU readlinks out there?
21193                 READLINK_TESTED=yes
21194                 READLINK=
21195            fi
21196        fi
21197
21198        if test "x$READLINK" != x; then
21199            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21200        else
21201            # Save the current directory for restoring afterwards
21202            STARTDIR=$PWD
21203            COUNTER=0
21204            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21205            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21206            cd $sym_link_dir
21207            # Use -P flag to resolve symlinks in directories.
21208            cd `$THEPWDCMD -P`
21209            sym_link_dir=`$THEPWDCMD -P`
21210            # Resolve file symlinks
21211            while test $COUNTER -lt 20; do
21212                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21213                if test "x$ISLINK" == x; then
21214                    # This is not a symbolic link! We are done!
21215                    break
21216                fi
21217                # Again resolve directory symlinks since the target of the just found
21218                # link could be in a different directory
21219                cd `$DIRNAME $ISLINK`
21220                sym_link_dir=`$THEPWDCMD -P`
21221                sym_link_file=`$BASENAME $ISLINK`
21222                let COUNTER=COUNTER+1
21223            done
21224            cd $STARTDIR
21225            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21226        fi
21227    fi
21228
21229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21230$as_echo "$PROPER_COMPILER_CXX" >&6; }
21231    CXX="$PROPER_COMPILER_CXX"
21232  else
21233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21234$as_echo "no, keeping CXX" >&6; }
21235    CXX="$TEST_COMPILER"
21236  fi
21237
21238  COMPILER=$CXX
21239  COMPILER_NAME=$COMPILER_NAME
21240
21241  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21242    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21243    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21244    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21245    if test $? -ne 0; then
21246      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21247
21248      { $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
21249$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21250      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21251$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21252      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21253    else
21254      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21255      COMPILER_VENDOR="Sun Studio"
21256    fi
21257  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21258    # First line typically looks something like:
21259    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21260    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21261    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21262    COMPILER_VENDOR="Microsoft CL.EXE"
21263    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21264    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21265      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21266        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21267      fi
21268    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21269      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21270        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21271      fi
21272    fi
21273  else
21274    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21275    # Check that this is likely to be GCC.
21276    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21277    if test $? -ne 0; then
21278      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21279$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21280      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21281$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21282      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21283    fi
21284
21285    # First line typically looks something like:
21286    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21287    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21288    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21289  fi
21290  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21291  CXX_VERSION="$COMPILER_VERSION"
21292  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21293  CXX_VENDOR="$COMPILER_VENDOR"
21294
21295  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21296$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21297
21298
21299# Now that we have resolved CXX ourself, let autoconf have its go at it
21300ac_ext=cpp
21301ac_cpp='$CXXCPP $CPPFLAGS'
21302ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21303ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21304ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21305if test -z "$CXX"; then
21306  if test -n "$CCC"; then
21307    CXX=$CCC
21308  else
21309    if test -n "$ac_tool_prefix"; then
21310  for ac_prog in $CXX
21311  do
21312    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21313set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21315$as_echo_n "checking for $ac_word... " >&6; }
21316if ${ac_cv_prog_CXX+:} false; then :
21317  $as_echo_n "(cached) " >&6
21318else
21319  if test -n "$CXX"; then
21320  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21321else
21322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21323for as_dir in $PATH
21324do
21325  IFS=$as_save_IFS
21326  test -z "$as_dir" && as_dir=.
21327    for ac_exec_ext in '' $ac_executable_extensions; do
21328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21329    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21331    break 2
21332  fi
21333done
21334  done
21335IFS=$as_save_IFS
21336
21337fi
21338fi
21339CXX=$ac_cv_prog_CXX
21340if test -n "$CXX"; then
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21342$as_echo "$CXX" >&6; }
21343else
21344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21345$as_echo "no" >&6; }
21346fi
21347
21348
21349    test -n "$CXX" && break
21350  done
21351fi
21352if test -z "$CXX"; then
21353  ac_ct_CXX=$CXX
21354  for ac_prog in $CXX
21355do
21356  # Extract the first word of "$ac_prog", so it can be a program name with args.
21357set dummy $ac_prog; ac_word=$2
21358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21359$as_echo_n "checking for $ac_word... " >&6; }
21360if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21361  $as_echo_n "(cached) " >&6
21362else
21363  if test -n "$ac_ct_CXX"; then
21364  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21365else
21366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21367for as_dir in $PATH
21368do
21369  IFS=$as_save_IFS
21370  test -z "$as_dir" && as_dir=.
21371    for ac_exec_ext in '' $ac_executable_extensions; do
21372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21373    ac_cv_prog_ac_ct_CXX="$ac_prog"
21374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21375    break 2
21376  fi
21377done
21378  done
21379IFS=$as_save_IFS
21380
21381fi
21382fi
21383ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21384if test -n "$ac_ct_CXX"; then
21385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21386$as_echo "$ac_ct_CXX" >&6; }
21387else
21388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21389$as_echo "no" >&6; }
21390fi
21391
21392
21393  test -n "$ac_ct_CXX" && break
21394done
21395
21396  if test "x$ac_ct_CXX" = x; then
21397    CXX="g++"
21398  else
21399    case $cross_compiling:$ac_tool_warned in
21400yes:)
21401{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21402$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21403ac_tool_warned=yes ;;
21404esac
21405    CXX=$ac_ct_CXX
21406  fi
21407fi
21408
21409  fi
21410fi
21411# Provide some information about the compiler.
21412$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21413set X $ac_compile
21414ac_compiler=$2
21415for ac_option in --version -v -V -qversion; do
21416  { { ac_try="$ac_compiler $ac_option >&5"
21417case "(($ac_try" in
21418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21419  *) ac_try_echo=$ac_try;;
21420esac
21421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21422$as_echo "$ac_try_echo"; } >&5
21423  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21424  ac_status=$?
21425  if test -s conftest.err; then
21426    sed '10a\
21427... rest of stderr output deleted ...
21428         10q' conftest.err >conftest.er1
21429    cat conftest.er1 >&5
21430  fi
21431  rm -f conftest.er1 conftest.err
21432  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21433  test $ac_status = 0; }
21434done
21435
21436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21437$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21438if ${ac_cv_cxx_compiler_gnu+:} false; then :
21439  $as_echo_n "(cached) " >&6
21440else
21441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21442/* end confdefs.h.  */
21443
21444int
21445main ()
21446{
21447#ifndef __GNUC__
21448       choke me
21449#endif
21450
21451  ;
21452  return 0;
21453}
21454_ACEOF
21455if ac_fn_cxx_try_compile "$LINENO"; then :
21456  ac_compiler_gnu=yes
21457else
21458  ac_compiler_gnu=no
21459fi
21460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21461ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21462
21463fi
21464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21465$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21466if test $ac_compiler_gnu = yes; then
21467  GXX=yes
21468else
21469  GXX=
21470fi
21471ac_test_CXXFLAGS=${CXXFLAGS+set}
21472ac_save_CXXFLAGS=$CXXFLAGS
21473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21474$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21475if ${ac_cv_prog_cxx_g+:} false; then :
21476  $as_echo_n "(cached) " >&6
21477else
21478  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21479   ac_cxx_werror_flag=yes
21480   ac_cv_prog_cxx_g=no
21481   CXXFLAGS="-g"
21482   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21483/* end confdefs.h.  */
21484
21485int
21486main ()
21487{
21488
21489  ;
21490  return 0;
21491}
21492_ACEOF
21493if ac_fn_cxx_try_compile "$LINENO"; then :
21494  ac_cv_prog_cxx_g=yes
21495else
21496  CXXFLAGS=""
21497      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21498/* end confdefs.h.  */
21499
21500int
21501main ()
21502{
21503
21504  ;
21505  return 0;
21506}
21507_ACEOF
21508if ac_fn_cxx_try_compile "$LINENO"; then :
21509
21510else
21511  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21512	 CXXFLAGS="-g"
21513	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21514/* end confdefs.h.  */
21515
21516int
21517main ()
21518{
21519
21520  ;
21521  return 0;
21522}
21523_ACEOF
21524if ac_fn_cxx_try_compile "$LINENO"; then :
21525  ac_cv_prog_cxx_g=yes
21526fi
21527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21528fi
21529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21530fi
21531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21532   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21533fi
21534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21535$as_echo "$ac_cv_prog_cxx_g" >&6; }
21536if test "$ac_test_CXXFLAGS" = set; then
21537  CXXFLAGS=$ac_save_CXXFLAGS
21538elif test $ac_cv_prog_cxx_g = yes; then
21539  if test "$GXX" = yes; then
21540    CXXFLAGS="-g -O2"
21541  else
21542    CXXFLAGS="-g"
21543  fi
21544else
21545  if test "$GXX" = yes; then
21546    CXXFLAGS="-O2"
21547  else
21548    CXXFLAGS=
21549  fi
21550fi
21551ac_ext=cpp
21552ac_cpp='$CXXCPP $CPPFLAGS'
21553ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21554ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21555ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21556
21557
21558### Locate other tools
21559
21560if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21561    ac_ext=m
21562ac_cpp='$OBJCPP $CPPFLAGS'
21563ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21564ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21565ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21566if test -n "$ac_tool_prefix"; then
21567  for ac_prog in gcc objcc objc cc CC
21568  do
21569    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21570set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21572$as_echo_n "checking for $ac_word... " >&6; }
21573if ${ac_cv_prog_OBJC+:} false; then :
21574  $as_echo_n "(cached) " >&6
21575else
21576  if test -n "$OBJC"; then
21577  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21578else
21579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21580for as_dir in $PATH
21581do
21582  IFS=$as_save_IFS
21583  test -z "$as_dir" && as_dir=.
21584    for ac_exec_ext in '' $ac_executable_extensions; do
21585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21586    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21588    break 2
21589  fi
21590done
21591  done
21592IFS=$as_save_IFS
21593
21594fi
21595fi
21596OBJC=$ac_cv_prog_OBJC
21597if test -n "$OBJC"; then
21598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21599$as_echo "$OBJC" >&6; }
21600else
21601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21602$as_echo "no" >&6; }
21603fi
21604
21605
21606    test -n "$OBJC" && break
21607  done
21608fi
21609if test -z "$OBJC"; then
21610  ac_ct_OBJC=$OBJC
21611  for ac_prog in gcc objcc objc cc CC
21612do
21613  # Extract the first word of "$ac_prog", so it can be a program name with args.
21614set dummy $ac_prog; ac_word=$2
21615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21616$as_echo_n "checking for $ac_word... " >&6; }
21617if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21618  $as_echo_n "(cached) " >&6
21619else
21620  if test -n "$ac_ct_OBJC"; then
21621  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21622else
21623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21624for as_dir in $PATH
21625do
21626  IFS=$as_save_IFS
21627  test -z "$as_dir" && as_dir=.
21628    for ac_exec_ext in '' $ac_executable_extensions; do
21629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21630    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21632    break 2
21633  fi
21634done
21635  done
21636IFS=$as_save_IFS
21637
21638fi
21639fi
21640ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21641if test -n "$ac_ct_OBJC"; then
21642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21643$as_echo "$ac_ct_OBJC" >&6; }
21644else
21645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21646$as_echo "no" >&6; }
21647fi
21648
21649
21650  test -n "$ac_ct_OBJC" && break
21651done
21652
21653  if test "x$ac_ct_OBJC" = x; then
21654    OBJC="gcc"
21655  else
21656    case $cross_compiling:$ac_tool_warned in
21657yes:)
21658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21660ac_tool_warned=yes ;;
21661esac
21662    OBJC=$ac_ct_OBJC
21663  fi
21664fi
21665
21666# Provide some information about the compiler.
21667$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21668set X $ac_compile
21669ac_compiler=$2
21670for ac_option in --version -v -V -qversion; do
21671  { { ac_try="$ac_compiler $ac_option >&5"
21672case "(($ac_try" in
21673  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21674  *) ac_try_echo=$ac_try;;
21675esac
21676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21677$as_echo "$ac_try_echo"; } >&5
21678  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21679  ac_status=$?
21680  if test -s conftest.err; then
21681    sed '10a\
21682... rest of stderr output deleted ...
21683         10q' conftest.err >conftest.er1
21684    cat conftest.er1 >&5
21685  fi
21686  rm -f conftest.er1 conftest.err
21687  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21688  test $ac_status = 0; }
21689done
21690
21691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21692$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21693if ${ac_cv_objc_compiler_gnu+:} false; then :
21694  $as_echo_n "(cached) " >&6
21695else
21696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21697/* end confdefs.h.  */
21698
21699int
21700main ()
21701{
21702#ifndef __GNUC__
21703       choke me
21704#endif
21705
21706  ;
21707  return 0;
21708}
21709_ACEOF
21710if ac_fn_objc_try_compile "$LINENO"; then :
21711  ac_compiler_gnu=yes
21712else
21713  ac_compiler_gnu=no
21714fi
21715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21716ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21717
21718fi
21719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21720$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21721if test $ac_compiler_gnu = yes; then
21722  GOBJC=yes
21723else
21724  GOBJC=
21725fi
21726ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21727ac_save_OBJCFLAGS=$OBJCFLAGS
21728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21729$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21730if ${ac_cv_prog_objc_g+:} false; then :
21731  $as_echo_n "(cached) " >&6
21732else
21733  ac_save_objc_werror_flag=$ac_objc_werror_flag
21734   ac_objc_werror_flag=yes
21735   ac_cv_prog_objc_g=no
21736   OBJCFLAGS="-g"
21737   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21738/* end confdefs.h.  */
21739
21740int
21741main ()
21742{
21743
21744  ;
21745  return 0;
21746}
21747_ACEOF
21748if ac_fn_objc_try_compile "$LINENO"; then :
21749  ac_cv_prog_objc_g=yes
21750else
21751  OBJCFLAGS=""
21752      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21753/* end confdefs.h.  */
21754
21755int
21756main ()
21757{
21758
21759  ;
21760  return 0;
21761}
21762_ACEOF
21763if ac_fn_objc_try_compile "$LINENO"; then :
21764
21765else
21766  ac_objc_werror_flag=$ac_save_objc_werror_flag
21767	 OBJCFLAGS="-g"
21768	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21769/* end confdefs.h.  */
21770
21771int
21772main ()
21773{
21774
21775  ;
21776  return 0;
21777}
21778_ACEOF
21779if ac_fn_objc_try_compile "$LINENO"; then :
21780  ac_cv_prog_objc_g=yes
21781fi
21782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21783fi
21784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21785fi
21786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21787   ac_objc_werror_flag=$ac_save_objc_werror_flag
21788fi
21789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21790$as_echo "$ac_cv_prog_objc_g" >&6; }
21791if test "$ac_test_OBJCFLAGS" = set; then
21792  OBJCFLAGS=$ac_save_OBJCFLAGS
21793elif test $ac_cv_prog_objc_g = yes; then
21794  if test "$GOBJC" = yes; then
21795    OBJCFLAGS="-g -O2"
21796  else
21797    OBJCFLAGS="-g"
21798  fi
21799else
21800  if test "$GOBJC" = yes; then
21801    OBJCFLAGS="-O2"
21802  else
21803    OBJCFLAGS=
21804  fi
21805fi
21806ac_ext=cpp
21807ac_cpp='$CXXCPP $CPPFLAGS'
21808ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21809ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21810ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21811
21812
21813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21814
21815  # First separate the path from the arguments. This will split at the first
21816  # space.
21817  complete="$OBJC"
21818  path="${complete%% *}"
21819  tmp="$complete EOL"
21820  arguments="${tmp#* }"
21821
21822  # Input might be given as Windows format, start by converting to
21823  # unix format.
21824  new_path=`$CYGPATH -u "$path"`
21825
21826  # Now try to locate executable using which
21827  new_path=`$WHICH "$new_path" 2> /dev/null`
21828  # bat and cmd files are not always considered executable in cygwin causing which
21829  # to not find them
21830  if test "x$new_path" = x \
21831           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21832           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21833    new_path=`$CYGPATH -u "$path"`
21834  fi
21835  if test "x$new_path" = x; then
21836    # Oops. Which didn't find the executable.
21837    # The splitting of arguments from the executable at a space might have been incorrect,
21838    # since paths with space are more likely in Windows. Give it another try with the whole
21839    # argument.
21840    path="$complete"
21841    arguments="EOL"
21842    new_path=`$CYGPATH -u "$path"`
21843    new_path=`$WHICH "$new_path" 2> /dev/null`
21844    # bat and cmd files are not always considered executable in cygwin causing which
21845    # to not find them
21846    if test "x$new_path" = x \
21847             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21848             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21849      new_path=`$CYGPATH -u "$path"`
21850    fi
21851    if test "x$new_path" = x; then
21852      # It's still not found. Now this is an unrecoverable error.
21853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21854$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21855      has_space=`$ECHO "$complete" | $GREP " "`
21856      if test "x$has_space" != x; then
21857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21859      fi
21860      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21861    fi
21862  fi
21863
21864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21867  # "foo.exe" is OK but "foo" is an error.
21868  #
21869  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21870  # It is also a way to make sure we got the proper file name for the real test later on.
21871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21872  if test "x$test_shortpath" = x; then
21873    # Short path failed, file does not exist as specified.
21874    # Try adding .exe or .cmd
21875    if test -f "${new_path}.exe"; then
21876       input_to_shortpath="${new_path}.exe"
21877    elif test -f "${new_path}.cmd"; then
21878       input_to_shortpath="${new_path}.cmd"
21879    else
21880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21881$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21882      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21883$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21884      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21885    fi
21886  else
21887    input_to_shortpath="$new_path"
21888  fi
21889
21890  # Call helper function which possibly converts this using DOS-style short mode.
21891  # If so, the updated path is stored in $new_path.
21892  new_path="$input_to_shortpath"
21893
21894  input_path="$input_to_shortpath"
21895  # Check if we need to convert this using DOS-style short mode. If the path
21896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21897  # take no chances and rewrite it.
21898  # Note: m4 eats our [], so we need to use [ and ] instead.
21899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21900  if test "x$has_forbidden_chars" != x; then
21901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21905      # Going to short mode and back again did indeed matter. Since short mode is
21906      # case insensitive, let's make it lowercase to improve readability.
21907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21908      # Now convert it back to Unix-stile (cygpath)
21909      input_path=`$CYGPATH -u "$shortmode_path"`
21910      new_path="$input_path"
21911    fi
21912  fi
21913
21914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21915  if test "x$test_cygdrive_prefix" = x; then
21916    # As a simple fix, exclude /usr/bin since it's not a real path.
21917    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21919      # a path prefixed by /cygdrive for fixpath to work.
21920      new_path="$CYGWIN_ROOT_PATH$input_path"
21921    fi
21922  fi
21923
21924  # remove trailing .exe if any
21925  new_path="${new_path/%.exe/}"
21926
21927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21928
21929  # First separate the path from the arguments. This will split at the first
21930  # space.
21931  complete="$OBJC"
21932  path="${complete%% *}"
21933  tmp="$complete EOL"
21934  arguments="${tmp#* }"
21935
21936  # Input might be given as Windows format, start by converting to
21937  # unix format.
21938  new_path="$path"
21939
21940  windows_path="$new_path"
21941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21942    unix_path=`$CYGPATH -u "$windows_path"`
21943    new_path="$unix_path"
21944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21946    new_path="$unix_path"
21947  fi
21948
21949
21950  # Now try to locate executable using which
21951  new_path=`$WHICH "$new_path" 2> /dev/null`
21952
21953  if test "x$new_path" = x; then
21954    # Oops. Which didn't find the executable.
21955    # The splitting of arguments from the executable at a space might have been incorrect,
21956    # since paths with space are more likely in Windows. Give it another try with the whole
21957    # argument.
21958    path="$complete"
21959    arguments="EOL"
21960    new_path="$path"
21961
21962  windows_path="$new_path"
21963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21964    unix_path=`$CYGPATH -u "$windows_path"`
21965    new_path="$unix_path"
21966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21968    new_path="$unix_path"
21969  fi
21970
21971
21972    new_path=`$WHICH "$new_path" 2> /dev/null`
21973
21974    if test "x$new_path" = x; then
21975      # It's still not found. Now this is an unrecoverable error.
21976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21977$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21978      has_space=`$ECHO "$complete" | $GREP " "`
21979      if test "x$has_space" != x; then
21980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21982      fi
21983      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21984    fi
21985  fi
21986
21987  # Now new_path has a complete unix path to the binary
21988  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21989    # Keep paths in /bin as-is, but remove trailing .exe if any
21990    new_path="${new_path/%.exe/}"
21991    # Do not save /bin paths to all_fixpath_prefixes!
21992  else
21993    # Not in mixed or Windows style, start by that.
21994    new_path=`cmd //c echo $new_path`
21995
21996  input_path="$new_path"
21997  # Check if we need to convert this using DOS-style short mode. If the path
21998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21999  # take no chances and rewrite it.
22000  # Note: m4 eats our [], so we need to use [ and ] instead.
22001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22002  if test "x$has_forbidden_chars" != x; then
22003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22005  fi
22006
22007    # Output is in $new_path
22008
22009  windows_path="$new_path"
22010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22011    unix_path=`$CYGPATH -u "$windows_path"`
22012    new_path="$unix_path"
22013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22015    new_path="$unix_path"
22016  fi
22017
22018    # remove trailing .exe if any
22019    new_path="${new_path/%.exe/}"
22020
22021    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22022    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22023  fi
22024
22025  else
22026    # We're on a posix platform. Hooray! :)
22027    # First separate the path from the arguments. This will split at the first
22028    # space.
22029    complete="$OBJC"
22030    path="${complete%% *}"
22031    tmp="$complete EOL"
22032    arguments="${tmp#* }"
22033
22034    # Cannot rely on the command "which" here since it doesn't always work.
22035    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22036    if test -z "$is_absolute_path"; then
22037      # Path to executable is not absolute. Find it.
22038      IFS_save="$IFS"
22039      IFS=:
22040      for p in $PATH; do
22041        if test -f "$p/$path" && test -x "$p/$path"; then
22042          new_path="$p/$path"
22043          break
22044        fi
22045      done
22046      IFS="$IFS_save"
22047    else
22048      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22049$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22050      new_path="$path"
22051    fi
22052
22053    if test "x$new_path" = x; then
22054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22055$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22056        has_space=`$ECHO "$complete" | $GREP " "`
22057        if test "x$has_space" != x; then
22058          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22059$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22060        fi
22061        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22062      fi
22063  fi
22064
22065      # Now join together the path and the arguments once again
22066      if test "x$arguments" != xEOL; then
22067        new_complete="$new_path ${arguments% *}"
22068      else
22069        new_complete="$new_path"
22070      fi
22071
22072  if test "x$complete" != "x$new_complete"; then
22073      OBJC="$new_complete"
22074      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22075$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22076    fi
22077
22078else
22079    OBJC=
22080fi
22081
22082# Restore the flags to the user specified values.
22083# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22084CFLAGS="$ORG_CFLAGS"
22085CXXFLAGS="$ORG_CXXFLAGS"
22086OBJCFLAGS="$ORG_OBJCFLAGS"
22087
22088LD="$CC"
22089LDEXE="$CC"
22090LDCXX="$CXX"
22091LDEXECXX="$CXX"
22092
22093# LDEXE is the linker to use, when creating executables.
22094
22095# Linking C++ libraries.
22096
22097# Linking C++ executables.
22098
22099
22100if test "x$OPENJDK_TARGET_OS" != xwindows; then
22101    if test -n "$ac_tool_prefix"; then
22102  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22103set dummy ${ac_tool_prefix}ar; ac_word=$2
22104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22105$as_echo_n "checking for $ac_word... " >&6; }
22106if ${ac_cv_prog_AR+:} false; then :
22107  $as_echo_n "(cached) " >&6
22108else
22109  if test -n "$AR"; then
22110  ac_cv_prog_AR="$AR" # Let the user override the test.
22111else
22112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22113for as_dir in $PATH
22114do
22115  IFS=$as_save_IFS
22116  test -z "$as_dir" && as_dir=.
22117    for ac_exec_ext in '' $ac_executable_extensions; do
22118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22119    ac_cv_prog_AR="${ac_tool_prefix}ar"
22120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22121    break 2
22122  fi
22123done
22124  done
22125IFS=$as_save_IFS
22126
22127fi
22128fi
22129AR=$ac_cv_prog_AR
22130if test -n "$AR"; then
22131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22132$as_echo "$AR" >&6; }
22133else
22134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22135$as_echo "no" >&6; }
22136fi
22137
22138
22139fi
22140if test -z "$ac_cv_prog_AR"; then
22141  ac_ct_AR=$AR
22142  # Extract the first word of "ar", so it can be a program name with args.
22143set dummy ar; ac_word=$2
22144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22145$as_echo_n "checking for $ac_word... " >&6; }
22146if ${ac_cv_prog_ac_ct_AR+:} false; then :
22147  $as_echo_n "(cached) " >&6
22148else
22149  if test -n "$ac_ct_AR"; then
22150  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22151else
22152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22153for as_dir in $PATH
22154do
22155  IFS=$as_save_IFS
22156  test -z "$as_dir" && as_dir=.
22157    for ac_exec_ext in '' $ac_executable_extensions; do
22158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22159    ac_cv_prog_ac_ct_AR="ar"
22160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22161    break 2
22162  fi
22163done
22164  done
22165IFS=$as_save_IFS
22166
22167fi
22168fi
22169ac_ct_AR=$ac_cv_prog_ac_ct_AR
22170if test -n "$ac_ct_AR"; then
22171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22172$as_echo "$ac_ct_AR" >&6; }
22173else
22174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22175$as_echo "no" >&6; }
22176fi
22177
22178  if test "x$ac_ct_AR" = x; then
22179    AR=""
22180  else
22181    case $cross_compiling:$ac_tool_warned in
22182yes:)
22183{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22184$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22185ac_tool_warned=yes ;;
22186esac
22187    AR=$ac_ct_AR
22188  fi
22189else
22190  AR="$ac_cv_prog_AR"
22191fi
22192
22193
22194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22195
22196  # First separate the path from the arguments. This will split at the first
22197  # space.
22198  complete="$AR"
22199  path="${complete%% *}"
22200  tmp="$complete EOL"
22201  arguments="${tmp#* }"
22202
22203  # Input might be given as Windows format, start by converting to
22204  # unix format.
22205  new_path=`$CYGPATH -u "$path"`
22206
22207  # Now try to locate executable using which
22208  new_path=`$WHICH "$new_path" 2> /dev/null`
22209  # bat and cmd files are not always considered executable in cygwin causing which
22210  # to not find them
22211  if test "x$new_path" = x \
22212           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22213           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22214    new_path=`$CYGPATH -u "$path"`
22215  fi
22216  if test "x$new_path" = x; then
22217    # Oops. Which didn't find the executable.
22218    # The splitting of arguments from the executable at a space might have been incorrect,
22219    # since paths with space are more likely in Windows. Give it another try with the whole
22220    # argument.
22221    path="$complete"
22222    arguments="EOL"
22223    new_path=`$CYGPATH -u "$path"`
22224    new_path=`$WHICH "$new_path" 2> /dev/null`
22225    # bat and cmd files are not always considered executable in cygwin causing which
22226    # to not find them
22227    if test "x$new_path" = x \
22228             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22229             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22230      new_path=`$CYGPATH -u "$path"`
22231    fi
22232    if test "x$new_path" = x; then
22233      # It's still not found. Now this is an unrecoverable error.
22234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22235$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22236      has_space=`$ECHO "$complete" | $GREP " "`
22237      if test "x$has_space" != x; then
22238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22240      fi
22241      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22242    fi
22243  fi
22244
22245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22248  # "foo.exe" is OK but "foo" is an error.
22249  #
22250  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22251  # It is also a way to make sure we got the proper file name for the real test later on.
22252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22253  if test "x$test_shortpath" = x; then
22254    # Short path failed, file does not exist as specified.
22255    # Try adding .exe or .cmd
22256    if test -f "${new_path}.exe"; then
22257       input_to_shortpath="${new_path}.exe"
22258    elif test -f "${new_path}.cmd"; then
22259       input_to_shortpath="${new_path}.cmd"
22260    else
22261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22262$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22263      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22264$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22265      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22266    fi
22267  else
22268    input_to_shortpath="$new_path"
22269  fi
22270
22271  # Call helper function which possibly converts this using DOS-style short mode.
22272  # If so, the updated path is stored in $new_path.
22273  new_path="$input_to_shortpath"
22274
22275  input_path="$input_to_shortpath"
22276  # Check if we need to convert this using DOS-style short mode. If the path
22277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22278  # take no chances and rewrite it.
22279  # Note: m4 eats our [], so we need to use [ and ] instead.
22280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22281  if test "x$has_forbidden_chars" != x; then
22282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22286      # Going to short mode and back again did indeed matter. Since short mode is
22287      # case insensitive, let's make it lowercase to improve readability.
22288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22289      # Now convert it back to Unix-stile (cygpath)
22290      input_path=`$CYGPATH -u "$shortmode_path"`
22291      new_path="$input_path"
22292    fi
22293  fi
22294
22295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22296  if test "x$test_cygdrive_prefix" = x; then
22297    # As a simple fix, exclude /usr/bin since it's not a real path.
22298    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22300      # a path prefixed by /cygdrive for fixpath to work.
22301      new_path="$CYGWIN_ROOT_PATH$input_path"
22302    fi
22303  fi
22304
22305  # remove trailing .exe if any
22306  new_path="${new_path/%.exe/}"
22307
22308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22309
22310  # First separate the path from the arguments. This will split at the first
22311  # space.
22312  complete="$AR"
22313  path="${complete%% *}"
22314  tmp="$complete EOL"
22315  arguments="${tmp#* }"
22316
22317  # Input might be given as Windows format, start by converting to
22318  # unix format.
22319  new_path="$path"
22320
22321  windows_path="$new_path"
22322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22323    unix_path=`$CYGPATH -u "$windows_path"`
22324    new_path="$unix_path"
22325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22327    new_path="$unix_path"
22328  fi
22329
22330
22331  # Now try to locate executable using which
22332  new_path=`$WHICH "$new_path" 2> /dev/null`
22333
22334  if test "x$new_path" = x; then
22335    # Oops. Which didn't find the executable.
22336    # The splitting of arguments from the executable at a space might have been incorrect,
22337    # since paths with space are more likely in Windows. Give it another try with the whole
22338    # argument.
22339    path="$complete"
22340    arguments="EOL"
22341    new_path="$path"
22342
22343  windows_path="$new_path"
22344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22345    unix_path=`$CYGPATH -u "$windows_path"`
22346    new_path="$unix_path"
22347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22349    new_path="$unix_path"
22350  fi
22351
22352
22353    new_path=`$WHICH "$new_path" 2> /dev/null`
22354
22355    if test "x$new_path" = x; then
22356      # It's still not found. Now this is an unrecoverable error.
22357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22358$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22359      has_space=`$ECHO "$complete" | $GREP " "`
22360      if test "x$has_space" != x; then
22361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22363      fi
22364      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22365    fi
22366  fi
22367
22368  # Now new_path has a complete unix path to the binary
22369  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22370    # Keep paths in /bin as-is, but remove trailing .exe if any
22371    new_path="${new_path/%.exe/}"
22372    # Do not save /bin paths to all_fixpath_prefixes!
22373  else
22374    # Not in mixed or Windows style, start by that.
22375    new_path=`cmd //c echo $new_path`
22376
22377  input_path="$new_path"
22378  # Check if we need to convert this using DOS-style short mode. If the path
22379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22380  # take no chances and rewrite it.
22381  # Note: m4 eats our [], so we need to use [ and ] instead.
22382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22383  if test "x$has_forbidden_chars" != x; then
22384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22386  fi
22387
22388    # Output is in $new_path
22389
22390  windows_path="$new_path"
22391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22392    unix_path=`$CYGPATH -u "$windows_path"`
22393    new_path="$unix_path"
22394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22396    new_path="$unix_path"
22397  fi
22398
22399    # remove trailing .exe if any
22400    new_path="${new_path/%.exe/}"
22401
22402    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22403    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22404  fi
22405
22406  else
22407    # We're on a posix platform. Hooray! :)
22408    # First separate the path from the arguments. This will split at the first
22409    # space.
22410    complete="$AR"
22411    path="${complete%% *}"
22412    tmp="$complete EOL"
22413    arguments="${tmp#* }"
22414
22415    # Cannot rely on the command "which" here since it doesn't always work.
22416    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22417    if test -z "$is_absolute_path"; then
22418      # Path to executable is not absolute. Find it.
22419      IFS_save="$IFS"
22420      IFS=:
22421      for p in $PATH; do
22422        if test -f "$p/$path" && test -x "$p/$path"; then
22423          new_path="$p/$path"
22424          break
22425        fi
22426      done
22427      IFS="$IFS_save"
22428    else
22429      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22430$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22431      new_path="$path"
22432    fi
22433
22434    if test "x$new_path" = x; then
22435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22436$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22437        has_space=`$ECHO "$complete" | $GREP " "`
22438        if test "x$has_space" != x; then
22439          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22440$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22441        fi
22442        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22443      fi
22444  fi
22445
22446      # Now join together the path and the arguments once again
22447      if test "x$arguments" != xEOL; then
22448        new_complete="$new_path ${arguments% *}"
22449      else
22450        new_complete="$new_path"
22451      fi
22452
22453  if test "x$complete" != "x$new_complete"; then
22454      AR="$new_complete"
22455      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22456$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22457    fi
22458
22459fi
22460if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22461    ARFLAGS="-r"
22462else
22463    ARFLAGS=""
22464fi
22465
22466
22467# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22468HOTSPOT_CXX="$CXX"
22469HOTSPOT_LD="$LD"
22470
22471
22472
22473COMPILER_NAME=gcc
22474COMPILER_TYPE=CC
22475if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22476
22477    # For now, assume that we are always compiling using cl.exe.
22478    CC_OUT_OPTION=-Fo
22479    EXE_OUT_OPTION=-out:
22480    LD_OUT_OPTION=-out:
22481    AR_OUT_OPTION=-out:
22482    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22483    # program for something completely different.
22484    # Extract the first word of "link", so it can be a program name with args.
22485set dummy link; ac_word=$2
22486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22487$as_echo_n "checking for $ac_word... " >&6; }
22488if ${ac_cv_prog_WINLD+:} false; then :
22489  $as_echo_n "(cached) " >&6
22490else
22491  if test -n "$WINLD"; then
22492  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22493else
22494  ac_prog_rejected=no
22495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22496for as_dir in $PATH
22497do
22498  IFS=$as_save_IFS
22499  test -z "$as_dir" && as_dir=.
22500    for ac_exec_ext in '' $ac_executable_extensions; do
22501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22502    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22503       ac_prog_rejected=yes
22504       continue
22505     fi
22506    ac_cv_prog_WINLD="link"
22507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22508    break 2
22509  fi
22510done
22511  done
22512IFS=$as_save_IFS
22513
22514if test $ac_prog_rejected = yes; then
22515  # We found a bogon in the path, so make sure we never use it.
22516  set dummy $ac_cv_prog_WINLD
22517  shift
22518  if test $# != 0; then
22519    # We chose a different compiler from the bogus one.
22520    # However, it has the same basename, so the bogon will be chosen
22521    # first if we set WINLD to just the basename; use the full file name.
22522    shift
22523    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22524  fi
22525fi
22526fi
22527fi
22528WINLD=$ac_cv_prog_WINLD
22529if test -n "$WINLD"; then
22530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22531$as_echo "$WINLD" >&6; }
22532else
22533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22534$as_echo "no" >&6; }
22535fi
22536
22537
22538    # Since we must ignore the first found link, WINLD will contain
22539    # the full path to the link.exe program.
22540
22541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22542
22543  # First separate the path from the arguments. This will split at the first
22544  # space.
22545  complete="$WINLD"
22546  path="${complete%% *}"
22547  tmp="$complete EOL"
22548  arguments="${tmp#* }"
22549
22550  # Input might be given as Windows format, start by converting to
22551  # unix format.
22552  new_path=`$CYGPATH -u "$path"`
22553
22554  # Now try to locate executable using which
22555  new_path=`$WHICH "$new_path" 2> /dev/null`
22556  # bat and cmd files are not always considered executable in cygwin causing which
22557  # to not find them
22558  if test "x$new_path" = x \
22559           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22560           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22561    new_path=`$CYGPATH -u "$path"`
22562  fi
22563  if test "x$new_path" = x; then
22564    # Oops. Which didn't find the executable.
22565    # The splitting of arguments from the executable at a space might have been incorrect,
22566    # since paths with space are more likely in Windows. Give it another try with the whole
22567    # argument.
22568    path="$complete"
22569    arguments="EOL"
22570    new_path=`$CYGPATH -u "$path"`
22571    new_path=`$WHICH "$new_path" 2> /dev/null`
22572    # bat and cmd files are not always considered executable in cygwin causing which
22573    # to not find them
22574    if test "x$new_path" = x \
22575             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22576             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22577      new_path=`$CYGPATH -u "$path"`
22578    fi
22579    if test "x$new_path" = x; then
22580      # It's still not found. Now this is an unrecoverable error.
22581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22582$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22583      has_space=`$ECHO "$complete" | $GREP " "`
22584      if test "x$has_space" != x; then
22585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22587      fi
22588      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22589    fi
22590  fi
22591
22592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22595  # "foo.exe" is OK but "foo" is an error.
22596  #
22597  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22598  # It is also a way to make sure we got the proper file name for the real test later on.
22599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22600  if test "x$test_shortpath" = x; then
22601    # Short path failed, file does not exist as specified.
22602    # Try adding .exe or .cmd
22603    if test -f "${new_path}.exe"; then
22604       input_to_shortpath="${new_path}.exe"
22605    elif test -f "${new_path}.cmd"; then
22606       input_to_shortpath="${new_path}.cmd"
22607    else
22608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22609$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22610      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22611$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22612      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22613    fi
22614  else
22615    input_to_shortpath="$new_path"
22616  fi
22617
22618  # Call helper function which possibly converts this using DOS-style short mode.
22619  # If so, the updated path is stored in $new_path.
22620  new_path="$input_to_shortpath"
22621
22622  input_path="$input_to_shortpath"
22623  # Check if we need to convert this using DOS-style short mode. If the path
22624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22625  # take no chances and rewrite it.
22626  # Note: m4 eats our [], so we need to use [ and ] instead.
22627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22628  if test "x$has_forbidden_chars" != x; then
22629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22633      # Going to short mode and back again did indeed matter. Since short mode is
22634      # case insensitive, let's make it lowercase to improve readability.
22635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22636      # Now convert it back to Unix-stile (cygpath)
22637      input_path=`$CYGPATH -u "$shortmode_path"`
22638      new_path="$input_path"
22639    fi
22640  fi
22641
22642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22643  if test "x$test_cygdrive_prefix" = x; then
22644    # As a simple fix, exclude /usr/bin since it's not a real path.
22645    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22647      # a path prefixed by /cygdrive for fixpath to work.
22648      new_path="$CYGWIN_ROOT_PATH$input_path"
22649    fi
22650  fi
22651
22652  # remove trailing .exe if any
22653  new_path="${new_path/%.exe/}"
22654
22655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22656
22657  # First separate the path from the arguments. This will split at the first
22658  # space.
22659  complete="$WINLD"
22660  path="${complete%% *}"
22661  tmp="$complete EOL"
22662  arguments="${tmp#* }"
22663
22664  # Input might be given as Windows format, start by converting to
22665  # unix format.
22666  new_path="$path"
22667
22668  windows_path="$new_path"
22669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22670    unix_path=`$CYGPATH -u "$windows_path"`
22671    new_path="$unix_path"
22672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22674    new_path="$unix_path"
22675  fi
22676
22677
22678  # Now try to locate executable using which
22679  new_path=`$WHICH "$new_path" 2> /dev/null`
22680
22681  if test "x$new_path" = x; then
22682    # Oops. Which didn't find the executable.
22683    # The splitting of arguments from the executable at a space might have been incorrect,
22684    # since paths with space are more likely in Windows. Give it another try with the whole
22685    # argument.
22686    path="$complete"
22687    arguments="EOL"
22688    new_path="$path"
22689
22690  windows_path="$new_path"
22691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22692    unix_path=`$CYGPATH -u "$windows_path"`
22693    new_path="$unix_path"
22694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22696    new_path="$unix_path"
22697  fi
22698
22699
22700    new_path=`$WHICH "$new_path" 2> /dev/null`
22701
22702    if test "x$new_path" = x; then
22703      # It's still not found. Now this is an unrecoverable error.
22704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22705$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22706      has_space=`$ECHO "$complete" | $GREP " "`
22707      if test "x$has_space" != x; then
22708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22710      fi
22711      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22712    fi
22713  fi
22714
22715  # Now new_path has a complete unix path to the binary
22716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22717    # Keep paths in /bin as-is, but remove trailing .exe if any
22718    new_path="${new_path/%.exe/}"
22719    # Do not save /bin paths to all_fixpath_prefixes!
22720  else
22721    # Not in mixed or Windows style, start by that.
22722    new_path=`cmd //c echo $new_path`
22723
22724  input_path="$new_path"
22725  # Check if we need to convert this using DOS-style short mode. If the path
22726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22727  # take no chances and rewrite it.
22728  # Note: m4 eats our [], so we need to use [ and ] instead.
22729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22730  if test "x$has_forbidden_chars" != x; then
22731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22733  fi
22734
22735    # Output is in $new_path
22736
22737  windows_path="$new_path"
22738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22739    unix_path=`$CYGPATH -u "$windows_path"`
22740    new_path="$unix_path"
22741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22743    new_path="$unix_path"
22744  fi
22745
22746    # remove trailing .exe if any
22747    new_path="${new_path/%.exe/}"
22748
22749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22751  fi
22752
22753  else
22754    # We're on a posix platform. Hooray! :)
22755    # First separate the path from the arguments. This will split at the first
22756    # space.
22757    complete="$WINLD"
22758    path="${complete%% *}"
22759    tmp="$complete EOL"
22760    arguments="${tmp#* }"
22761
22762    # Cannot rely on the command "which" here since it doesn't always work.
22763    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22764    if test -z "$is_absolute_path"; then
22765      # Path to executable is not absolute. Find it.
22766      IFS_save="$IFS"
22767      IFS=:
22768      for p in $PATH; do
22769        if test -f "$p/$path" && test -x "$p/$path"; then
22770          new_path="$p/$path"
22771          break
22772        fi
22773      done
22774      IFS="$IFS_save"
22775    else
22776      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22777$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22778      new_path="$path"
22779    fi
22780
22781    if test "x$new_path" = x; then
22782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22783$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22784        has_space=`$ECHO "$complete" | $GREP " "`
22785        if test "x$has_space" != x; then
22786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22788        fi
22789        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22790      fi
22791  fi
22792
22793      # Now join together the path and the arguments once again
22794      if test "x$arguments" != xEOL; then
22795        new_complete="$new_path ${arguments% *}"
22796      else
22797        new_complete="$new_path"
22798      fi
22799
22800  if test "x$complete" != "x$new_complete"; then
22801      WINLD="$new_complete"
22802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22803$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22804    fi
22805
22806    printf "Windows linker was found at $WINLD\n"
22807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22808$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22809    "$WINLD" --version > /dev/null
22810    if test $? -eq 0 ; then
22811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22812$as_echo "no" >&6; }
22813      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22814    else
22815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22816$as_echo "yes" >&6; }
22817    fi
22818    LD="$WINLD"
22819    LDEXE="$WINLD"
22820    LDCXX="$WINLD"
22821    LDEXECXX="$WINLD"
22822
22823    # Extract the first word of "mt", so it can be a program name with args.
22824set dummy mt; ac_word=$2
22825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22826$as_echo_n "checking for $ac_word... " >&6; }
22827if ${ac_cv_prog_MT+:} false; then :
22828  $as_echo_n "(cached) " >&6
22829else
22830  if test -n "$MT"; then
22831  ac_cv_prog_MT="$MT" # Let the user override the test.
22832else
22833  ac_prog_rejected=no
22834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22835for as_dir in $PATH
22836do
22837  IFS=$as_save_IFS
22838  test -z "$as_dir" && as_dir=.
22839    for ac_exec_ext in '' $ac_executable_extensions; do
22840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22841    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22842       ac_prog_rejected=yes
22843       continue
22844     fi
22845    ac_cv_prog_MT="mt"
22846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22847    break 2
22848  fi
22849done
22850  done
22851IFS=$as_save_IFS
22852
22853if test $ac_prog_rejected = yes; then
22854  # We found a bogon in the path, so make sure we never use it.
22855  set dummy $ac_cv_prog_MT
22856  shift
22857  if test $# != 0; then
22858    # We chose a different compiler from the bogus one.
22859    # However, it has the same basename, so the bogon will be chosen
22860    # first if we set MT to just the basename; use the full file name.
22861    shift
22862    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22863  fi
22864fi
22865fi
22866fi
22867MT=$ac_cv_prog_MT
22868if test -n "$MT"; then
22869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22870$as_echo "$MT" >&6; }
22871else
22872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22873$as_echo "no" >&6; }
22874fi
22875
22876
22877
22878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22879
22880  # First separate the path from the arguments. This will split at the first
22881  # space.
22882  complete="$MT"
22883  path="${complete%% *}"
22884  tmp="$complete EOL"
22885  arguments="${tmp#* }"
22886
22887  # Input might be given as Windows format, start by converting to
22888  # unix format.
22889  new_path=`$CYGPATH -u "$path"`
22890
22891  # Now try to locate executable using which
22892  new_path=`$WHICH "$new_path" 2> /dev/null`
22893  # bat and cmd files are not always considered executable in cygwin causing which
22894  # to not find them
22895  if test "x$new_path" = x \
22896           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22897           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22898    new_path=`$CYGPATH -u "$path"`
22899  fi
22900  if test "x$new_path" = x; then
22901    # Oops. Which didn't find the executable.
22902    # The splitting of arguments from the executable at a space might have been incorrect,
22903    # since paths with space are more likely in Windows. Give it another try with the whole
22904    # argument.
22905    path="$complete"
22906    arguments="EOL"
22907    new_path=`$CYGPATH -u "$path"`
22908    new_path=`$WHICH "$new_path" 2> /dev/null`
22909    # bat and cmd files are not always considered executable in cygwin causing which
22910    # to not find them
22911    if test "x$new_path" = x \
22912             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22913             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22914      new_path=`$CYGPATH -u "$path"`
22915    fi
22916    if test "x$new_path" = x; then
22917      # It's still not found. Now this is an unrecoverable error.
22918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22919$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22920      has_space=`$ECHO "$complete" | $GREP " "`
22921      if test "x$has_space" != x; then
22922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22924      fi
22925      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22926    fi
22927  fi
22928
22929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22932  # "foo.exe" is OK but "foo" is an error.
22933  #
22934  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22935  # It is also a way to make sure we got the proper file name for the real test later on.
22936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22937  if test "x$test_shortpath" = x; then
22938    # Short path failed, file does not exist as specified.
22939    # Try adding .exe or .cmd
22940    if test -f "${new_path}.exe"; then
22941       input_to_shortpath="${new_path}.exe"
22942    elif test -f "${new_path}.cmd"; then
22943       input_to_shortpath="${new_path}.cmd"
22944    else
22945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22946$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22947      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22948$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22949      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22950    fi
22951  else
22952    input_to_shortpath="$new_path"
22953  fi
22954
22955  # Call helper function which possibly converts this using DOS-style short mode.
22956  # If so, the updated path is stored in $new_path.
22957  new_path="$input_to_shortpath"
22958
22959  input_path="$input_to_shortpath"
22960  # Check if we need to convert this using DOS-style short mode. If the path
22961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22962  # take no chances and rewrite it.
22963  # Note: m4 eats our [], so we need to use [ and ] instead.
22964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22965  if test "x$has_forbidden_chars" != x; then
22966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22970      # Going to short mode and back again did indeed matter. Since short mode is
22971      # case insensitive, let's make it lowercase to improve readability.
22972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22973      # Now convert it back to Unix-stile (cygpath)
22974      input_path=`$CYGPATH -u "$shortmode_path"`
22975      new_path="$input_path"
22976    fi
22977  fi
22978
22979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22980  if test "x$test_cygdrive_prefix" = x; then
22981    # As a simple fix, exclude /usr/bin since it's not a real path.
22982    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22984      # a path prefixed by /cygdrive for fixpath to work.
22985      new_path="$CYGWIN_ROOT_PATH$input_path"
22986    fi
22987  fi
22988
22989  # remove trailing .exe if any
22990  new_path="${new_path/%.exe/}"
22991
22992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22993
22994  # First separate the path from the arguments. This will split at the first
22995  # space.
22996  complete="$MT"
22997  path="${complete%% *}"
22998  tmp="$complete EOL"
22999  arguments="${tmp#* }"
23000
23001  # Input might be given as Windows format, start by converting to
23002  # unix format.
23003  new_path="$path"
23004
23005  windows_path="$new_path"
23006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23007    unix_path=`$CYGPATH -u "$windows_path"`
23008    new_path="$unix_path"
23009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23011    new_path="$unix_path"
23012  fi
23013
23014
23015  # Now try to locate executable using which
23016  new_path=`$WHICH "$new_path" 2> /dev/null`
23017
23018  if test "x$new_path" = x; then
23019    # Oops. Which didn't find the executable.
23020    # The splitting of arguments from the executable at a space might have been incorrect,
23021    # since paths with space are more likely in Windows. Give it another try with the whole
23022    # argument.
23023    path="$complete"
23024    arguments="EOL"
23025    new_path="$path"
23026
23027  windows_path="$new_path"
23028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23029    unix_path=`$CYGPATH -u "$windows_path"`
23030    new_path="$unix_path"
23031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23033    new_path="$unix_path"
23034  fi
23035
23036
23037    new_path=`$WHICH "$new_path" 2> /dev/null`
23038
23039    if test "x$new_path" = x; then
23040      # It's still not found. Now this is an unrecoverable error.
23041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23042$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23043      has_space=`$ECHO "$complete" | $GREP " "`
23044      if test "x$has_space" != x; then
23045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23047      fi
23048      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23049    fi
23050  fi
23051
23052  # Now new_path has a complete unix path to the binary
23053  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23054    # Keep paths in /bin as-is, but remove trailing .exe if any
23055    new_path="${new_path/%.exe/}"
23056    # Do not save /bin paths to all_fixpath_prefixes!
23057  else
23058    # Not in mixed or Windows style, start by that.
23059    new_path=`cmd //c echo $new_path`
23060
23061  input_path="$new_path"
23062  # Check if we need to convert this using DOS-style short mode. If the path
23063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23064  # take no chances and rewrite it.
23065  # Note: m4 eats our [], so we need to use [ and ] instead.
23066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23067  if test "x$has_forbidden_chars" != x; then
23068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23070  fi
23071
23072    # Output is in $new_path
23073
23074  windows_path="$new_path"
23075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23076    unix_path=`$CYGPATH -u "$windows_path"`
23077    new_path="$unix_path"
23078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23080    new_path="$unix_path"
23081  fi
23082
23083    # remove trailing .exe if any
23084    new_path="${new_path/%.exe/}"
23085
23086    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23087    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23088  fi
23089
23090  else
23091    # We're on a posix platform. Hooray! :)
23092    # First separate the path from the arguments. This will split at the first
23093    # space.
23094    complete="$MT"
23095    path="${complete%% *}"
23096    tmp="$complete EOL"
23097    arguments="${tmp#* }"
23098
23099    # Cannot rely on the command "which" here since it doesn't always work.
23100    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23101    if test -z "$is_absolute_path"; then
23102      # Path to executable is not absolute. Find it.
23103      IFS_save="$IFS"
23104      IFS=:
23105      for p in $PATH; do
23106        if test -f "$p/$path" && test -x "$p/$path"; then
23107          new_path="$p/$path"
23108          break
23109        fi
23110      done
23111      IFS="$IFS_save"
23112    else
23113      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23114$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23115      new_path="$path"
23116    fi
23117
23118    if test "x$new_path" = x; then
23119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23120$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23121        has_space=`$ECHO "$complete" | $GREP " "`
23122        if test "x$has_space" != x; then
23123          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23124$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23125        fi
23126        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23127      fi
23128  fi
23129
23130      # Now join together the path and the arguments once again
23131      if test "x$arguments" != xEOL; then
23132        new_complete="$new_path ${arguments% *}"
23133      else
23134        new_complete="$new_path"
23135      fi
23136
23137  if test "x$complete" != "x$new_complete"; then
23138      MT="$new_complete"
23139      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23140$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23141    fi
23142
23143    # The resource compiler
23144    # Extract the first word of "rc", so it can be a program name with args.
23145set dummy rc; ac_word=$2
23146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23147$as_echo_n "checking for $ac_word... " >&6; }
23148if ${ac_cv_prog_RC+:} false; then :
23149  $as_echo_n "(cached) " >&6
23150else
23151  if test -n "$RC"; then
23152  ac_cv_prog_RC="$RC" # Let the user override the test.
23153else
23154  ac_prog_rejected=no
23155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23156for as_dir in $PATH
23157do
23158  IFS=$as_save_IFS
23159  test -z "$as_dir" && as_dir=.
23160    for ac_exec_ext in '' $ac_executable_extensions; do
23161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23162    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23163       ac_prog_rejected=yes
23164       continue
23165     fi
23166    ac_cv_prog_RC="rc"
23167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23168    break 2
23169  fi
23170done
23171  done
23172IFS=$as_save_IFS
23173
23174if test $ac_prog_rejected = yes; then
23175  # We found a bogon in the path, so make sure we never use it.
23176  set dummy $ac_cv_prog_RC
23177  shift
23178  if test $# != 0; then
23179    # We chose a different compiler from the bogus one.
23180    # However, it has the same basename, so the bogon will be chosen
23181    # first if we set RC to just the basename; use the full file name.
23182    shift
23183    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23184  fi
23185fi
23186fi
23187fi
23188RC=$ac_cv_prog_RC
23189if test -n "$RC"; then
23190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23191$as_echo "$RC" >&6; }
23192else
23193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23194$as_echo "no" >&6; }
23195fi
23196
23197
23198
23199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23200
23201  # First separate the path from the arguments. This will split at the first
23202  # space.
23203  complete="$RC"
23204  path="${complete%% *}"
23205  tmp="$complete EOL"
23206  arguments="${tmp#* }"
23207
23208  # Input might be given as Windows format, start by converting to
23209  # unix format.
23210  new_path=`$CYGPATH -u "$path"`
23211
23212  # Now try to locate executable using which
23213  new_path=`$WHICH "$new_path" 2> /dev/null`
23214  # bat and cmd files are not always considered executable in cygwin causing which
23215  # to not find them
23216  if test "x$new_path" = x \
23217           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23218           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23219    new_path=`$CYGPATH -u "$path"`
23220  fi
23221  if test "x$new_path" = x; then
23222    # Oops. Which didn't find the executable.
23223    # The splitting of arguments from the executable at a space might have been incorrect,
23224    # since paths with space are more likely in Windows. Give it another try with the whole
23225    # argument.
23226    path="$complete"
23227    arguments="EOL"
23228    new_path=`$CYGPATH -u "$path"`
23229    new_path=`$WHICH "$new_path" 2> /dev/null`
23230    # bat and cmd files are not always considered executable in cygwin causing which
23231    # to not find them
23232    if test "x$new_path" = x \
23233             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23234             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23235      new_path=`$CYGPATH -u "$path"`
23236    fi
23237    if test "x$new_path" = x; then
23238      # It's still not found. Now this is an unrecoverable error.
23239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23240$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23241      has_space=`$ECHO "$complete" | $GREP " "`
23242      if test "x$has_space" != x; then
23243        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23244$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23245      fi
23246      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23247    fi
23248  fi
23249
23250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23253  # "foo.exe" is OK but "foo" is an error.
23254  #
23255  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23256  # It is also a way to make sure we got the proper file name for the real test later on.
23257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23258  if test "x$test_shortpath" = x; then
23259    # Short path failed, file does not exist as specified.
23260    # Try adding .exe or .cmd
23261    if test -f "${new_path}.exe"; then
23262       input_to_shortpath="${new_path}.exe"
23263    elif test -f "${new_path}.cmd"; then
23264       input_to_shortpath="${new_path}.cmd"
23265    else
23266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23267$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23268      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23269$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23270      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23271    fi
23272  else
23273    input_to_shortpath="$new_path"
23274  fi
23275
23276  # Call helper function which possibly converts this using DOS-style short mode.
23277  # If so, the updated path is stored in $new_path.
23278  new_path="$input_to_shortpath"
23279
23280  input_path="$input_to_shortpath"
23281  # Check if we need to convert this using DOS-style short mode. If the path
23282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23283  # take no chances and rewrite it.
23284  # Note: m4 eats our [], so we need to use [ and ] instead.
23285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23286  if test "x$has_forbidden_chars" != x; then
23287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23291      # Going to short mode and back again did indeed matter. Since short mode is
23292      # case insensitive, let's make it lowercase to improve readability.
23293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23294      # Now convert it back to Unix-stile (cygpath)
23295      input_path=`$CYGPATH -u "$shortmode_path"`
23296      new_path="$input_path"
23297    fi
23298  fi
23299
23300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23301  if test "x$test_cygdrive_prefix" = x; then
23302    # As a simple fix, exclude /usr/bin since it's not a real path.
23303    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23305      # a path prefixed by /cygdrive for fixpath to work.
23306      new_path="$CYGWIN_ROOT_PATH$input_path"
23307    fi
23308  fi
23309
23310  # remove trailing .exe if any
23311  new_path="${new_path/%.exe/}"
23312
23313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23314
23315  # First separate the path from the arguments. This will split at the first
23316  # space.
23317  complete="$RC"
23318  path="${complete%% *}"
23319  tmp="$complete EOL"
23320  arguments="${tmp#* }"
23321
23322  # Input might be given as Windows format, start by converting to
23323  # unix format.
23324  new_path="$path"
23325
23326  windows_path="$new_path"
23327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23328    unix_path=`$CYGPATH -u "$windows_path"`
23329    new_path="$unix_path"
23330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23332    new_path="$unix_path"
23333  fi
23334
23335
23336  # Now try to locate executable using which
23337  new_path=`$WHICH "$new_path" 2> /dev/null`
23338
23339  if test "x$new_path" = x; then
23340    # Oops. Which didn't find the executable.
23341    # The splitting of arguments from the executable at a space might have been incorrect,
23342    # since paths with space are more likely in Windows. Give it another try with the whole
23343    # argument.
23344    path="$complete"
23345    arguments="EOL"
23346    new_path="$path"
23347
23348  windows_path="$new_path"
23349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23350    unix_path=`$CYGPATH -u "$windows_path"`
23351    new_path="$unix_path"
23352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23354    new_path="$unix_path"
23355  fi
23356
23357
23358    new_path=`$WHICH "$new_path" 2> /dev/null`
23359
23360    if test "x$new_path" = x; then
23361      # It's still not found. Now this is an unrecoverable error.
23362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23363$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23364      has_space=`$ECHO "$complete" | $GREP " "`
23365      if test "x$has_space" != x; then
23366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23368      fi
23369      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23370    fi
23371  fi
23372
23373  # Now new_path has a complete unix path to the binary
23374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23375    # Keep paths in /bin as-is, but remove trailing .exe if any
23376    new_path="${new_path/%.exe/}"
23377    # Do not save /bin paths to all_fixpath_prefixes!
23378  else
23379    # Not in mixed or Windows style, start by that.
23380    new_path=`cmd //c echo $new_path`
23381
23382  input_path="$new_path"
23383  # Check if we need to convert this using DOS-style short mode. If the path
23384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23385  # take no chances and rewrite it.
23386  # Note: m4 eats our [], so we need to use [ and ] instead.
23387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23388  if test "x$has_forbidden_chars" != x; then
23389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23391  fi
23392
23393    # Output is in $new_path
23394
23395  windows_path="$new_path"
23396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23397    unix_path=`$CYGPATH -u "$windows_path"`
23398    new_path="$unix_path"
23399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23401    new_path="$unix_path"
23402  fi
23403
23404    # remove trailing .exe if any
23405    new_path="${new_path/%.exe/}"
23406
23407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23409  fi
23410
23411  else
23412    # We're on a posix platform. Hooray! :)
23413    # First separate the path from the arguments. This will split at the first
23414    # space.
23415    complete="$RC"
23416    path="${complete%% *}"
23417    tmp="$complete EOL"
23418    arguments="${tmp#* }"
23419
23420    # Cannot rely on the command "which" here since it doesn't always work.
23421    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23422    if test -z "$is_absolute_path"; then
23423      # Path to executable is not absolute. Find it.
23424      IFS_save="$IFS"
23425      IFS=:
23426      for p in $PATH; do
23427        if test -f "$p/$path" && test -x "$p/$path"; then
23428          new_path="$p/$path"
23429          break
23430        fi
23431      done
23432      IFS="$IFS_save"
23433    else
23434      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23435$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23436      new_path="$path"
23437    fi
23438
23439    if test "x$new_path" = x; then
23440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23441$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23442        has_space=`$ECHO "$complete" | $GREP " "`
23443        if test "x$has_space" != x; then
23444          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23445$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23446        fi
23447        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23448      fi
23449  fi
23450
23451      # Now join together the path and the arguments once again
23452      if test "x$arguments" != xEOL; then
23453        new_complete="$new_path ${arguments% *}"
23454      else
23455        new_complete="$new_path"
23456      fi
23457
23458  if test "x$complete" != "x$new_complete"; then
23459      RC="$new_complete"
23460      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23461$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23462    fi
23463
23464
23465    # For hotspot, we need these in Windows mixed path,
23466    # so rewrite them all. Need added .exe suffix.
23467    HOTSPOT_CXX="$CXX.exe"
23468    HOTSPOT_LD="$LD.exe"
23469    HOTSPOT_MT="$MT.exe"
23470    HOTSPOT_RC="$RC.exe"
23471
23472  unix_path="$HOTSPOT_CXX"
23473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23474    windows_path=`$CYGPATH -m "$unix_path"`
23475    HOTSPOT_CXX="$windows_path"
23476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23477    windows_path=`cmd //c echo $unix_path`
23478    HOTSPOT_CXX="$windows_path"
23479  fi
23480
23481
23482  unix_path="$HOTSPOT_LD"
23483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23484    windows_path=`$CYGPATH -m "$unix_path"`
23485    HOTSPOT_LD="$windows_path"
23486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23487    windows_path=`cmd //c echo $unix_path`
23488    HOTSPOT_LD="$windows_path"
23489  fi
23490
23491
23492  unix_path="$HOTSPOT_MT"
23493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23494    windows_path=`$CYGPATH -m "$unix_path"`
23495    HOTSPOT_MT="$windows_path"
23496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23497    windows_path=`cmd //c echo $unix_path`
23498    HOTSPOT_MT="$windows_path"
23499  fi
23500
23501
23502  unix_path="$HOTSPOT_RC"
23503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23504    windows_path=`$CYGPATH -m "$unix_path"`
23505    HOTSPOT_RC="$windows_path"
23506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23507    windows_path=`cmd //c echo $unix_path`
23508    HOTSPOT_RC="$windows_path"
23509  fi
23510
23511
23512
23513
23514    RC_FLAGS="-nologo -l 0x409 -r"
23515    if test "x$VARIANT" = xOPT; then :
23516
23517        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23518
23519fi
23520
23521    # The version variables used to create RC_FLAGS may be overridden
23522    # in a custom configure script, or possibly the command line.
23523    # Let those variables be expanded at make time in spec.gmk.
23524    # The \$ are escaped to the shell, and the $(...) variables
23525    # are evaluated by make.
23526    RC_FLAGS="$RC_FLAGS \
23527        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23528        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23529        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23530        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23531        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23532        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23533        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23534
23535    # lib.exe is used to create static libraries.
23536    # Extract the first word of "lib", so it can be a program name with args.
23537set dummy lib; ac_word=$2
23538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23539$as_echo_n "checking for $ac_word... " >&6; }
23540if ${ac_cv_prog_WINAR+:} false; then :
23541  $as_echo_n "(cached) " >&6
23542else
23543  if test -n "$WINAR"; then
23544  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23545else
23546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23547for as_dir in $PATH
23548do
23549  IFS=$as_save_IFS
23550  test -z "$as_dir" && as_dir=.
23551    for ac_exec_ext in '' $ac_executable_extensions; do
23552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23553    ac_cv_prog_WINAR="lib"
23554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23555    break 2
23556  fi
23557done
23558  done
23559IFS=$as_save_IFS
23560
23561fi
23562fi
23563WINAR=$ac_cv_prog_WINAR
23564if test -n "$WINAR"; then
23565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23566$as_echo "$WINAR" >&6; }
23567else
23568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23569$as_echo "no" >&6; }
23570fi
23571
23572
23573
23574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23575
23576  # First separate the path from the arguments. This will split at the first
23577  # space.
23578  complete="$WINAR"
23579  path="${complete%% *}"
23580  tmp="$complete EOL"
23581  arguments="${tmp#* }"
23582
23583  # Input might be given as Windows format, start by converting to
23584  # unix format.
23585  new_path=`$CYGPATH -u "$path"`
23586
23587  # Now try to locate executable using which
23588  new_path=`$WHICH "$new_path" 2> /dev/null`
23589  # bat and cmd files are not always considered executable in cygwin causing which
23590  # to not find them
23591  if test "x$new_path" = x \
23592           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23593           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23594    new_path=`$CYGPATH -u "$path"`
23595  fi
23596  if test "x$new_path" = x; then
23597    # Oops. Which didn't find the executable.
23598    # The splitting of arguments from the executable at a space might have been incorrect,
23599    # since paths with space are more likely in Windows. Give it another try with the whole
23600    # argument.
23601    path="$complete"
23602    arguments="EOL"
23603    new_path=`$CYGPATH -u "$path"`
23604    new_path=`$WHICH "$new_path" 2> /dev/null`
23605    # bat and cmd files are not always considered executable in cygwin causing which
23606    # to not find them
23607    if test "x$new_path" = x \
23608             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23609             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23610      new_path=`$CYGPATH -u "$path"`
23611    fi
23612    if test "x$new_path" = x; then
23613      # It's still not found. Now this is an unrecoverable error.
23614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23615$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23616      has_space=`$ECHO "$complete" | $GREP " "`
23617      if test "x$has_space" != x; then
23618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23620      fi
23621      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23622    fi
23623  fi
23624
23625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23628  # "foo.exe" is OK but "foo" is an error.
23629  #
23630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23631  # It is also a way to make sure we got the proper file name for the real test later on.
23632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23633  if test "x$test_shortpath" = x; then
23634    # Short path failed, file does not exist as specified.
23635    # Try adding .exe or .cmd
23636    if test -f "${new_path}.exe"; then
23637       input_to_shortpath="${new_path}.exe"
23638    elif test -f "${new_path}.cmd"; then
23639       input_to_shortpath="${new_path}.cmd"
23640    else
23641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23642$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23645      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23646    fi
23647  else
23648    input_to_shortpath="$new_path"
23649  fi
23650
23651  # Call helper function which possibly converts this using DOS-style short mode.
23652  # If so, the updated path is stored in $new_path.
23653  new_path="$input_to_shortpath"
23654
23655  input_path="$input_to_shortpath"
23656  # Check if we need to convert this using DOS-style short mode. If the path
23657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23658  # take no chances and rewrite it.
23659  # Note: m4 eats our [], so we need to use [ and ] instead.
23660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23661  if test "x$has_forbidden_chars" != x; then
23662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23666      # Going to short mode and back again did indeed matter. Since short mode is
23667      # case insensitive, let's make it lowercase to improve readability.
23668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23669      # Now convert it back to Unix-stile (cygpath)
23670      input_path=`$CYGPATH -u "$shortmode_path"`
23671      new_path="$input_path"
23672    fi
23673  fi
23674
23675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23676  if test "x$test_cygdrive_prefix" = x; then
23677    # As a simple fix, exclude /usr/bin since it's not a real path.
23678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23680      # a path prefixed by /cygdrive for fixpath to work.
23681      new_path="$CYGWIN_ROOT_PATH$input_path"
23682    fi
23683  fi
23684
23685  # remove trailing .exe if any
23686  new_path="${new_path/%.exe/}"
23687
23688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23689
23690  # First separate the path from the arguments. This will split at the first
23691  # space.
23692  complete="$WINAR"
23693  path="${complete%% *}"
23694  tmp="$complete EOL"
23695  arguments="${tmp#* }"
23696
23697  # Input might be given as Windows format, start by converting to
23698  # unix format.
23699  new_path="$path"
23700
23701  windows_path="$new_path"
23702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23703    unix_path=`$CYGPATH -u "$windows_path"`
23704    new_path="$unix_path"
23705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23707    new_path="$unix_path"
23708  fi
23709
23710
23711  # Now try to locate executable using which
23712  new_path=`$WHICH "$new_path" 2> /dev/null`
23713
23714  if test "x$new_path" = x; then
23715    # Oops. Which didn't find the executable.
23716    # The splitting of arguments from the executable at a space might have been incorrect,
23717    # since paths with space are more likely in Windows. Give it another try with the whole
23718    # argument.
23719    path="$complete"
23720    arguments="EOL"
23721    new_path="$path"
23722
23723  windows_path="$new_path"
23724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23725    unix_path=`$CYGPATH -u "$windows_path"`
23726    new_path="$unix_path"
23727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23729    new_path="$unix_path"
23730  fi
23731
23732
23733    new_path=`$WHICH "$new_path" 2> /dev/null`
23734
23735    if test "x$new_path" = x; then
23736      # It's still not found. Now this is an unrecoverable error.
23737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23738$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23739      has_space=`$ECHO "$complete" | $GREP " "`
23740      if test "x$has_space" != x; then
23741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23743      fi
23744      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23745    fi
23746  fi
23747
23748  # Now new_path has a complete unix path to the binary
23749  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23750    # Keep paths in /bin as-is, but remove trailing .exe if any
23751    new_path="${new_path/%.exe/}"
23752    # Do not save /bin paths to all_fixpath_prefixes!
23753  else
23754    # Not in mixed or Windows style, start by that.
23755    new_path=`cmd //c echo $new_path`
23756
23757  input_path="$new_path"
23758  # Check if we need to convert this using DOS-style short mode. If the path
23759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23760  # take no chances and rewrite it.
23761  # Note: m4 eats our [], so we need to use [ and ] instead.
23762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23763  if test "x$has_forbidden_chars" != x; then
23764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23766  fi
23767
23768    # Output is in $new_path
23769
23770  windows_path="$new_path"
23771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23772    unix_path=`$CYGPATH -u "$windows_path"`
23773    new_path="$unix_path"
23774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23776    new_path="$unix_path"
23777  fi
23778
23779    # remove trailing .exe if any
23780    new_path="${new_path/%.exe/}"
23781
23782    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23783    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23784  fi
23785
23786  else
23787    # We're on a posix platform. Hooray! :)
23788    # First separate the path from the arguments. This will split at the first
23789    # space.
23790    complete="$WINAR"
23791    path="${complete%% *}"
23792    tmp="$complete EOL"
23793    arguments="${tmp#* }"
23794
23795    # Cannot rely on the command "which" here since it doesn't always work.
23796    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23797    if test -z "$is_absolute_path"; then
23798      # Path to executable is not absolute. Find it.
23799      IFS_save="$IFS"
23800      IFS=:
23801      for p in $PATH; do
23802        if test -f "$p/$path" && test -x "$p/$path"; then
23803          new_path="$p/$path"
23804          break
23805        fi
23806      done
23807      IFS="$IFS_save"
23808    else
23809      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23810$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23811      new_path="$path"
23812    fi
23813
23814    if test "x$new_path" = x; then
23815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23816$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23817        has_space=`$ECHO "$complete" | $GREP " "`
23818        if test "x$has_space" != x; then
23819          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23820$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23821        fi
23822        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23823      fi
23824  fi
23825
23826      # Now join together the path and the arguments once again
23827      if test "x$arguments" != xEOL; then
23828        new_complete="$new_path ${arguments% *}"
23829      else
23830        new_complete="$new_path"
23831      fi
23832
23833  if test "x$complete" != "x$new_complete"; then
23834      WINAR="$new_complete"
23835      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23836$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23837    fi
23838
23839    AR="$WINAR"
23840    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23841
23842    # Extract the first word of "dumpbin", so it can be a program name with args.
23843set dummy dumpbin; ac_word=$2
23844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23845$as_echo_n "checking for $ac_word... " >&6; }
23846if ${ac_cv_prog_DUMPBIN+:} false; then :
23847  $as_echo_n "(cached) " >&6
23848else
23849  if test -n "$DUMPBIN"; then
23850  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23851else
23852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23853for as_dir in $PATH
23854do
23855  IFS=$as_save_IFS
23856  test -z "$as_dir" && as_dir=.
23857    for ac_exec_ext in '' $ac_executable_extensions; do
23858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23859    ac_cv_prog_DUMPBIN="dumpbin"
23860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23861    break 2
23862  fi
23863done
23864  done
23865IFS=$as_save_IFS
23866
23867fi
23868fi
23869DUMPBIN=$ac_cv_prog_DUMPBIN
23870if test -n "$DUMPBIN"; then
23871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23872$as_echo "$DUMPBIN" >&6; }
23873else
23874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23875$as_echo "no" >&6; }
23876fi
23877
23878
23879
23880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23881
23882  # First separate the path from the arguments. This will split at the first
23883  # space.
23884  complete="$DUMPBIN"
23885  path="${complete%% *}"
23886  tmp="$complete EOL"
23887  arguments="${tmp#* }"
23888
23889  # Input might be given as Windows format, start by converting to
23890  # unix format.
23891  new_path=`$CYGPATH -u "$path"`
23892
23893  # Now try to locate executable using which
23894  new_path=`$WHICH "$new_path" 2> /dev/null`
23895  # bat and cmd files are not always considered executable in cygwin causing which
23896  # to not find them
23897  if test "x$new_path" = x \
23898           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23899           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23900    new_path=`$CYGPATH -u "$path"`
23901  fi
23902  if test "x$new_path" = x; then
23903    # Oops. Which didn't find the executable.
23904    # The splitting of arguments from the executable at a space might have been incorrect,
23905    # since paths with space are more likely in Windows. Give it another try with the whole
23906    # argument.
23907    path="$complete"
23908    arguments="EOL"
23909    new_path=`$CYGPATH -u "$path"`
23910    new_path=`$WHICH "$new_path" 2> /dev/null`
23911    # bat and cmd files are not always considered executable in cygwin causing which
23912    # to not find them
23913    if test "x$new_path" = x \
23914             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23915             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23916      new_path=`$CYGPATH -u "$path"`
23917    fi
23918    if test "x$new_path" = x; then
23919      # It's still not found. Now this is an unrecoverable error.
23920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23921$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23922      has_space=`$ECHO "$complete" | $GREP " "`
23923      if test "x$has_space" != x; then
23924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23926      fi
23927      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23928    fi
23929  fi
23930
23931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23934  # "foo.exe" is OK but "foo" is an error.
23935  #
23936  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23937  # It is also a way to make sure we got the proper file name for the real test later on.
23938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23939  if test "x$test_shortpath" = x; then
23940    # Short path failed, file does not exist as specified.
23941    # Try adding .exe or .cmd
23942    if test -f "${new_path}.exe"; then
23943       input_to_shortpath="${new_path}.exe"
23944    elif test -f "${new_path}.cmd"; then
23945       input_to_shortpath="${new_path}.cmd"
23946    else
23947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23948$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23951      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23952    fi
23953  else
23954    input_to_shortpath="$new_path"
23955  fi
23956
23957  # Call helper function which possibly converts this using DOS-style short mode.
23958  # If so, the updated path is stored in $new_path.
23959  new_path="$input_to_shortpath"
23960
23961  input_path="$input_to_shortpath"
23962  # Check if we need to convert this using DOS-style short mode. If the path
23963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23964  # take no chances and rewrite it.
23965  # Note: m4 eats our [], so we need to use [ and ] instead.
23966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23967  if test "x$has_forbidden_chars" != x; then
23968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23972      # Going to short mode and back again did indeed matter. Since short mode is
23973      # case insensitive, let's make it lowercase to improve readability.
23974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23975      # Now convert it back to Unix-stile (cygpath)
23976      input_path=`$CYGPATH -u "$shortmode_path"`
23977      new_path="$input_path"
23978    fi
23979  fi
23980
23981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23982  if test "x$test_cygdrive_prefix" = x; then
23983    # As a simple fix, exclude /usr/bin since it's not a real path.
23984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23986      # a path prefixed by /cygdrive for fixpath to work.
23987      new_path="$CYGWIN_ROOT_PATH$input_path"
23988    fi
23989  fi
23990
23991  # remove trailing .exe if any
23992  new_path="${new_path/%.exe/}"
23993
23994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23995
23996  # First separate the path from the arguments. This will split at the first
23997  # space.
23998  complete="$DUMPBIN"
23999  path="${complete%% *}"
24000  tmp="$complete EOL"
24001  arguments="${tmp#* }"
24002
24003  # Input might be given as Windows format, start by converting to
24004  # unix format.
24005  new_path="$path"
24006
24007  windows_path="$new_path"
24008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24009    unix_path=`$CYGPATH -u "$windows_path"`
24010    new_path="$unix_path"
24011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24013    new_path="$unix_path"
24014  fi
24015
24016
24017  # Now try to locate executable using which
24018  new_path=`$WHICH "$new_path" 2> /dev/null`
24019
24020  if test "x$new_path" = x; then
24021    # Oops. Which didn't find the executable.
24022    # The splitting of arguments from the executable at a space might have been incorrect,
24023    # since paths with space are more likely in Windows. Give it another try with the whole
24024    # argument.
24025    path="$complete"
24026    arguments="EOL"
24027    new_path="$path"
24028
24029  windows_path="$new_path"
24030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24031    unix_path=`$CYGPATH -u "$windows_path"`
24032    new_path="$unix_path"
24033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24035    new_path="$unix_path"
24036  fi
24037
24038
24039    new_path=`$WHICH "$new_path" 2> /dev/null`
24040
24041    if test "x$new_path" = x; then
24042      # It's still not found. Now this is an unrecoverable error.
24043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24044$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24045      has_space=`$ECHO "$complete" | $GREP " "`
24046      if test "x$has_space" != x; then
24047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24049      fi
24050      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24051    fi
24052  fi
24053
24054  # Now new_path has a complete unix path to the binary
24055  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24056    # Keep paths in /bin as-is, but remove trailing .exe if any
24057    new_path="${new_path/%.exe/}"
24058    # Do not save /bin paths to all_fixpath_prefixes!
24059  else
24060    # Not in mixed or Windows style, start by that.
24061    new_path=`cmd //c echo $new_path`
24062
24063  input_path="$new_path"
24064  # Check if we need to convert this using DOS-style short mode. If the path
24065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24066  # take no chances and rewrite it.
24067  # Note: m4 eats our [], so we need to use [ and ] instead.
24068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24069  if test "x$has_forbidden_chars" != x; then
24070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24072  fi
24073
24074    # Output is in $new_path
24075
24076  windows_path="$new_path"
24077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24078    unix_path=`$CYGPATH -u "$windows_path"`
24079    new_path="$unix_path"
24080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24082    new_path="$unix_path"
24083  fi
24084
24085    # remove trailing .exe if any
24086    new_path="${new_path/%.exe/}"
24087
24088    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24089    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24090  fi
24091
24092  else
24093    # We're on a posix platform. Hooray! :)
24094    # First separate the path from the arguments. This will split at the first
24095    # space.
24096    complete="$DUMPBIN"
24097    path="${complete%% *}"
24098    tmp="$complete EOL"
24099    arguments="${tmp#* }"
24100
24101    # Cannot rely on the command "which" here since it doesn't always work.
24102    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24103    if test -z "$is_absolute_path"; then
24104      # Path to executable is not absolute. Find it.
24105      IFS_save="$IFS"
24106      IFS=:
24107      for p in $PATH; do
24108        if test -f "$p/$path" && test -x "$p/$path"; then
24109          new_path="$p/$path"
24110          break
24111        fi
24112      done
24113      IFS="$IFS_save"
24114    else
24115      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24116$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24117      new_path="$path"
24118    fi
24119
24120    if test "x$new_path" = x; then
24121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24122$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24123        has_space=`$ECHO "$complete" | $GREP " "`
24124        if test "x$has_space" != x; then
24125          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24127        fi
24128        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24129      fi
24130  fi
24131
24132      # Now join together the path and the arguments once again
24133      if test "x$arguments" != xEOL; then
24134        new_complete="$new_path ${arguments% *}"
24135      else
24136        new_complete="$new_path"
24137      fi
24138
24139  if test "x$complete" != "x$new_complete"; then
24140      DUMPBIN="$new_complete"
24141      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24142$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24143    fi
24144
24145
24146    COMPILER_TYPE=CL
24147    CCXXFLAGS="$CCXXFLAGS -nologo"
24148
24149fi
24150
24151
24152
24153ac_ext=c
24154ac_cpp='$CPP $CPPFLAGS'
24155ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24156ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24157ac_compiler_gnu=$ac_cv_c_compiler_gnu
24158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24159$as_echo_n "checking how to run the C preprocessor... " >&6; }
24160# On Suns, sometimes $CPP names a directory.
24161if test -n "$CPP" && test -d "$CPP"; then
24162  CPP=
24163fi
24164if test -z "$CPP"; then
24165  if ${ac_cv_prog_CPP+:} false; then :
24166  $as_echo_n "(cached) " >&6
24167else
24168      # Double quotes because CPP needs to be expanded
24169    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24170    do
24171      ac_preproc_ok=false
24172for ac_c_preproc_warn_flag in '' yes
24173do
24174  # Use a header file that comes with gcc, so configuring glibc
24175  # with a fresh cross-compiler works.
24176  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24177  # <limits.h> exists even on freestanding compilers.
24178  # On the NeXT, cc -E runs the code through the compiler's parser,
24179  # not just through cpp. "Syntax error" is here to catch this case.
24180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24181/* end confdefs.h.  */
24182#ifdef __STDC__
24183# include <limits.h>
24184#else
24185# include <assert.h>
24186#endif
24187		     Syntax error
24188_ACEOF
24189if ac_fn_c_try_cpp "$LINENO"; then :
24190
24191else
24192  # Broken: fails on valid input.
24193continue
24194fi
24195rm -f conftest.err conftest.i conftest.$ac_ext
24196
24197  # OK, works on sane cases.  Now check whether nonexistent headers
24198  # can be detected and how.
24199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24200/* end confdefs.h.  */
24201#include <ac_nonexistent.h>
24202_ACEOF
24203if ac_fn_c_try_cpp "$LINENO"; then :
24204  # Broken: success on invalid input.
24205continue
24206else
24207  # Passes both tests.
24208ac_preproc_ok=:
24209break
24210fi
24211rm -f conftest.err conftest.i conftest.$ac_ext
24212
24213done
24214# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24215rm -f conftest.i conftest.err conftest.$ac_ext
24216if $ac_preproc_ok; then :
24217  break
24218fi
24219
24220    done
24221    ac_cv_prog_CPP=$CPP
24222
24223fi
24224  CPP=$ac_cv_prog_CPP
24225else
24226  ac_cv_prog_CPP=$CPP
24227fi
24228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24229$as_echo "$CPP" >&6; }
24230ac_preproc_ok=false
24231for ac_c_preproc_warn_flag in '' yes
24232do
24233  # Use a header file that comes with gcc, so configuring glibc
24234  # with a fresh cross-compiler works.
24235  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24236  # <limits.h> exists even on freestanding compilers.
24237  # On the NeXT, cc -E runs the code through the compiler's parser,
24238  # not just through cpp. "Syntax error" is here to catch this case.
24239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24240/* end confdefs.h.  */
24241#ifdef __STDC__
24242# include <limits.h>
24243#else
24244# include <assert.h>
24245#endif
24246		     Syntax error
24247_ACEOF
24248if ac_fn_c_try_cpp "$LINENO"; then :
24249
24250else
24251  # Broken: fails on valid input.
24252continue
24253fi
24254rm -f conftest.err conftest.i conftest.$ac_ext
24255
24256  # OK, works on sane cases.  Now check whether nonexistent headers
24257  # can be detected and how.
24258  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24259/* end confdefs.h.  */
24260#include <ac_nonexistent.h>
24261_ACEOF
24262if ac_fn_c_try_cpp "$LINENO"; then :
24263  # Broken: success on invalid input.
24264continue
24265else
24266  # Passes both tests.
24267ac_preproc_ok=:
24268break
24269fi
24270rm -f conftest.err conftest.i conftest.$ac_ext
24271
24272done
24273# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24274rm -f conftest.i conftest.err conftest.$ac_ext
24275if $ac_preproc_ok; then :
24276
24277else
24278  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24279$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24280as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24281See \`config.log' for more details" "$LINENO" 5; }
24282fi
24283
24284ac_ext=cpp
24285ac_cpp='$CXXCPP $CPPFLAGS'
24286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24289
24290
24291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24292
24293  # First separate the path from the arguments. This will split at the first
24294  # space.
24295  complete="$CPP"
24296  path="${complete%% *}"
24297  tmp="$complete EOL"
24298  arguments="${tmp#* }"
24299
24300  # Input might be given as Windows format, start by converting to
24301  # unix format.
24302  new_path=`$CYGPATH -u "$path"`
24303
24304  # Now try to locate executable using which
24305  new_path=`$WHICH "$new_path" 2> /dev/null`
24306  # bat and cmd files are not always considered executable in cygwin causing which
24307  # to not find them
24308  if test "x$new_path" = x \
24309           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24310           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24311    new_path=`$CYGPATH -u "$path"`
24312  fi
24313  if test "x$new_path" = x; then
24314    # Oops. Which didn't find the executable.
24315    # The splitting of arguments from the executable at a space might have been incorrect,
24316    # since paths with space are more likely in Windows. Give it another try with the whole
24317    # argument.
24318    path="$complete"
24319    arguments="EOL"
24320    new_path=`$CYGPATH -u "$path"`
24321    new_path=`$WHICH "$new_path" 2> /dev/null`
24322    # bat and cmd files are not always considered executable in cygwin causing which
24323    # to not find them
24324    if test "x$new_path" = x \
24325             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24326             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24327      new_path=`$CYGPATH -u "$path"`
24328    fi
24329    if test "x$new_path" = x; then
24330      # It's still not found. Now this is an unrecoverable error.
24331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24332$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24333      has_space=`$ECHO "$complete" | $GREP " "`
24334      if test "x$has_space" != x; then
24335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24337      fi
24338      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24339    fi
24340  fi
24341
24342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24345  # "foo.exe" is OK but "foo" is an error.
24346  #
24347  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24348  # It is also a way to make sure we got the proper file name for the real test later on.
24349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24350  if test "x$test_shortpath" = x; then
24351    # Short path failed, file does not exist as specified.
24352    # Try adding .exe or .cmd
24353    if test -f "${new_path}.exe"; then
24354       input_to_shortpath="${new_path}.exe"
24355    elif test -f "${new_path}.cmd"; then
24356       input_to_shortpath="${new_path}.cmd"
24357    else
24358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24359$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24362      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24363    fi
24364  else
24365    input_to_shortpath="$new_path"
24366  fi
24367
24368  # Call helper function which possibly converts this using DOS-style short mode.
24369  # If so, the updated path is stored in $new_path.
24370  new_path="$input_to_shortpath"
24371
24372  input_path="$input_to_shortpath"
24373  # Check if we need to convert this using DOS-style short mode. If the path
24374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24375  # take no chances and rewrite it.
24376  # Note: m4 eats our [], so we need to use [ and ] instead.
24377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24378  if test "x$has_forbidden_chars" != x; then
24379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24383      # Going to short mode and back again did indeed matter. Since short mode is
24384      # case insensitive, let's make it lowercase to improve readability.
24385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24386      # Now convert it back to Unix-stile (cygpath)
24387      input_path=`$CYGPATH -u "$shortmode_path"`
24388      new_path="$input_path"
24389    fi
24390  fi
24391
24392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24393  if test "x$test_cygdrive_prefix" = x; then
24394    # As a simple fix, exclude /usr/bin since it's not a real path.
24395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24397      # a path prefixed by /cygdrive for fixpath to work.
24398      new_path="$CYGWIN_ROOT_PATH$input_path"
24399    fi
24400  fi
24401
24402  # remove trailing .exe if any
24403  new_path="${new_path/%.exe/}"
24404
24405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24406
24407  # First separate the path from the arguments. This will split at the first
24408  # space.
24409  complete="$CPP"
24410  path="${complete%% *}"
24411  tmp="$complete EOL"
24412  arguments="${tmp#* }"
24413
24414  # Input might be given as Windows format, start by converting to
24415  # unix format.
24416  new_path="$path"
24417
24418  windows_path="$new_path"
24419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24420    unix_path=`$CYGPATH -u "$windows_path"`
24421    new_path="$unix_path"
24422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24424    new_path="$unix_path"
24425  fi
24426
24427
24428  # Now try to locate executable using which
24429  new_path=`$WHICH "$new_path" 2> /dev/null`
24430
24431  if test "x$new_path" = x; then
24432    # Oops. Which didn't find the executable.
24433    # The splitting of arguments from the executable at a space might have been incorrect,
24434    # since paths with space are more likely in Windows. Give it another try with the whole
24435    # argument.
24436    path="$complete"
24437    arguments="EOL"
24438    new_path="$path"
24439
24440  windows_path="$new_path"
24441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24442    unix_path=`$CYGPATH -u "$windows_path"`
24443    new_path="$unix_path"
24444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24446    new_path="$unix_path"
24447  fi
24448
24449
24450    new_path=`$WHICH "$new_path" 2> /dev/null`
24451
24452    if test "x$new_path" = x; then
24453      # It's still not found. Now this is an unrecoverable error.
24454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24455$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24456      has_space=`$ECHO "$complete" | $GREP " "`
24457      if test "x$has_space" != x; then
24458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24460      fi
24461      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24462    fi
24463  fi
24464
24465  # Now new_path has a complete unix path to the binary
24466  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24467    # Keep paths in /bin as-is, but remove trailing .exe if any
24468    new_path="${new_path/%.exe/}"
24469    # Do not save /bin paths to all_fixpath_prefixes!
24470  else
24471    # Not in mixed or Windows style, start by that.
24472    new_path=`cmd //c echo $new_path`
24473
24474  input_path="$new_path"
24475  # Check if we need to convert this using DOS-style short mode. If the path
24476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24477  # take no chances and rewrite it.
24478  # Note: m4 eats our [], so we need to use [ and ] instead.
24479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24480  if test "x$has_forbidden_chars" != x; then
24481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24483  fi
24484
24485    # Output is in $new_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    # remove trailing .exe if any
24497    new_path="${new_path/%.exe/}"
24498
24499    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24500    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24501  fi
24502
24503  else
24504    # We're on a posix platform. Hooray! :)
24505    # First separate the path from the arguments. This will split at the first
24506    # space.
24507    complete="$CPP"
24508    path="${complete%% *}"
24509    tmp="$complete EOL"
24510    arguments="${tmp#* }"
24511
24512    # Cannot rely on the command "which" here since it doesn't always work.
24513    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24514    if test -z "$is_absolute_path"; then
24515      # Path to executable is not absolute. Find it.
24516      IFS_save="$IFS"
24517      IFS=:
24518      for p in $PATH; do
24519        if test -f "$p/$path" && test -x "$p/$path"; then
24520          new_path="$p/$path"
24521          break
24522        fi
24523      done
24524      IFS="$IFS_save"
24525    else
24526      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24527$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24528      new_path="$path"
24529    fi
24530
24531    if test "x$new_path" = x; then
24532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24533$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24534        has_space=`$ECHO "$complete" | $GREP " "`
24535        if test "x$has_space" != x; then
24536          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24537$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24538        fi
24539        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24540      fi
24541  fi
24542
24543      # Now join together the path and the arguments once again
24544      if test "x$arguments" != xEOL; then
24545        new_complete="$new_path ${arguments% *}"
24546      else
24547        new_complete="$new_path"
24548      fi
24549
24550  if test "x$complete" != "x$new_complete"; then
24551      CPP="$new_complete"
24552      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24553$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24554    fi
24555
24556
24557ac_ext=cpp
24558ac_cpp='$CXXCPP $CPPFLAGS'
24559ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24560ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24561ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24563$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24564if test -z "$CXXCPP"; then
24565  if ${ac_cv_prog_CXXCPP+:} false; then :
24566  $as_echo_n "(cached) " >&6
24567else
24568      # Double quotes because CXXCPP needs to be expanded
24569    for CXXCPP in "$CXX -E" "/lib/cpp"
24570    do
24571      ac_preproc_ok=false
24572for ac_cxx_preproc_warn_flag in '' yes
24573do
24574  # Use a header file that comes with gcc, so configuring glibc
24575  # with a fresh cross-compiler works.
24576  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24577  # <limits.h> exists even on freestanding compilers.
24578  # On the NeXT, cc -E runs the code through the compiler's parser,
24579  # not just through cpp. "Syntax error" is here to catch this case.
24580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24581/* end confdefs.h.  */
24582#ifdef __STDC__
24583# include <limits.h>
24584#else
24585# include <assert.h>
24586#endif
24587		     Syntax error
24588_ACEOF
24589if ac_fn_cxx_try_cpp "$LINENO"; then :
24590
24591else
24592  # Broken: fails on valid input.
24593continue
24594fi
24595rm -f conftest.err conftest.i conftest.$ac_ext
24596
24597  # OK, works on sane cases.  Now check whether nonexistent headers
24598  # can be detected and how.
24599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24600/* end confdefs.h.  */
24601#include <ac_nonexistent.h>
24602_ACEOF
24603if ac_fn_cxx_try_cpp "$LINENO"; then :
24604  # Broken: success on invalid input.
24605continue
24606else
24607  # Passes both tests.
24608ac_preproc_ok=:
24609break
24610fi
24611rm -f conftest.err conftest.i conftest.$ac_ext
24612
24613done
24614# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24615rm -f conftest.i conftest.err conftest.$ac_ext
24616if $ac_preproc_ok; then :
24617  break
24618fi
24619
24620    done
24621    ac_cv_prog_CXXCPP=$CXXCPP
24622
24623fi
24624  CXXCPP=$ac_cv_prog_CXXCPP
24625else
24626  ac_cv_prog_CXXCPP=$CXXCPP
24627fi
24628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24629$as_echo "$CXXCPP" >&6; }
24630ac_preproc_ok=false
24631for ac_cxx_preproc_warn_flag in '' yes
24632do
24633  # Use a header file that comes with gcc, so configuring glibc
24634  # with a fresh cross-compiler works.
24635  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24636  # <limits.h> exists even on freestanding compilers.
24637  # On the NeXT, cc -E runs the code through the compiler's parser,
24638  # not just through cpp. "Syntax error" is here to catch this case.
24639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24640/* end confdefs.h.  */
24641#ifdef __STDC__
24642# include <limits.h>
24643#else
24644# include <assert.h>
24645#endif
24646		     Syntax error
24647_ACEOF
24648if ac_fn_cxx_try_cpp "$LINENO"; then :
24649
24650else
24651  # Broken: fails on valid input.
24652continue
24653fi
24654rm -f conftest.err conftest.i conftest.$ac_ext
24655
24656  # OK, works on sane cases.  Now check whether nonexistent headers
24657  # can be detected and how.
24658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24659/* end confdefs.h.  */
24660#include <ac_nonexistent.h>
24661_ACEOF
24662if ac_fn_cxx_try_cpp "$LINENO"; then :
24663  # Broken: success on invalid input.
24664continue
24665else
24666  # Passes both tests.
24667ac_preproc_ok=:
24668break
24669fi
24670rm -f conftest.err conftest.i conftest.$ac_ext
24671
24672done
24673# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24674rm -f conftest.i conftest.err conftest.$ac_ext
24675if $ac_preproc_ok; then :
24676
24677else
24678  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24680as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24681See \`config.log' for more details" "$LINENO" 5; }
24682fi
24683
24684ac_ext=cpp
24685ac_cpp='$CXXCPP $CPPFLAGS'
24686ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24687ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24688ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24689
24690
24691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24692
24693  # First separate the path from the arguments. This will split at the first
24694  # space.
24695  complete="$CXXCPP"
24696  path="${complete%% *}"
24697  tmp="$complete EOL"
24698  arguments="${tmp#* }"
24699
24700  # Input might be given as Windows format, start by converting to
24701  # unix format.
24702  new_path=`$CYGPATH -u "$path"`
24703
24704  # Now try to locate executable using which
24705  new_path=`$WHICH "$new_path" 2> /dev/null`
24706  # bat and cmd files are not always considered executable in cygwin causing which
24707  # to not find them
24708  if test "x$new_path" = x \
24709           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24710           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24711    new_path=`$CYGPATH -u "$path"`
24712  fi
24713  if test "x$new_path" = x; then
24714    # Oops. Which didn't find the executable.
24715    # The splitting of arguments from the executable at a space might have been incorrect,
24716    # since paths with space are more likely in Windows. Give it another try with the whole
24717    # argument.
24718    path="$complete"
24719    arguments="EOL"
24720    new_path=`$CYGPATH -u "$path"`
24721    new_path=`$WHICH "$new_path" 2> /dev/null`
24722    # bat and cmd files are not always considered executable in cygwin causing which
24723    # to not find them
24724    if test "x$new_path" = x \
24725             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24726             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24727      new_path=`$CYGPATH -u "$path"`
24728    fi
24729    if test "x$new_path" = x; then
24730      # It's still not found. Now this is an unrecoverable error.
24731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24732$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24733      has_space=`$ECHO "$complete" | $GREP " "`
24734      if test "x$has_space" != x; then
24735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24737      fi
24738      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24739    fi
24740  fi
24741
24742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24745  # "foo.exe" is OK but "foo" is an error.
24746  #
24747  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24748  # It is also a way to make sure we got the proper file name for the real test later on.
24749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24750  if test "x$test_shortpath" = x; then
24751    # Short path failed, file does not exist as specified.
24752    # Try adding .exe or .cmd
24753    if test -f "${new_path}.exe"; then
24754       input_to_shortpath="${new_path}.exe"
24755    elif test -f "${new_path}.cmd"; then
24756       input_to_shortpath="${new_path}.cmd"
24757    else
24758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24759$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24762      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24763    fi
24764  else
24765    input_to_shortpath="$new_path"
24766  fi
24767
24768  # Call helper function which possibly converts this using DOS-style short mode.
24769  # If so, the updated path is stored in $new_path.
24770  new_path="$input_to_shortpath"
24771
24772  input_path="$input_to_shortpath"
24773  # Check if we need to convert this using DOS-style short mode. If the path
24774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24775  # take no chances and rewrite it.
24776  # Note: m4 eats our [], so we need to use [ and ] instead.
24777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24778  if test "x$has_forbidden_chars" != x; then
24779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24783      # Going to short mode and back again did indeed matter. Since short mode is
24784      # case insensitive, let's make it lowercase to improve readability.
24785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24786      # Now convert it back to Unix-stile (cygpath)
24787      input_path=`$CYGPATH -u "$shortmode_path"`
24788      new_path="$input_path"
24789    fi
24790  fi
24791
24792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24793  if test "x$test_cygdrive_prefix" = x; then
24794    # As a simple fix, exclude /usr/bin since it's not a real path.
24795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24797      # a path prefixed by /cygdrive for fixpath to work.
24798      new_path="$CYGWIN_ROOT_PATH$input_path"
24799    fi
24800  fi
24801
24802  # remove trailing .exe if any
24803  new_path="${new_path/%.exe/}"
24804
24805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24806
24807  # First separate the path from the arguments. This will split at the first
24808  # space.
24809  complete="$CXXCPP"
24810  path="${complete%% *}"
24811  tmp="$complete EOL"
24812  arguments="${tmp#* }"
24813
24814  # Input might be given as Windows format, start by converting to
24815  # unix format.
24816  new_path="$path"
24817
24818  windows_path="$new_path"
24819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24820    unix_path=`$CYGPATH -u "$windows_path"`
24821    new_path="$unix_path"
24822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24824    new_path="$unix_path"
24825  fi
24826
24827
24828  # Now try to locate executable using which
24829  new_path=`$WHICH "$new_path" 2> /dev/null`
24830
24831  if test "x$new_path" = x; then
24832    # Oops. Which didn't find the executable.
24833    # The splitting of arguments from the executable at a space might have been incorrect,
24834    # since paths with space are more likely in Windows. Give it another try with the whole
24835    # argument.
24836    path="$complete"
24837    arguments="EOL"
24838    new_path="$path"
24839
24840  windows_path="$new_path"
24841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24842    unix_path=`$CYGPATH -u "$windows_path"`
24843    new_path="$unix_path"
24844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24846    new_path="$unix_path"
24847  fi
24848
24849
24850    new_path=`$WHICH "$new_path" 2> /dev/null`
24851
24852    if test "x$new_path" = x; then
24853      # It's still not found. Now this is an unrecoverable error.
24854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24855$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24856      has_space=`$ECHO "$complete" | $GREP " "`
24857      if test "x$has_space" != x; then
24858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24860      fi
24861      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24862    fi
24863  fi
24864
24865  # Now new_path has a complete unix path to the binary
24866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24867    # Keep paths in /bin as-is, but remove trailing .exe if any
24868    new_path="${new_path/%.exe/}"
24869    # Do not save /bin paths to all_fixpath_prefixes!
24870  else
24871    # Not in mixed or Windows style, start by that.
24872    new_path=`cmd //c echo $new_path`
24873
24874  input_path="$new_path"
24875  # Check if we need to convert this using DOS-style short mode. If the path
24876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24877  # take no chances and rewrite it.
24878  # Note: m4 eats our [], so we need to use [ and ] instead.
24879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24880  if test "x$has_forbidden_chars" != x; then
24881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24883  fi
24884
24885    # Output is in $new_path
24886
24887  windows_path="$new_path"
24888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24889    unix_path=`$CYGPATH -u "$windows_path"`
24890    new_path="$unix_path"
24891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24893    new_path="$unix_path"
24894  fi
24895
24896    # remove trailing .exe if any
24897    new_path="${new_path/%.exe/}"
24898
24899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24901  fi
24902
24903  else
24904    # We're on a posix platform. Hooray! :)
24905    # First separate the path from the arguments. This will split at the first
24906    # space.
24907    complete="$CXXCPP"
24908    path="${complete%% *}"
24909    tmp="$complete EOL"
24910    arguments="${tmp#* }"
24911
24912    # Cannot rely on the command "which" here since it doesn't always work.
24913    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24914    if test -z "$is_absolute_path"; then
24915      # Path to executable is not absolute. Find it.
24916      IFS_save="$IFS"
24917      IFS=:
24918      for p in $PATH; do
24919        if test -f "$p/$path" && test -x "$p/$path"; then
24920          new_path="$p/$path"
24921          break
24922        fi
24923      done
24924      IFS="$IFS_save"
24925    else
24926      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24927$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24928      new_path="$path"
24929    fi
24930
24931    if test "x$new_path" = x; then
24932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24933$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24934        has_space=`$ECHO "$complete" | $GREP " "`
24935        if test "x$has_space" != x; then
24936          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24937$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24938        fi
24939        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24940      fi
24941  fi
24942
24943      # Now join together the path and the arguments once again
24944      if test "x$arguments" != xEOL; then
24945        new_complete="$new_path ${arguments% *}"
24946      else
24947        new_complete="$new_path"
24948      fi
24949
24950  if test "x$complete" != "x$new_complete"; then
24951      CXXCPP="$new_complete"
24952      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24953$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24954    fi
24955
24956
24957if test "x$COMPILE_TYPE" != "xcross"; then
24958    # If we are not cross compiling, use the same compilers for
24959    # building the build platform executables. The cross-compilation
24960    # case needed to be done earlier, but this can only be done after
24961    # the native tools have been localized.
24962    BUILD_CC="$CC"
24963    BUILD_CXX="$CXX"
24964    BUILD_LD="$LD"
24965fi
24966
24967# for solaris we really need solaris tools, and not gnu equivalent
24968#   these seems to normally reside in /usr/ccs/bin so add that to path before
24969#   starting to probe
24970#
24971#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24972#         so that it can be overriden --with-tools-dir
24973if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24974    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24975fi
24976
24977# Find the right assembler.
24978if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24979    # Extract the first word of "as", so it can be a program name with args.
24980set dummy as; ac_word=$2
24981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24982$as_echo_n "checking for $ac_word... " >&6; }
24983if ${ac_cv_path_AS+:} false; then :
24984  $as_echo_n "(cached) " >&6
24985else
24986  case $AS in
24987  [\\/]* | ?:[\\/]*)
24988  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24989  ;;
24990  *)
24991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24992for as_dir in $PATH
24993do
24994  IFS=$as_save_IFS
24995  test -z "$as_dir" && as_dir=.
24996    for ac_exec_ext in '' $ac_executable_extensions; do
24997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24998    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25000    break 2
25001  fi
25002done
25003  done
25004IFS=$as_save_IFS
25005
25006  ;;
25007esac
25008fi
25009AS=$ac_cv_path_AS
25010if test -n "$AS"; then
25011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25012$as_echo "$AS" >&6; }
25013else
25014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25015$as_echo "no" >&6; }
25016fi
25017
25018
25019
25020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25021
25022  # First separate the path from the arguments. This will split at the first
25023  # space.
25024  complete="$AS"
25025  path="${complete%% *}"
25026  tmp="$complete EOL"
25027  arguments="${tmp#* }"
25028
25029  # Input might be given as Windows format, start by converting to
25030  # unix format.
25031  new_path=`$CYGPATH -u "$path"`
25032
25033  # Now try to locate executable using which
25034  new_path=`$WHICH "$new_path" 2> /dev/null`
25035  # bat and cmd files are not always considered executable in cygwin causing which
25036  # to not find them
25037  if test "x$new_path" = x \
25038           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25039           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25040    new_path=`$CYGPATH -u "$path"`
25041  fi
25042  if test "x$new_path" = x; then
25043    # Oops. Which didn't find the executable.
25044    # The splitting of arguments from the executable at a space might have been incorrect,
25045    # since paths with space are more likely in Windows. Give it another try with the whole
25046    # argument.
25047    path="$complete"
25048    arguments="EOL"
25049    new_path=`$CYGPATH -u "$path"`
25050    new_path=`$WHICH "$new_path" 2> /dev/null`
25051    # bat and cmd files are not always considered executable in cygwin causing which
25052    # to not find them
25053    if test "x$new_path" = x \
25054             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25055             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25056      new_path=`$CYGPATH -u "$path"`
25057    fi
25058    if test "x$new_path" = x; then
25059      # It's still not found. Now this is an unrecoverable error.
25060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25061$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25062      has_space=`$ECHO "$complete" | $GREP " "`
25063      if test "x$has_space" != x; then
25064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25066      fi
25067      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25068    fi
25069  fi
25070
25071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25074  # "foo.exe" is OK but "foo" is an error.
25075  #
25076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25077  # It is also a way to make sure we got the proper file name for the real test later on.
25078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25079  if test "x$test_shortpath" = x; then
25080    # Short path failed, file does not exist as specified.
25081    # Try adding .exe or .cmd
25082    if test -f "${new_path}.exe"; then
25083       input_to_shortpath="${new_path}.exe"
25084    elif test -f "${new_path}.cmd"; then
25085       input_to_shortpath="${new_path}.cmd"
25086    else
25087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25088$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25091      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25092    fi
25093  else
25094    input_to_shortpath="$new_path"
25095  fi
25096
25097  # Call helper function which possibly converts this using DOS-style short mode.
25098  # If so, the updated path is stored in $new_path.
25099  new_path="$input_to_shortpath"
25100
25101  input_path="$input_to_shortpath"
25102  # Check if we need to convert this using DOS-style short mode. If the path
25103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25104  # take no chances and rewrite it.
25105  # Note: m4 eats our [], so we need to use [ and ] instead.
25106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25107  if test "x$has_forbidden_chars" != x; then
25108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25112      # Going to short mode and back again did indeed matter. Since short mode is
25113      # case insensitive, let's make it lowercase to improve readability.
25114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25115      # Now convert it back to Unix-stile (cygpath)
25116      input_path=`$CYGPATH -u "$shortmode_path"`
25117      new_path="$input_path"
25118    fi
25119  fi
25120
25121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25122  if test "x$test_cygdrive_prefix" = x; then
25123    # As a simple fix, exclude /usr/bin since it's not a real path.
25124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25126      # a path prefixed by /cygdrive for fixpath to work.
25127      new_path="$CYGWIN_ROOT_PATH$input_path"
25128    fi
25129  fi
25130
25131  # remove trailing .exe if any
25132  new_path="${new_path/%.exe/}"
25133
25134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25135
25136  # First separate the path from the arguments. This will split at the first
25137  # space.
25138  complete="$AS"
25139  path="${complete%% *}"
25140  tmp="$complete EOL"
25141  arguments="${tmp#* }"
25142
25143  # Input might be given as Windows format, start by converting to
25144  # unix format.
25145  new_path="$path"
25146
25147  windows_path="$new_path"
25148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25149    unix_path=`$CYGPATH -u "$windows_path"`
25150    new_path="$unix_path"
25151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25153    new_path="$unix_path"
25154  fi
25155
25156
25157  # Now try to locate executable using which
25158  new_path=`$WHICH "$new_path" 2> /dev/null`
25159
25160  if test "x$new_path" = x; then
25161    # Oops. Which didn't find the executable.
25162    # The splitting of arguments from the executable at a space might have been incorrect,
25163    # since paths with space are more likely in Windows. Give it another try with the whole
25164    # argument.
25165    path="$complete"
25166    arguments="EOL"
25167    new_path="$path"
25168
25169  windows_path="$new_path"
25170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25171    unix_path=`$CYGPATH -u "$windows_path"`
25172    new_path="$unix_path"
25173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25175    new_path="$unix_path"
25176  fi
25177
25178
25179    new_path=`$WHICH "$new_path" 2> /dev/null`
25180
25181    if test "x$new_path" = x; then
25182      # It's still not found. Now this is an unrecoverable error.
25183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25184$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25185      has_space=`$ECHO "$complete" | $GREP " "`
25186      if test "x$has_space" != x; then
25187        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25188$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25189      fi
25190      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25191    fi
25192  fi
25193
25194  # Now new_path has a complete unix path to the binary
25195  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25196    # Keep paths in /bin as-is, but remove trailing .exe if any
25197    new_path="${new_path/%.exe/}"
25198    # Do not save /bin paths to all_fixpath_prefixes!
25199  else
25200    # Not in mixed or Windows style, start by that.
25201    new_path=`cmd //c echo $new_path`
25202
25203  input_path="$new_path"
25204  # Check if we need to convert this using DOS-style short mode. If the path
25205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25206  # take no chances and rewrite it.
25207  # Note: m4 eats our [], so we need to use [ and ] instead.
25208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25209  if test "x$has_forbidden_chars" != x; then
25210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25212  fi
25213
25214    # Output is in $new_path
25215
25216  windows_path="$new_path"
25217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25218    unix_path=`$CYGPATH -u "$windows_path"`
25219    new_path="$unix_path"
25220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25222    new_path="$unix_path"
25223  fi
25224
25225    # remove trailing .exe if any
25226    new_path="${new_path/%.exe/}"
25227
25228    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25229    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25230  fi
25231
25232  else
25233    # We're on a posix platform. Hooray! :)
25234    # First separate the path from the arguments. This will split at the first
25235    # space.
25236    complete="$AS"
25237    path="${complete%% *}"
25238    tmp="$complete EOL"
25239    arguments="${tmp#* }"
25240
25241    # Cannot rely on the command "which" here since it doesn't always work.
25242    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25243    if test -z "$is_absolute_path"; then
25244      # Path to executable is not absolute. Find it.
25245      IFS_save="$IFS"
25246      IFS=:
25247      for p in $PATH; do
25248        if test -f "$p/$path" && test -x "$p/$path"; then
25249          new_path="$p/$path"
25250          break
25251        fi
25252      done
25253      IFS="$IFS_save"
25254    else
25255      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25256$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25257      new_path="$path"
25258    fi
25259
25260    if test "x$new_path" = x; then
25261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25262$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25263        has_space=`$ECHO "$complete" | $GREP " "`
25264        if test "x$has_space" != x; then
25265          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25266$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25267        fi
25268        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25269      fi
25270  fi
25271
25272      # Now join together the path and the arguments once again
25273      if test "x$arguments" != xEOL; then
25274        new_complete="$new_path ${arguments% *}"
25275      else
25276        new_complete="$new_path"
25277      fi
25278
25279  if test "x$complete" != "x$new_complete"; then
25280      AS="$new_complete"
25281      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25282$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25283    fi
25284
25285else
25286    AS="$CC -c"
25287fi
25288
25289
25290if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25291    # Extract the first word of "nm", so it can be a program name with args.
25292set dummy nm; ac_word=$2
25293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25294$as_echo_n "checking for $ac_word... " >&6; }
25295if ${ac_cv_path_NM+:} false; then :
25296  $as_echo_n "(cached) " >&6
25297else
25298  case $NM in
25299  [\\/]* | ?:[\\/]*)
25300  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25301  ;;
25302  *)
25303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25304for as_dir in $PATH
25305do
25306  IFS=$as_save_IFS
25307  test -z "$as_dir" && as_dir=.
25308    for ac_exec_ext in '' $ac_executable_extensions; do
25309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25310    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25312    break 2
25313  fi
25314done
25315  done
25316IFS=$as_save_IFS
25317
25318  ;;
25319esac
25320fi
25321NM=$ac_cv_path_NM
25322if test -n "$NM"; then
25323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25324$as_echo "$NM" >&6; }
25325else
25326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25327$as_echo "no" >&6; }
25328fi
25329
25330
25331
25332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25333
25334  # First separate the path from the arguments. This will split at the first
25335  # space.
25336  complete="$NM"
25337  path="${complete%% *}"
25338  tmp="$complete EOL"
25339  arguments="${tmp#* }"
25340
25341  # Input might be given as Windows format, start by converting to
25342  # unix format.
25343  new_path=`$CYGPATH -u "$path"`
25344
25345  # Now try to locate executable using which
25346  new_path=`$WHICH "$new_path" 2> /dev/null`
25347  # bat and cmd files are not always considered executable in cygwin causing which
25348  # to not find them
25349  if test "x$new_path" = x \
25350           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25351           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25352    new_path=`$CYGPATH -u "$path"`
25353  fi
25354  if test "x$new_path" = x; then
25355    # Oops. Which didn't find the executable.
25356    # The splitting of arguments from the executable at a space might have been incorrect,
25357    # since paths with space are more likely in Windows. Give it another try with the whole
25358    # argument.
25359    path="$complete"
25360    arguments="EOL"
25361    new_path=`$CYGPATH -u "$path"`
25362    new_path=`$WHICH "$new_path" 2> /dev/null`
25363    # bat and cmd files are not always considered executable in cygwin causing which
25364    # to not find them
25365    if test "x$new_path" = x \
25366             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25367             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25368      new_path=`$CYGPATH -u "$path"`
25369    fi
25370    if test "x$new_path" = x; then
25371      # It's still not found. Now this is an unrecoverable error.
25372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25373$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25374      has_space=`$ECHO "$complete" | $GREP " "`
25375      if test "x$has_space" != x; then
25376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25378      fi
25379      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25380    fi
25381  fi
25382
25383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25386  # "foo.exe" is OK but "foo" is an error.
25387  #
25388  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25389  # It is also a way to make sure we got the proper file name for the real test later on.
25390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25391  if test "x$test_shortpath" = x; then
25392    # Short path failed, file does not exist as specified.
25393    # Try adding .exe or .cmd
25394    if test -f "${new_path}.exe"; then
25395       input_to_shortpath="${new_path}.exe"
25396    elif test -f "${new_path}.cmd"; then
25397       input_to_shortpath="${new_path}.cmd"
25398    else
25399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25400$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25403      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25404    fi
25405  else
25406    input_to_shortpath="$new_path"
25407  fi
25408
25409  # Call helper function which possibly converts this using DOS-style short mode.
25410  # If so, the updated path is stored in $new_path.
25411  new_path="$input_to_shortpath"
25412
25413  input_path="$input_to_shortpath"
25414  # Check if we need to convert this using DOS-style short mode. If the path
25415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25416  # take no chances and rewrite it.
25417  # Note: m4 eats our [], so we need to use [ and ] instead.
25418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25419  if test "x$has_forbidden_chars" != x; then
25420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25424      # Going to short mode and back again did indeed matter. Since short mode is
25425      # case insensitive, let's make it lowercase to improve readability.
25426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25427      # Now convert it back to Unix-stile (cygpath)
25428      input_path=`$CYGPATH -u "$shortmode_path"`
25429      new_path="$input_path"
25430    fi
25431  fi
25432
25433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25434  if test "x$test_cygdrive_prefix" = x; then
25435    # As a simple fix, exclude /usr/bin since it's not a real path.
25436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25438      # a path prefixed by /cygdrive for fixpath to work.
25439      new_path="$CYGWIN_ROOT_PATH$input_path"
25440    fi
25441  fi
25442
25443  # remove trailing .exe if any
25444  new_path="${new_path/%.exe/}"
25445
25446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25447
25448  # First separate the path from the arguments. This will split at the first
25449  # space.
25450  complete="$NM"
25451  path="${complete%% *}"
25452  tmp="$complete EOL"
25453  arguments="${tmp#* }"
25454
25455  # Input might be given as Windows format, start by converting to
25456  # unix format.
25457  new_path="$path"
25458
25459  windows_path="$new_path"
25460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25461    unix_path=`$CYGPATH -u "$windows_path"`
25462    new_path="$unix_path"
25463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25465    new_path="$unix_path"
25466  fi
25467
25468
25469  # Now try to locate executable using which
25470  new_path=`$WHICH "$new_path" 2> /dev/null`
25471
25472  if test "x$new_path" = x; then
25473    # Oops. Which didn't find the executable.
25474    # The splitting of arguments from the executable at a space might have been incorrect,
25475    # since paths with space are more likely in Windows. Give it another try with the whole
25476    # argument.
25477    path="$complete"
25478    arguments="EOL"
25479    new_path="$path"
25480
25481  windows_path="$new_path"
25482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25483    unix_path=`$CYGPATH -u "$windows_path"`
25484    new_path="$unix_path"
25485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25487    new_path="$unix_path"
25488  fi
25489
25490
25491    new_path=`$WHICH "$new_path" 2> /dev/null`
25492
25493    if test "x$new_path" = x; then
25494      # It's still not found. Now this is an unrecoverable error.
25495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25496$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25497      has_space=`$ECHO "$complete" | $GREP " "`
25498      if test "x$has_space" != x; then
25499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25501      fi
25502      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25503    fi
25504  fi
25505
25506  # Now new_path has a complete unix path to the binary
25507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25508    # Keep paths in /bin as-is, but remove trailing .exe if any
25509    new_path="${new_path/%.exe/}"
25510    # Do not save /bin paths to all_fixpath_prefixes!
25511  else
25512    # Not in mixed or Windows style, start by that.
25513    new_path=`cmd //c echo $new_path`
25514
25515  input_path="$new_path"
25516  # Check if we need to convert this using DOS-style short mode. If the path
25517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25518  # take no chances and rewrite it.
25519  # Note: m4 eats our [], so we need to use [ and ] instead.
25520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25521  if test "x$has_forbidden_chars" != x; then
25522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25524  fi
25525
25526    # Output is in $new_path
25527
25528  windows_path="$new_path"
25529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25530    unix_path=`$CYGPATH -u "$windows_path"`
25531    new_path="$unix_path"
25532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25534    new_path="$unix_path"
25535  fi
25536
25537    # remove trailing .exe if any
25538    new_path="${new_path/%.exe/}"
25539
25540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25542  fi
25543
25544  else
25545    # We're on a posix platform. Hooray! :)
25546    # First separate the path from the arguments. This will split at the first
25547    # space.
25548    complete="$NM"
25549    path="${complete%% *}"
25550    tmp="$complete EOL"
25551    arguments="${tmp#* }"
25552
25553    # Cannot rely on the command "which" here since it doesn't always work.
25554    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25555    if test -z "$is_absolute_path"; then
25556      # Path to executable is not absolute. Find it.
25557      IFS_save="$IFS"
25558      IFS=:
25559      for p in $PATH; do
25560        if test -f "$p/$path" && test -x "$p/$path"; then
25561          new_path="$p/$path"
25562          break
25563        fi
25564      done
25565      IFS="$IFS_save"
25566    else
25567      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25568$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25569      new_path="$path"
25570    fi
25571
25572    if test "x$new_path" = x; then
25573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25574$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25575        has_space=`$ECHO "$complete" | $GREP " "`
25576        if test "x$has_space" != x; then
25577          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25579        fi
25580        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25581      fi
25582  fi
25583
25584      # Now join together the path and the arguments once again
25585      if test "x$arguments" != xEOL; then
25586        new_complete="$new_path ${arguments% *}"
25587      else
25588        new_complete="$new_path"
25589      fi
25590
25591  if test "x$complete" != "x$new_complete"; then
25592      NM="$new_complete"
25593      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25594$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25595    fi
25596
25597    # Extract the first word of "gnm", so it can be a program name with args.
25598set dummy gnm; ac_word=$2
25599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25600$as_echo_n "checking for $ac_word... " >&6; }
25601if ${ac_cv_path_GNM+:} false; then :
25602  $as_echo_n "(cached) " >&6
25603else
25604  case $GNM in
25605  [\\/]* | ?:[\\/]*)
25606  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25607  ;;
25608  *)
25609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25610for as_dir in $PATH
25611do
25612  IFS=$as_save_IFS
25613  test -z "$as_dir" && as_dir=.
25614    for ac_exec_ext in '' $ac_executable_extensions; do
25615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25616    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25618    break 2
25619  fi
25620done
25621  done
25622IFS=$as_save_IFS
25623
25624  ;;
25625esac
25626fi
25627GNM=$ac_cv_path_GNM
25628if test -n "$GNM"; then
25629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25630$as_echo "$GNM" >&6; }
25631else
25632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25633$as_echo "no" >&6; }
25634fi
25635
25636
25637
25638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25639
25640  # First separate the path from the arguments. This will split at the first
25641  # space.
25642  complete="$GNM"
25643  path="${complete%% *}"
25644  tmp="$complete EOL"
25645  arguments="${tmp#* }"
25646
25647  # Input might be given as Windows format, start by converting to
25648  # unix format.
25649  new_path=`$CYGPATH -u "$path"`
25650
25651  # Now try to locate executable using which
25652  new_path=`$WHICH "$new_path" 2> /dev/null`
25653  # bat and cmd files are not always considered executable in cygwin causing which
25654  # to not find them
25655  if test "x$new_path" = x \
25656           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25657           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25658    new_path=`$CYGPATH -u "$path"`
25659  fi
25660  if test "x$new_path" = x; then
25661    # Oops. Which didn't find the executable.
25662    # The splitting of arguments from the executable at a space might have been incorrect,
25663    # since paths with space are more likely in Windows. Give it another try with the whole
25664    # argument.
25665    path="$complete"
25666    arguments="EOL"
25667    new_path=`$CYGPATH -u "$path"`
25668    new_path=`$WHICH "$new_path" 2> /dev/null`
25669    # bat and cmd files are not always considered executable in cygwin causing which
25670    # to not find them
25671    if test "x$new_path" = x \
25672             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25673             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25674      new_path=`$CYGPATH -u "$path"`
25675    fi
25676    if test "x$new_path" = x; then
25677      # It's still not found. Now this is an unrecoverable error.
25678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25679$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25680      has_space=`$ECHO "$complete" | $GREP " "`
25681      if test "x$has_space" != x; then
25682        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25683$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25684      fi
25685      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25686    fi
25687  fi
25688
25689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25692  # "foo.exe" is OK but "foo" is an error.
25693  #
25694  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25695  # It is also a way to make sure we got the proper file name for the real test later on.
25696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25697  if test "x$test_shortpath" = x; then
25698    # Short path failed, file does not exist as specified.
25699    # Try adding .exe or .cmd
25700    if test -f "${new_path}.exe"; then
25701       input_to_shortpath="${new_path}.exe"
25702    elif test -f "${new_path}.cmd"; then
25703       input_to_shortpath="${new_path}.cmd"
25704    else
25705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25706$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25707      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25708$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25709      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25710    fi
25711  else
25712    input_to_shortpath="$new_path"
25713  fi
25714
25715  # Call helper function which possibly converts this using DOS-style short mode.
25716  # If so, the updated path is stored in $new_path.
25717  new_path="$input_to_shortpath"
25718
25719  input_path="$input_to_shortpath"
25720  # Check if we need to convert this using DOS-style short mode. If the path
25721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25722  # take no chances and rewrite it.
25723  # Note: m4 eats our [], so we need to use [ and ] instead.
25724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25725  if test "x$has_forbidden_chars" != x; then
25726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25730      # Going to short mode and back again did indeed matter. Since short mode is
25731      # case insensitive, let's make it lowercase to improve readability.
25732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25733      # Now convert it back to Unix-stile (cygpath)
25734      input_path=`$CYGPATH -u "$shortmode_path"`
25735      new_path="$input_path"
25736    fi
25737  fi
25738
25739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25740  if test "x$test_cygdrive_prefix" = x; then
25741    # As a simple fix, exclude /usr/bin since it's not a real path.
25742    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25744      # a path prefixed by /cygdrive for fixpath to work.
25745      new_path="$CYGWIN_ROOT_PATH$input_path"
25746    fi
25747  fi
25748
25749  # remove trailing .exe if any
25750  new_path="${new_path/%.exe/}"
25751
25752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25753
25754  # First separate the path from the arguments. This will split at the first
25755  # space.
25756  complete="$GNM"
25757  path="${complete%% *}"
25758  tmp="$complete EOL"
25759  arguments="${tmp#* }"
25760
25761  # Input might be given as Windows format, start by converting to
25762  # unix format.
25763  new_path="$path"
25764
25765  windows_path="$new_path"
25766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25767    unix_path=`$CYGPATH -u "$windows_path"`
25768    new_path="$unix_path"
25769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25771    new_path="$unix_path"
25772  fi
25773
25774
25775  # Now try to locate executable using which
25776  new_path=`$WHICH "$new_path" 2> /dev/null`
25777
25778  if test "x$new_path" = x; then
25779    # Oops. Which didn't find the executable.
25780    # The splitting of arguments from the executable at a space might have been incorrect,
25781    # since paths with space are more likely in Windows. Give it another try with the whole
25782    # argument.
25783    path="$complete"
25784    arguments="EOL"
25785    new_path="$path"
25786
25787  windows_path="$new_path"
25788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25789    unix_path=`$CYGPATH -u "$windows_path"`
25790    new_path="$unix_path"
25791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25793    new_path="$unix_path"
25794  fi
25795
25796
25797    new_path=`$WHICH "$new_path" 2> /dev/null`
25798
25799    if test "x$new_path" = x; then
25800      # It's still not found. Now this is an unrecoverable error.
25801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25802$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25803      has_space=`$ECHO "$complete" | $GREP " "`
25804      if test "x$has_space" != x; then
25805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25807      fi
25808      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25809    fi
25810  fi
25811
25812  # Now new_path has a complete unix path to the binary
25813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25814    # Keep paths in /bin as-is, but remove trailing .exe if any
25815    new_path="${new_path/%.exe/}"
25816    # Do not save /bin paths to all_fixpath_prefixes!
25817  else
25818    # Not in mixed or Windows style, start by that.
25819    new_path=`cmd //c echo $new_path`
25820
25821  input_path="$new_path"
25822  # Check if we need to convert this using DOS-style short mode. If the path
25823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25824  # take no chances and rewrite it.
25825  # Note: m4 eats our [], so we need to use [ and ] instead.
25826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25827  if test "x$has_forbidden_chars" != x; then
25828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25830  fi
25831
25832    # Output is in $new_path
25833
25834  windows_path="$new_path"
25835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25836    unix_path=`$CYGPATH -u "$windows_path"`
25837    new_path="$unix_path"
25838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25840    new_path="$unix_path"
25841  fi
25842
25843    # remove trailing .exe if any
25844    new_path="${new_path/%.exe/}"
25845
25846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25848  fi
25849
25850  else
25851    # We're on a posix platform. Hooray! :)
25852    # First separate the path from the arguments. This will split at the first
25853    # space.
25854    complete="$GNM"
25855    path="${complete%% *}"
25856    tmp="$complete EOL"
25857    arguments="${tmp#* }"
25858
25859    # Cannot rely on the command "which" here since it doesn't always work.
25860    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25861    if test -z "$is_absolute_path"; then
25862      # Path to executable is not absolute. Find it.
25863      IFS_save="$IFS"
25864      IFS=:
25865      for p in $PATH; do
25866        if test -f "$p/$path" && test -x "$p/$path"; then
25867          new_path="$p/$path"
25868          break
25869        fi
25870      done
25871      IFS="$IFS_save"
25872    else
25873      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25874$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25875      new_path="$path"
25876    fi
25877
25878    if test "x$new_path" = x; then
25879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25880$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25881        has_space=`$ECHO "$complete" | $GREP " "`
25882        if test "x$has_space" != x; then
25883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25885        fi
25886        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25887      fi
25888  fi
25889
25890      # Now join together the path and the arguments once again
25891      if test "x$arguments" != xEOL; then
25892        new_complete="$new_path ${arguments% *}"
25893      else
25894        new_complete="$new_path"
25895      fi
25896
25897  if test "x$complete" != "x$new_complete"; then
25898      GNM="$new_complete"
25899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25900$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25901    fi
25902
25903    # Extract the first word of "strip", so it can be a program name with args.
25904set dummy strip; ac_word=$2
25905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25906$as_echo_n "checking for $ac_word... " >&6; }
25907if ${ac_cv_path_STRIP+:} false; then :
25908  $as_echo_n "(cached) " >&6
25909else
25910  case $STRIP in
25911  [\\/]* | ?:[\\/]*)
25912  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25913  ;;
25914  *)
25915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25916for as_dir in $PATH
25917do
25918  IFS=$as_save_IFS
25919  test -z "$as_dir" && as_dir=.
25920    for ac_exec_ext in '' $ac_executable_extensions; do
25921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25922    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25924    break 2
25925  fi
25926done
25927  done
25928IFS=$as_save_IFS
25929
25930  ;;
25931esac
25932fi
25933STRIP=$ac_cv_path_STRIP
25934if test -n "$STRIP"; then
25935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25936$as_echo "$STRIP" >&6; }
25937else
25938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25939$as_echo "no" >&6; }
25940fi
25941
25942
25943
25944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25945
25946  # First separate the path from the arguments. This will split at the first
25947  # space.
25948  complete="$STRIP"
25949  path="${complete%% *}"
25950  tmp="$complete EOL"
25951  arguments="${tmp#* }"
25952
25953  # Input might be given as Windows format, start by converting to
25954  # unix format.
25955  new_path=`$CYGPATH -u "$path"`
25956
25957  # Now try to locate executable using which
25958  new_path=`$WHICH "$new_path" 2> /dev/null`
25959  # bat and cmd files are not always considered executable in cygwin causing which
25960  # to not find them
25961  if test "x$new_path" = x \
25962           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25963           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25964    new_path=`$CYGPATH -u "$path"`
25965  fi
25966  if test "x$new_path" = x; then
25967    # Oops. Which didn't find the executable.
25968    # The splitting of arguments from the executable at a space might have been incorrect,
25969    # since paths with space are more likely in Windows. Give it another try with the whole
25970    # argument.
25971    path="$complete"
25972    arguments="EOL"
25973    new_path=`$CYGPATH -u "$path"`
25974    new_path=`$WHICH "$new_path" 2> /dev/null`
25975    # bat and cmd files are not always considered executable in cygwin causing which
25976    # to not find them
25977    if test "x$new_path" = x \
25978             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25979             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25980      new_path=`$CYGPATH -u "$path"`
25981    fi
25982    if test "x$new_path" = x; then
25983      # It's still not found. Now this is an unrecoverable error.
25984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25985$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25986      has_space=`$ECHO "$complete" | $GREP " "`
25987      if test "x$has_space" != x; then
25988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25990      fi
25991      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25992    fi
25993  fi
25994
25995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25998  # "foo.exe" is OK but "foo" is an error.
25999  #
26000  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26001  # It is also a way to make sure we got the proper file name for the real test later on.
26002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26003  if test "x$test_shortpath" = x; then
26004    # Short path failed, file does not exist as specified.
26005    # Try adding .exe or .cmd
26006    if test -f "${new_path}.exe"; then
26007       input_to_shortpath="${new_path}.exe"
26008    elif test -f "${new_path}.cmd"; then
26009       input_to_shortpath="${new_path}.cmd"
26010    else
26011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26012$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26013      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26014$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26015      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26016    fi
26017  else
26018    input_to_shortpath="$new_path"
26019  fi
26020
26021  # Call helper function which possibly converts this using DOS-style short mode.
26022  # If so, the updated path is stored in $new_path.
26023  new_path="$input_to_shortpath"
26024
26025  input_path="$input_to_shortpath"
26026  # Check if we need to convert this using DOS-style short mode. If the path
26027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26028  # take no chances and rewrite it.
26029  # Note: m4 eats our [], so we need to use [ and ] instead.
26030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26031  if test "x$has_forbidden_chars" != x; then
26032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26036      # Going to short mode and back again did indeed matter. Since short mode is
26037      # case insensitive, let's make it lowercase to improve readability.
26038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26039      # Now convert it back to Unix-stile (cygpath)
26040      input_path=`$CYGPATH -u "$shortmode_path"`
26041      new_path="$input_path"
26042    fi
26043  fi
26044
26045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26046  if test "x$test_cygdrive_prefix" = x; then
26047    # As a simple fix, exclude /usr/bin since it's not a real path.
26048    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26050      # a path prefixed by /cygdrive for fixpath to work.
26051      new_path="$CYGWIN_ROOT_PATH$input_path"
26052    fi
26053  fi
26054
26055  # remove trailing .exe if any
26056  new_path="${new_path/%.exe/}"
26057
26058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26059
26060  # First separate the path from the arguments. This will split at the first
26061  # space.
26062  complete="$STRIP"
26063  path="${complete%% *}"
26064  tmp="$complete EOL"
26065  arguments="${tmp#* }"
26066
26067  # Input might be given as Windows format, start by converting to
26068  # unix format.
26069  new_path="$path"
26070
26071  windows_path="$new_path"
26072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26073    unix_path=`$CYGPATH -u "$windows_path"`
26074    new_path="$unix_path"
26075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26077    new_path="$unix_path"
26078  fi
26079
26080
26081  # Now try to locate executable using which
26082  new_path=`$WHICH "$new_path" 2> /dev/null`
26083
26084  if test "x$new_path" = x; then
26085    # Oops. Which didn't find the executable.
26086    # The splitting of arguments from the executable at a space might have been incorrect,
26087    # since paths with space are more likely in Windows. Give it another try with the whole
26088    # argument.
26089    path="$complete"
26090    arguments="EOL"
26091    new_path="$path"
26092
26093  windows_path="$new_path"
26094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26095    unix_path=`$CYGPATH -u "$windows_path"`
26096    new_path="$unix_path"
26097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26099    new_path="$unix_path"
26100  fi
26101
26102
26103    new_path=`$WHICH "$new_path" 2> /dev/null`
26104
26105    if test "x$new_path" = x; then
26106      # It's still not found. Now this is an unrecoverable error.
26107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26108$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26109      has_space=`$ECHO "$complete" | $GREP " "`
26110      if test "x$has_space" != x; then
26111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26113      fi
26114      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26115    fi
26116  fi
26117
26118  # Now new_path has a complete unix path to the binary
26119  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26120    # Keep paths in /bin as-is, but remove trailing .exe if any
26121    new_path="${new_path/%.exe/}"
26122    # Do not save /bin paths to all_fixpath_prefixes!
26123  else
26124    # Not in mixed or Windows style, start by that.
26125    new_path=`cmd //c echo $new_path`
26126
26127  input_path="$new_path"
26128  # Check if we need to convert this using DOS-style short mode. If the path
26129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26130  # take no chances and rewrite it.
26131  # Note: m4 eats our [], so we need to use [ and ] instead.
26132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26133  if test "x$has_forbidden_chars" != x; then
26134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26136  fi
26137
26138    # Output is in $new_path
26139
26140  windows_path="$new_path"
26141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26142    unix_path=`$CYGPATH -u "$windows_path"`
26143    new_path="$unix_path"
26144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26146    new_path="$unix_path"
26147  fi
26148
26149    # remove trailing .exe if any
26150    new_path="${new_path/%.exe/}"
26151
26152    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26153    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26154  fi
26155
26156  else
26157    # We're on a posix platform. Hooray! :)
26158    # First separate the path from the arguments. This will split at the first
26159    # space.
26160    complete="$STRIP"
26161    path="${complete%% *}"
26162    tmp="$complete EOL"
26163    arguments="${tmp#* }"
26164
26165    # Cannot rely on the command "which" here since it doesn't always work.
26166    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26167    if test -z "$is_absolute_path"; then
26168      # Path to executable is not absolute. Find it.
26169      IFS_save="$IFS"
26170      IFS=:
26171      for p in $PATH; do
26172        if test -f "$p/$path" && test -x "$p/$path"; then
26173          new_path="$p/$path"
26174          break
26175        fi
26176      done
26177      IFS="$IFS_save"
26178    else
26179      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26180$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26181      new_path="$path"
26182    fi
26183
26184    if test "x$new_path" = x; then
26185        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26186$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26187        has_space=`$ECHO "$complete" | $GREP " "`
26188        if test "x$has_space" != x; then
26189          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26190$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26191        fi
26192        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26193      fi
26194  fi
26195
26196      # Now join together the path and the arguments once again
26197      if test "x$arguments" != xEOL; then
26198        new_complete="$new_path ${arguments% *}"
26199      else
26200        new_complete="$new_path"
26201      fi
26202
26203  if test "x$complete" != "x$new_complete"; then
26204      STRIP="$new_complete"
26205      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26206$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26207    fi
26208
26209    # Extract the first word of "mcs", so it can be a program name with args.
26210set dummy mcs; ac_word=$2
26211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26212$as_echo_n "checking for $ac_word... " >&6; }
26213if ${ac_cv_path_MCS+:} false; then :
26214  $as_echo_n "(cached) " >&6
26215else
26216  case $MCS in
26217  [\\/]* | ?:[\\/]*)
26218  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26219  ;;
26220  *)
26221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26222for as_dir in $PATH
26223do
26224  IFS=$as_save_IFS
26225  test -z "$as_dir" && as_dir=.
26226    for ac_exec_ext in '' $ac_executable_extensions; do
26227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26228    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26230    break 2
26231  fi
26232done
26233  done
26234IFS=$as_save_IFS
26235
26236  ;;
26237esac
26238fi
26239MCS=$ac_cv_path_MCS
26240if test -n "$MCS"; then
26241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26242$as_echo "$MCS" >&6; }
26243else
26244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26245$as_echo "no" >&6; }
26246fi
26247
26248
26249
26250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26251
26252  # First separate the path from the arguments. This will split at the first
26253  # space.
26254  complete="$MCS"
26255  path="${complete%% *}"
26256  tmp="$complete EOL"
26257  arguments="${tmp#* }"
26258
26259  # Input might be given as Windows format, start by converting to
26260  # unix format.
26261  new_path=`$CYGPATH -u "$path"`
26262
26263  # Now try to locate executable using which
26264  new_path=`$WHICH "$new_path" 2> /dev/null`
26265  # bat and cmd files are not always considered executable in cygwin causing which
26266  # to not find them
26267  if test "x$new_path" = x \
26268           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26269           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26270    new_path=`$CYGPATH -u "$path"`
26271  fi
26272  if test "x$new_path" = x; then
26273    # Oops. Which didn't find the executable.
26274    # The splitting of arguments from the executable at a space might have been incorrect,
26275    # since paths with space are more likely in Windows. Give it another try with the whole
26276    # argument.
26277    path="$complete"
26278    arguments="EOL"
26279    new_path=`$CYGPATH -u "$path"`
26280    new_path=`$WHICH "$new_path" 2> /dev/null`
26281    # bat and cmd files are not always considered executable in cygwin causing which
26282    # to not find them
26283    if test "x$new_path" = x \
26284             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26285             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26286      new_path=`$CYGPATH -u "$path"`
26287    fi
26288    if test "x$new_path" = x; then
26289      # It's still not found. Now this is an unrecoverable error.
26290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26291$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26292      has_space=`$ECHO "$complete" | $GREP " "`
26293      if test "x$has_space" != x; then
26294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26296      fi
26297      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26298    fi
26299  fi
26300
26301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26304  # "foo.exe" is OK but "foo" is an error.
26305  #
26306  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26307  # It is also a way to make sure we got the proper file name for the real test later on.
26308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26309  if test "x$test_shortpath" = x; then
26310    # Short path failed, file does not exist as specified.
26311    # Try adding .exe or .cmd
26312    if test -f "${new_path}.exe"; then
26313       input_to_shortpath="${new_path}.exe"
26314    elif test -f "${new_path}.cmd"; then
26315       input_to_shortpath="${new_path}.cmd"
26316    else
26317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26318$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26319      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26320$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26321      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26322    fi
26323  else
26324    input_to_shortpath="$new_path"
26325  fi
26326
26327  # Call helper function which possibly converts this using DOS-style short mode.
26328  # If so, the updated path is stored in $new_path.
26329  new_path="$input_to_shortpath"
26330
26331  input_path="$input_to_shortpath"
26332  # Check if we need to convert this using DOS-style short mode. If the path
26333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26334  # take no chances and rewrite it.
26335  # Note: m4 eats our [], so we need to use [ and ] instead.
26336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26337  if test "x$has_forbidden_chars" != x; then
26338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26342      # Going to short mode and back again did indeed matter. Since short mode is
26343      # case insensitive, let's make it lowercase to improve readability.
26344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26345      # Now convert it back to Unix-stile (cygpath)
26346      input_path=`$CYGPATH -u "$shortmode_path"`
26347      new_path="$input_path"
26348    fi
26349  fi
26350
26351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26352  if test "x$test_cygdrive_prefix" = x; then
26353    # As a simple fix, exclude /usr/bin since it's not a real path.
26354    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26356      # a path prefixed by /cygdrive for fixpath to work.
26357      new_path="$CYGWIN_ROOT_PATH$input_path"
26358    fi
26359  fi
26360
26361  # remove trailing .exe if any
26362  new_path="${new_path/%.exe/}"
26363
26364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26365
26366  # First separate the path from the arguments. This will split at the first
26367  # space.
26368  complete="$MCS"
26369  path="${complete%% *}"
26370  tmp="$complete EOL"
26371  arguments="${tmp#* }"
26372
26373  # Input might be given as Windows format, start by converting to
26374  # unix format.
26375  new_path="$path"
26376
26377  windows_path="$new_path"
26378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26379    unix_path=`$CYGPATH -u "$windows_path"`
26380    new_path="$unix_path"
26381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26383    new_path="$unix_path"
26384  fi
26385
26386
26387  # Now try to locate executable using which
26388  new_path=`$WHICH "$new_path" 2> /dev/null`
26389
26390  if test "x$new_path" = x; then
26391    # Oops. Which didn't find the executable.
26392    # The splitting of arguments from the executable at a space might have been incorrect,
26393    # since paths with space are more likely in Windows. Give it another try with the whole
26394    # argument.
26395    path="$complete"
26396    arguments="EOL"
26397    new_path="$path"
26398
26399  windows_path="$new_path"
26400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26401    unix_path=`$CYGPATH -u "$windows_path"`
26402    new_path="$unix_path"
26403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26405    new_path="$unix_path"
26406  fi
26407
26408
26409    new_path=`$WHICH "$new_path" 2> /dev/null`
26410
26411    if test "x$new_path" = x; then
26412      # It's still not found. Now this is an unrecoverable error.
26413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26414$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26415      has_space=`$ECHO "$complete" | $GREP " "`
26416      if test "x$has_space" != x; then
26417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26419      fi
26420      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26421    fi
26422  fi
26423
26424  # Now new_path has a complete unix path to the binary
26425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26426    # Keep paths in /bin as-is, but remove trailing .exe if any
26427    new_path="${new_path/%.exe/}"
26428    # Do not save /bin paths to all_fixpath_prefixes!
26429  else
26430    # Not in mixed or Windows style, start by that.
26431    new_path=`cmd //c echo $new_path`
26432
26433  input_path="$new_path"
26434  # Check if we need to convert this using DOS-style short mode. If the path
26435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26436  # take no chances and rewrite it.
26437  # Note: m4 eats our [], so we need to use [ and ] instead.
26438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26439  if test "x$has_forbidden_chars" != x; then
26440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26442  fi
26443
26444    # Output is in $new_path
26445
26446  windows_path="$new_path"
26447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26448    unix_path=`$CYGPATH -u "$windows_path"`
26449    new_path="$unix_path"
26450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26452    new_path="$unix_path"
26453  fi
26454
26455    # remove trailing .exe if any
26456    new_path="${new_path/%.exe/}"
26457
26458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26460  fi
26461
26462  else
26463    # We're on a posix platform. Hooray! :)
26464    # First separate the path from the arguments. This will split at the first
26465    # space.
26466    complete="$MCS"
26467    path="${complete%% *}"
26468    tmp="$complete EOL"
26469    arguments="${tmp#* }"
26470
26471    # Cannot rely on the command "which" here since it doesn't always work.
26472    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26473    if test -z "$is_absolute_path"; then
26474      # Path to executable is not absolute. Find it.
26475      IFS_save="$IFS"
26476      IFS=:
26477      for p in $PATH; do
26478        if test -f "$p/$path" && test -x "$p/$path"; then
26479          new_path="$p/$path"
26480          break
26481        fi
26482      done
26483      IFS="$IFS_save"
26484    else
26485      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26486$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26487      new_path="$path"
26488    fi
26489
26490    if test "x$new_path" = x; then
26491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26492$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26493        has_space=`$ECHO "$complete" | $GREP " "`
26494        if test "x$has_space" != x; then
26495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26497        fi
26498        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26499      fi
26500  fi
26501
26502      # Now join together the path and the arguments once again
26503      if test "x$arguments" != xEOL; then
26504        new_complete="$new_path ${arguments% *}"
26505      else
26506        new_complete="$new_path"
26507      fi
26508
26509  if test "x$complete" != "x$new_complete"; then
26510      MCS="$new_complete"
26511      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26512$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26513    fi
26514
26515elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26516    if test -n "$ac_tool_prefix"; then
26517  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26518set dummy ${ac_tool_prefix}nm; ac_word=$2
26519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26520$as_echo_n "checking for $ac_word... " >&6; }
26521if ${ac_cv_prog_NM+:} false; then :
26522  $as_echo_n "(cached) " >&6
26523else
26524  if test -n "$NM"; then
26525  ac_cv_prog_NM="$NM" # Let the user override the test.
26526else
26527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26528for as_dir in $PATH
26529do
26530  IFS=$as_save_IFS
26531  test -z "$as_dir" && as_dir=.
26532    for ac_exec_ext in '' $ac_executable_extensions; do
26533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26534    ac_cv_prog_NM="${ac_tool_prefix}nm"
26535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26536    break 2
26537  fi
26538done
26539  done
26540IFS=$as_save_IFS
26541
26542fi
26543fi
26544NM=$ac_cv_prog_NM
26545if test -n "$NM"; then
26546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26547$as_echo "$NM" >&6; }
26548else
26549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26550$as_echo "no" >&6; }
26551fi
26552
26553
26554fi
26555if test -z "$ac_cv_prog_NM"; then
26556  ac_ct_NM=$NM
26557  # Extract the first word of "nm", so it can be a program name with args.
26558set dummy nm; ac_word=$2
26559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26560$as_echo_n "checking for $ac_word... " >&6; }
26561if ${ac_cv_prog_ac_ct_NM+:} false; then :
26562  $as_echo_n "(cached) " >&6
26563else
26564  if test -n "$ac_ct_NM"; then
26565  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26566else
26567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26568for as_dir in $PATH
26569do
26570  IFS=$as_save_IFS
26571  test -z "$as_dir" && as_dir=.
26572    for ac_exec_ext in '' $ac_executable_extensions; do
26573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26574    ac_cv_prog_ac_ct_NM="nm"
26575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26576    break 2
26577  fi
26578done
26579  done
26580IFS=$as_save_IFS
26581
26582fi
26583fi
26584ac_ct_NM=$ac_cv_prog_ac_ct_NM
26585if test -n "$ac_ct_NM"; then
26586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26587$as_echo "$ac_ct_NM" >&6; }
26588else
26589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26590$as_echo "no" >&6; }
26591fi
26592
26593  if test "x$ac_ct_NM" = x; then
26594    NM=""
26595  else
26596    case $cross_compiling:$ac_tool_warned in
26597yes:)
26598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26600ac_tool_warned=yes ;;
26601esac
26602    NM=$ac_ct_NM
26603  fi
26604else
26605  NM="$ac_cv_prog_NM"
26606fi
26607
26608
26609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26610
26611  # First separate the path from the arguments. This will split at the first
26612  # space.
26613  complete="$NM"
26614  path="${complete%% *}"
26615  tmp="$complete EOL"
26616  arguments="${tmp#* }"
26617
26618  # Input might be given as Windows format, start by converting to
26619  # unix format.
26620  new_path=`$CYGPATH -u "$path"`
26621
26622  # Now try to locate executable using which
26623  new_path=`$WHICH "$new_path" 2> /dev/null`
26624  # bat and cmd files are not always considered executable in cygwin causing which
26625  # to not find them
26626  if test "x$new_path" = x \
26627           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26628           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26629    new_path=`$CYGPATH -u "$path"`
26630  fi
26631  if test "x$new_path" = x; then
26632    # Oops. Which didn't find the executable.
26633    # The splitting of arguments from the executable at a space might have been incorrect,
26634    # since paths with space are more likely in Windows. Give it another try with the whole
26635    # argument.
26636    path="$complete"
26637    arguments="EOL"
26638    new_path=`$CYGPATH -u "$path"`
26639    new_path=`$WHICH "$new_path" 2> /dev/null`
26640    # bat and cmd files are not always considered executable in cygwin causing which
26641    # to not find them
26642    if test "x$new_path" = x \
26643             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26644             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26645      new_path=`$CYGPATH -u "$path"`
26646    fi
26647    if test "x$new_path" = x; then
26648      # It's still not found. Now this is an unrecoverable error.
26649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26650$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26651      has_space=`$ECHO "$complete" | $GREP " "`
26652      if test "x$has_space" != x; then
26653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26655      fi
26656      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26657    fi
26658  fi
26659
26660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26663  # "foo.exe" is OK but "foo" is an error.
26664  #
26665  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26666  # It is also a way to make sure we got the proper file name for the real test later on.
26667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26668  if test "x$test_shortpath" = x; then
26669    # Short path failed, file does not exist as specified.
26670    # Try adding .exe or .cmd
26671    if test -f "${new_path}.exe"; then
26672       input_to_shortpath="${new_path}.exe"
26673    elif test -f "${new_path}.cmd"; then
26674       input_to_shortpath="${new_path}.cmd"
26675    else
26676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26677$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26678      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26679$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26680      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26681    fi
26682  else
26683    input_to_shortpath="$new_path"
26684  fi
26685
26686  # Call helper function which possibly converts this using DOS-style short mode.
26687  # If so, the updated path is stored in $new_path.
26688  new_path="$input_to_shortpath"
26689
26690  input_path="$input_to_shortpath"
26691  # Check if we need to convert this using DOS-style short mode. If the path
26692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26693  # take no chances and rewrite it.
26694  # Note: m4 eats our [], so we need to use [ and ] instead.
26695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26696  if test "x$has_forbidden_chars" != x; then
26697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26701      # Going to short mode and back again did indeed matter. Since short mode is
26702      # case insensitive, let's make it lowercase to improve readability.
26703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26704      # Now convert it back to Unix-stile (cygpath)
26705      input_path=`$CYGPATH -u "$shortmode_path"`
26706      new_path="$input_path"
26707    fi
26708  fi
26709
26710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26711  if test "x$test_cygdrive_prefix" = x; then
26712    # As a simple fix, exclude /usr/bin since it's not a real path.
26713    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26715      # a path prefixed by /cygdrive for fixpath to work.
26716      new_path="$CYGWIN_ROOT_PATH$input_path"
26717    fi
26718  fi
26719
26720  # remove trailing .exe if any
26721  new_path="${new_path/%.exe/}"
26722
26723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26724
26725  # First separate the path from the arguments. This will split at the first
26726  # space.
26727  complete="$NM"
26728  path="${complete%% *}"
26729  tmp="$complete EOL"
26730  arguments="${tmp#* }"
26731
26732  # Input might be given as Windows format, start by converting to
26733  # unix format.
26734  new_path="$path"
26735
26736  windows_path="$new_path"
26737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26738    unix_path=`$CYGPATH -u "$windows_path"`
26739    new_path="$unix_path"
26740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26742    new_path="$unix_path"
26743  fi
26744
26745
26746  # Now try to locate executable using which
26747  new_path=`$WHICH "$new_path" 2> /dev/null`
26748
26749  if test "x$new_path" = x; then
26750    # Oops. Which didn't find the executable.
26751    # The splitting of arguments from the executable at a space might have been incorrect,
26752    # since paths with space are more likely in Windows. Give it another try with the whole
26753    # argument.
26754    path="$complete"
26755    arguments="EOL"
26756    new_path="$path"
26757
26758  windows_path="$new_path"
26759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26760    unix_path=`$CYGPATH -u "$windows_path"`
26761    new_path="$unix_path"
26762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26764    new_path="$unix_path"
26765  fi
26766
26767
26768    new_path=`$WHICH "$new_path" 2> /dev/null`
26769
26770    if test "x$new_path" = x; then
26771      # It's still not found. Now this is an unrecoverable error.
26772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26773$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26774      has_space=`$ECHO "$complete" | $GREP " "`
26775      if test "x$has_space" != x; then
26776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26778      fi
26779      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26780    fi
26781  fi
26782
26783  # Now new_path has a complete unix path to the binary
26784  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26785    # Keep paths in /bin as-is, but remove trailing .exe if any
26786    new_path="${new_path/%.exe/}"
26787    # Do not save /bin paths to all_fixpath_prefixes!
26788  else
26789    # Not in mixed or Windows style, start by that.
26790    new_path=`cmd //c echo $new_path`
26791
26792  input_path="$new_path"
26793  # Check if we need to convert this using DOS-style short mode. If the path
26794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26795  # take no chances and rewrite it.
26796  # Note: m4 eats our [], so we need to use [ and ] instead.
26797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26798  if test "x$has_forbidden_chars" != x; then
26799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26801  fi
26802
26803    # Output is in $new_path
26804
26805  windows_path="$new_path"
26806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26807    unix_path=`$CYGPATH -u "$windows_path"`
26808    new_path="$unix_path"
26809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26811    new_path="$unix_path"
26812  fi
26813
26814    # remove trailing .exe if any
26815    new_path="${new_path/%.exe/}"
26816
26817    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26818    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26819  fi
26820
26821  else
26822    # We're on a posix platform. Hooray! :)
26823    # First separate the path from the arguments. This will split at the first
26824    # space.
26825    complete="$NM"
26826    path="${complete%% *}"
26827    tmp="$complete EOL"
26828    arguments="${tmp#* }"
26829
26830    # Cannot rely on the command "which" here since it doesn't always work.
26831    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26832    if test -z "$is_absolute_path"; then
26833      # Path to executable is not absolute. Find it.
26834      IFS_save="$IFS"
26835      IFS=:
26836      for p in $PATH; do
26837        if test -f "$p/$path" && test -x "$p/$path"; then
26838          new_path="$p/$path"
26839          break
26840        fi
26841      done
26842      IFS="$IFS_save"
26843    else
26844      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26845$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26846      new_path="$path"
26847    fi
26848
26849    if test "x$new_path" = x; then
26850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26851$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26852        has_space=`$ECHO "$complete" | $GREP " "`
26853        if test "x$has_space" != x; then
26854          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26855$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26856        fi
26857        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26858      fi
26859  fi
26860
26861      # Now join together the path and the arguments once again
26862      if test "x$arguments" != xEOL; then
26863        new_complete="$new_path ${arguments% *}"
26864      else
26865        new_complete="$new_path"
26866      fi
26867
26868  if test "x$complete" != "x$new_complete"; then
26869      NM="$new_complete"
26870      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26871$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26872    fi
26873
26874    GNM="$NM"
26875
26876    if test -n "$ac_tool_prefix"; then
26877  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26878set dummy ${ac_tool_prefix}strip; ac_word=$2
26879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26880$as_echo_n "checking for $ac_word... " >&6; }
26881if ${ac_cv_prog_STRIP+:} false; then :
26882  $as_echo_n "(cached) " >&6
26883else
26884  if test -n "$STRIP"; then
26885  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26886else
26887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26888for as_dir in $PATH
26889do
26890  IFS=$as_save_IFS
26891  test -z "$as_dir" && as_dir=.
26892    for ac_exec_ext in '' $ac_executable_extensions; do
26893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26894    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26896    break 2
26897  fi
26898done
26899  done
26900IFS=$as_save_IFS
26901
26902fi
26903fi
26904STRIP=$ac_cv_prog_STRIP
26905if test -n "$STRIP"; then
26906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26907$as_echo "$STRIP" >&6; }
26908else
26909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26910$as_echo "no" >&6; }
26911fi
26912
26913
26914fi
26915if test -z "$ac_cv_prog_STRIP"; then
26916  ac_ct_STRIP=$STRIP
26917  # Extract the first word of "strip", so it can be a program name with args.
26918set dummy strip; ac_word=$2
26919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26920$as_echo_n "checking for $ac_word... " >&6; }
26921if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26922  $as_echo_n "(cached) " >&6
26923else
26924  if test -n "$ac_ct_STRIP"; then
26925  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26926else
26927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26928for as_dir in $PATH
26929do
26930  IFS=$as_save_IFS
26931  test -z "$as_dir" && as_dir=.
26932    for ac_exec_ext in '' $ac_executable_extensions; do
26933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26934    ac_cv_prog_ac_ct_STRIP="strip"
26935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26936    break 2
26937  fi
26938done
26939  done
26940IFS=$as_save_IFS
26941
26942fi
26943fi
26944ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26945if test -n "$ac_ct_STRIP"; then
26946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26947$as_echo "$ac_ct_STRIP" >&6; }
26948else
26949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26950$as_echo "no" >&6; }
26951fi
26952
26953  if test "x$ac_ct_STRIP" = x; then
26954    STRIP=""
26955  else
26956    case $cross_compiling:$ac_tool_warned in
26957yes:)
26958{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26959$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26960ac_tool_warned=yes ;;
26961esac
26962    STRIP=$ac_ct_STRIP
26963  fi
26964else
26965  STRIP="$ac_cv_prog_STRIP"
26966fi
26967
26968
26969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26970
26971  # First separate the path from the arguments. This will split at the first
26972  # space.
26973  complete="$STRIP"
26974  path="${complete%% *}"
26975  tmp="$complete EOL"
26976  arguments="${tmp#* }"
26977
26978  # Input might be given as Windows format, start by converting to
26979  # unix format.
26980  new_path=`$CYGPATH -u "$path"`
26981
26982  # Now try to locate executable using which
26983  new_path=`$WHICH "$new_path" 2> /dev/null`
26984  # bat and cmd files are not always considered executable in cygwin causing which
26985  # to not find them
26986  if test "x$new_path" = x \
26987           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26988           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26989    new_path=`$CYGPATH -u "$path"`
26990  fi
26991  if test "x$new_path" = x; then
26992    # Oops. Which didn't find the executable.
26993    # The splitting of arguments from the executable at a space might have been incorrect,
26994    # since paths with space are more likely in Windows. Give it another try with the whole
26995    # argument.
26996    path="$complete"
26997    arguments="EOL"
26998    new_path=`$CYGPATH -u "$path"`
26999    new_path=`$WHICH "$new_path" 2> /dev/null`
27000    # bat and cmd files are not always considered executable in cygwin causing which
27001    # to not find them
27002    if test "x$new_path" = x \
27003             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27004             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27005      new_path=`$CYGPATH -u "$path"`
27006    fi
27007    if test "x$new_path" = x; then
27008      # It's still not found. Now this is an unrecoverable error.
27009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27010$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27011      has_space=`$ECHO "$complete" | $GREP " "`
27012      if test "x$has_space" != x; then
27013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27015      fi
27016      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27017    fi
27018  fi
27019
27020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27023  # "foo.exe" is OK but "foo" is an error.
27024  #
27025  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27026  # It is also a way to make sure we got the proper file name for the real test later on.
27027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27028  if test "x$test_shortpath" = x; then
27029    # Short path failed, file does not exist as specified.
27030    # Try adding .exe or .cmd
27031    if test -f "${new_path}.exe"; then
27032       input_to_shortpath="${new_path}.exe"
27033    elif test -f "${new_path}.cmd"; then
27034       input_to_shortpath="${new_path}.cmd"
27035    else
27036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27037$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27038      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27039$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27040      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27041    fi
27042  else
27043    input_to_shortpath="$new_path"
27044  fi
27045
27046  # Call helper function which possibly converts this using DOS-style short mode.
27047  # If so, the updated path is stored in $new_path.
27048  new_path="$input_to_shortpath"
27049
27050  input_path="$input_to_shortpath"
27051  # Check if we need to convert this using DOS-style short mode. If the path
27052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27053  # take no chances and rewrite it.
27054  # Note: m4 eats our [], so we need to use [ and ] instead.
27055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27056  if test "x$has_forbidden_chars" != x; then
27057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27061      # Going to short mode and back again did indeed matter. Since short mode is
27062      # case insensitive, let's make it lowercase to improve readability.
27063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27064      # Now convert it back to Unix-stile (cygpath)
27065      input_path=`$CYGPATH -u "$shortmode_path"`
27066      new_path="$input_path"
27067    fi
27068  fi
27069
27070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27071  if test "x$test_cygdrive_prefix" = x; then
27072    # As a simple fix, exclude /usr/bin since it's not a real path.
27073    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27075      # a path prefixed by /cygdrive for fixpath to work.
27076      new_path="$CYGWIN_ROOT_PATH$input_path"
27077    fi
27078  fi
27079
27080  # remove trailing .exe if any
27081  new_path="${new_path/%.exe/}"
27082
27083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27084
27085  # First separate the path from the arguments. This will split at the first
27086  # space.
27087  complete="$STRIP"
27088  path="${complete%% *}"
27089  tmp="$complete EOL"
27090  arguments="${tmp#* }"
27091
27092  # Input might be given as Windows format, start by converting to
27093  # unix format.
27094  new_path="$path"
27095
27096  windows_path="$new_path"
27097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27098    unix_path=`$CYGPATH -u "$windows_path"`
27099    new_path="$unix_path"
27100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27102    new_path="$unix_path"
27103  fi
27104
27105
27106  # Now try to locate executable using which
27107  new_path=`$WHICH "$new_path" 2> /dev/null`
27108
27109  if test "x$new_path" = x; then
27110    # Oops. Which didn't find the executable.
27111    # The splitting of arguments from the executable at a space might have been incorrect,
27112    # since paths with space are more likely in Windows. Give it another try with the whole
27113    # argument.
27114    path="$complete"
27115    arguments="EOL"
27116    new_path="$path"
27117
27118  windows_path="$new_path"
27119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27120    unix_path=`$CYGPATH -u "$windows_path"`
27121    new_path="$unix_path"
27122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27124    new_path="$unix_path"
27125  fi
27126
27127
27128    new_path=`$WHICH "$new_path" 2> /dev/null`
27129
27130    if test "x$new_path" = x; then
27131      # It's still not found. Now this is an unrecoverable error.
27132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27133$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27134      has_space=`$ECHO "$complete" | $GREP " "`
27135      if test "x$has_space" != x; then
27136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27138      fi
27139      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27140    fi
27141  fi
27142
27143  # Now new_path has a complete unix path to the binary
27144  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27145    # Keep paths in /bin as-is, but remove trailing .exe if any
27146    new_path="${new_path/%.exe/}"
27147    # Do not save /bin paths to all_fixpath_prefixes!
27148  else
27149    # Not in mixed or Windows style, start by that.
27150    new_path=`cmd //c echo $new_path`
27151
27152  input_path="$new_path"
27153  # Check if we need to convert this using DOS-style short mode. If the path
27154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27155  # take no chances and rewrite it.
27156  # Note: m4 eats our [], so we need to use [ and ] instead.
27157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27158  if test "x$has_forbidden_chars" != x; then
27159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27161  fi
27162
27163    # Output is in $new_path
27164
27165  windows_path="$new_path"
27166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27167    unix_path=`$CYGPATH -u "$windows_path"`
27168    new_path="$unix_path"
27169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27171    new_path="$unix_path"
27172  fi
27173
27174    # remove trailing .exe if any
27175    new_path="${new_path/%.exe/}"
27176
27177    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27178    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27179  fi
27180
27181  else
27182    # We're on a posix platform. Hooray! :)
27183    # First separate the path from the arguments. This will split at the first
27184    # space.
27185    complete="$STRIP"
27186    path="${complete%% *}"
27187    tmp="$complete EOL"
27188    arguments="${tmp#* }"
27189
27190    # Cannot rely on the command "which" here since it doesn't always work.
27191    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27192    if test -z "$is_absolute_path"; then
27193      # Path to executable is not absolute. Find it.
27194      IFS_save="$IFS"
27195      IFS=:
27196      for p in $PATH; do
27197        if test -f "$p/$path" && test -x "$p/$path"; then
27198          new_path="$p/$path"
27199          break
27200        fi
27201      done
27202      IFS="$IFS_save"
27203    else
27204      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27205$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27206      new_path="$path"
27207    fi
27208
27209    if test "x$new_path" = x; then
27210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27211$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27212        has_space=`$ECHO "$complete" | $GREP " "`
27213        if test "x$has_space" != x; then
27214          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27215$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27216        fi
27217        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27218      fi
27219  fi
27220
27221      # Now join together the path and the arguments once again
27222      if test "x$arguments" != xEOL; then
27223        new_complete="$new_path ${arguments% *}"
27224      else
27225        new_complete="$new_path"
27226      fi
27227
27228  if test "x$complete" != "x$new_complete"; then
27229      STRIP="$new_complete"
27230      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27231$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27232    fi
27233
27234fi
27235
27236# objcopy is used for moving debug symbols to separate files when
27237# full debug symbols are enabled.
27238if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27239    if test -n "$ac_tool_prefix"; then
27240  for ac_prog in gobjcopy objcopy
27241  do
27242    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27243set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27245$as_echo_n "checking for $ac_word... " >&6; }
27246if ${ac_cv_prog_OBJCOPY+:} false; then :
27247  $as_echo_n "(cached) " >&6
27248else
27249  if test -n "$OBJCOPY"; then
27250  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27251else
27252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27253for as_dir in $PATH
27254do
27255  IFS=$as_save_IFS
27256  test -z "$as_dir" && as_dir=.
27257    for ac_exec_ext in '' $ac_executable_extensions; do
27258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27259    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27261    break 2
27262  fi
27263done
27264  done
27265IFS=$as_save_IFS
27266
27267fi
27268fi
27269OBJCOPY=$ac_cv_prog_OBJCOPY
27270if test -n "$OBJCOPY"; then
27271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27272$as_echo "$OBJCOPY" >&6; }
27273else
27274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27275$as_echo "no" >&6; }
27276fi
27277
27278
27279    test -n "$OBJCOPY" && break
27280  done
27281fi
27282if test -z "$OBJCOPY"; then
27283  ac_ct_OBJCOPY=$OBJCOPY
27284  for ac_prog in gobjcopy objcopy
27285do
27286  # Extract the first word of "$ac_prog", so it can be a program name with args.
27287set dummy $ac_prog; ac_word=$2
27288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27289$as_echo_n "checking for $ac_word... " >&6; }
27290if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27291  $as_echo_n "(cached) " >&6
27292else
27293  if test -n "$ac_ct_OBJCOPY"; then
27294  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27295else
27296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27297for as_dir in $PATH
27298do
27299  IFS=$as_save_IFS
27300  test -z "$as_dir" && as_dir=.
27301    for ac_exec_ext in '' $ac_executable_extensions; do
27302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27303    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27305    break 2
27306  fi
27307done
27308  done
27309IFS=$as_save_IFS
27310
27311fi
27312fi
27313ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27314if test -n "$ac_ct_OBJCOPY"; then
27315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27316$as_echo "$ac_ct_OBJCOPY" >&6; }
27317else
27318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27319$as_echo "no" >&6; }
27320fi
27321
27322
27323  test -n "$ac_ct_OBJCOPY" && break
27324done
27325
27326  if test "x$ac_ct_OBJCOPY" = x; then
27327    OBJCOPY=""
27328  else
27329    case $cross_compiling:$ac_tool_warned in
27330yes:)
27331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27333ac_tool_warned=yes ;;
27334esac
27335    OBJCOPY=$ac_ct_OBJCOPY
27336  fi
27337fi
27338
27339    # Only call fixup if objcopy was found.
27340    if test -n "$OBJCOPY"; then
27341
27342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27343
27344  # First separate the path from the arguments. This will split at the first
27345  # space.
27346  complete="$OBJCOPY"
27347  path="${complete%% *}"
27348  tmp="$complete EOL"
27349  arguments="${tmp#* }"
27350
27351  # Input might be given as Windows format, start by converting to
27352  # unix format.
27353  new_path=`$CYGPATH -u "$path"`
27354
27355  # Now try to locate executable using which
27356  new_path=`$WHICH "$new_path" 2> /dev/null`
27357  # bat and cmd files are not always considered executable in cygwin causing which
27358  # to not find them
27359  if test "x$new_path" = x \
27360           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27361           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27362    new_path=`$CYGPATH -u "$path"`
27363  fi
27364  if test "x$new_path" = x; then
27365    # Oops. Which didn't find the executable.
27366    # The splitting of arguments from the executable at a space might have been incorrect,
27367    # since paths with space are more likely in Windows. Give it another try with the whole
27368    # argument.
27369    path="$complete"
27370    arguments="EOL"
27371    new_path=`$CYGPATH -u "$path"`
27372    new_path=`$WHICH "$new_path" 2> /dev/null`
27373    # bat and cmd files are not always considered executable in cygwin causing which
27374    # to not find them
27375    if test "x$new_path" = x \
27376             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27377             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27378      new_path=`$CYGPATH -u "$path"`
27379    fi
27380    if test "x$new_path" = x; then
27381      # It's still not found. Now this is an unrecoverable error.
27382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27383$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27384      has_space=`$ECHO "$complete" | $GREP " "`
27385      if test "x$has_space" != x; then
27386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27388      fi
27389      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27390    fi
27391  fi
27392
27393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27396  # "foo.exe" is OK but "foo" is an error.
27397  #
27398  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27399  # It is also a way to make sure we got the proper file name for the real test later on.
27400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27401  if test "x$test_shortpath" = x; then
27402    # Short path failed, file does not exist as specified.
27403    # Try adding .exe or .cmd
27404    if test -f "${new_path}.exe"; then
27405       input_to_shortpath="${new_path}.exe"
27406    elif test -f "${new_path}.cmd"; then
27407       input_to_shortpath="${new_path}.cmd"
27408    else
27409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27410$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27413      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27414    fi
27415  else
27416    input_to_shortpath="$new_path"
27417  fi
27418
27419  # Call helper function which possibly converts this using DOS-style short mode.
27420  # If so, the updated path is stored in $new_path.
27421  new_path="$input_to_shortpath"
27422
27423  input_path="$input_to_shortpath"
27424  # Check if we need to convert this using DOS-style short mode. If the path
27425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27426  # take no chances and rewrite it.
27427  # Note: m4 eats our [], so we need to use [ and ] instead.
27428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27429  if test "x$has_forbidden_chars" != x; then
27430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27434      # Going to short mode and back again did indeed matter. Since short mode is
27435      # case insensitive, let's make it lowercase to improve readability.
27436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27437      # Now convert it back to Unix-stile (cygpath)
27438      input_path=`$CYGPATH -u "$shortmode_path"`
27439      new_path="$input_path"
27440    fi
27441  fi
27442
27443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27444  if test "x$test_cygdrive_prefix" = x; then
27445    # As a simple fix, exclude /usr/bin since it's not a real path.
27446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27448      # a path prefixed by /cygdrive for fixpath to work.
27449      new_path="$CYGWIN_ROOT_PATH$input_path"
27450    fi
27451  fi
27452
27453  # remove trailing .exe if any
27454  new_path="${new_path/%.exe/}"
27455
27456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27457
27458  # First separate the path from the arguments. This will split at the first
27459  # space.
27460  complete="$OBJCOPY"
27461  path="${complete%% *}"
27462  tmp="$complete EOL"
27463  arguments="${tmp#* }"
27464
27465  # Input might be given as Windows format, start by converting to
27466  # unix format.
27467  new_path="$path"
27468
27469  windows_path="$new_path"
27470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27471    unix_path=`$CYGPATH -u "$windows_path"`
27472    new_path="$unix_path"
27473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27475    new_path="$unix_path"
27476  fi
27477
27478
27479  # Now try to locate executable using which
27480  new_path=`$WHICH "$new_path" 2> /dev/null`
27481
27482  if test "x$new_path" = x; then
27483    # Oops. Which didn't find the executable.
27484    # The splitting of arguments from the executable at a space might have been incorrect,
27485    # since paths with space are more likely in Windows. Give it another try with the whole
27486    # argument.
27487    path="$complete"
27488    arguments="EOL"
27489    new_path="$path"
27490
27491  windows_path="$new_path"
27492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27493    unix_path=`$CYGPATH -u "$windows_path"`
27494    new_path="$unix_path"
27495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27497    new_path="$unix_path"
27498  fi
27499
27500
27501    new_path=`$WHICH "$new_path" 2> /dev/null`
27502
27503    if test "x$new_path" = x; then
27504      # It's still not found. Now this is an unrecoverable error.
27505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27506$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27507      has_space=`$ECHO "$complete" | $GREP " "`
27508      if test "x$has_space" != x; then
27509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27511      fi
27512      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27513    fi
27514  fi
27515
27516  # Now new_path has a complete unix path to the binary
27517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27518    # Keep paths in /bin as-is, but remove trailing .exe if any
27519    new_path="${new_path/%.exe/}"
27520    # Do not save /bin paths to all_fixpath_prefixes!
27521  else
27522    # Not in mixed or Windows style, start by that.
27523    new_path=`cmd //c echo $new_path`
27524
27525  input_path="$new_path"
27526  # Check if we need to convert this using DOS-style short mode. If the path
27527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27528  # take no chances and rewrite it.
27529  # Note: m4 eats our [], so we need to use [ and ] instead.
27530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27531  if test "x$has_forbidden_chars" != x; then
27532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27534  fi
27535
27536    # Output is in $new_path
27537
27538  windows_path="$new_path"
27539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27540    unix_path=`$CYGPATH -u "$windows_path"`
27541    new_path="$unix_path"
27542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27544    new_path="$unix_path"
27545  fi
27546
27547    # remove trailing .exe if any
27548    new_path="${new_path/%.exe/}"
27549
27550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27552  fi
27553
27554  else
27555    # We're on a posix platform. Hooray! :)
27556    # First separate the path from the arguments. This will split at the first
27557    # space.
27558    complete="$OBJCOPY"
27559    path="${complete%% *}"
27560    tmp="$complete EOL"
27561    arguments="${tmp#* }"
27562
27563    # Cannot rely on the command "which" here since it doesn't always work.
27564    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27565    if test -z "$is_absolute_path"; then
27566      # Path to executable is not absolute. Find it.
27567      IFS_save="$IFS"
27568      IFS=:
27569      for p in $PATH; do
27570        if test -f "$p/$path" && test -x "$p/$path"; then
27571          new_path="$p/$path"
27572          break
27573        fi
27574      done
27575      IFS="$IFS_save"
27576    else
27577      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27578$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27579      new_path="$path"
27580    fi
27581
27582    if test "x$new_path" = x; then
27583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27584$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27585        has_space=`$ECHO "$complete" | $GREP " "`
27586        if test "x$has_space" != x; then
27587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27589        fi
27590        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27591      fi
27592  fi
27593
27594      # Now join together the path and the arguments once again
27595      if test "x$arguments" != xEOL; then
27596        new_complete="$new_path ${arguments% *}"
27597      else
27598        new_complete="$new_path"
27599      fi
27600
27601  if test "x$complete" != "x$new_complete"; then
27602      OBJCOPY="$new_complete"
27603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27604$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27605    fi
27606
27607    fi
27608fi
27609
27610if test -n "$ac_tool_prefix"; then
27611  for ac_prog in gobjdump objdump
27612  do
27613    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27614set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27616$as_echo_n "checking for $ac_word... " >&6; }
27617if ${ac_cv_prog_OBJDUMP+:} false; then :
27618  $as_echo_n "(cached) " >&6
27619else
27620  if test -n "$OBJDUMP"; then
27621  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27622else
27623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27624for as_dir in $PATH
27625do
27626  IFS=$as_save_IFS
27627  test -z "$as_dir" && as_dir=.
27628    for ac_exec_ext in '' $ac_executable_extensions; do
27629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27630    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27632    break 2
27633  fi
27634done
27635  done
27636IFS=$as_save_IFS
27637
27638fi
27639fi
27640OBJDUMP=$ac_cv_prog_OBJDUMP
27641if test -n "$OBJDUMP"; then
27642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27643$as_echo "$OBJDUMP" >&6; }
27644else
27645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27646$as_echo "no" >&6; }
27647fi
27648
27649
27650    test -n "$OBJDUMP" && break
27651  done
27652fi
27653if test -z "$OBJDUMP"; then
27654  ac_ct_OBJDUMP=$OBJDUMP
27655  for ac_prog in gobjdump objdump
27656do
27657  # Extract the first word of "$ac_prog", so it can be a program name with args.
27658set dummy $ac_prog; ac_word=$2
27659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27660$as_echo_n "checking for $ac_word... " >&6; }
27661if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27662  $as_echo_n "(cached) " >&6
27663else
27664  if test -n "$ac_ct_OBJDUMP"; then
27665  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27666else
27667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27668for as_dir in $PATH
27669do
27670  IFS=$as_save_IFS
27671  test -z "$as_dir" && as_dir=.
27672    for ac_exec_ext in '' $ac_executable_extensions; do
27673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27674    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27676    break 2
27677  fi
27678done
27679  done
27680IFS=$as_save_IFS
27681
27682fi
27683fi
27684ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27685if test -n "$ac_ct_OBJDUMP"; then
27686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27687$as_echo "$ac_ct_OBJDUMP" >&6; }
27688else
27689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27690$as_echo "no" >&6; }
27691fi
27692
27693
27694  test -n "$ac_ct_OBJDUMP" && break
27695done
27696
27697  if test "x$ac_ct_OBJDUMP" = x; then
27698    OBJDUMP=""
27699  else
27700    case $cross_compiling:$ac_tool_warned in
27701yes:)
27702{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27703$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27704ac_tool_warned=yes ;;
27705esac
27706    OBJDUMP=$ac_ct_OBJDUMP
27707  fi
27708fi
27709
27710if test "x$OBJDUMP" != x; then
27711  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27712
27713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27714
27715  # First separate the path from the arguments. This will split at the first
27716  # space.
27717  complete="$OBJDUMP"
27718  path="${complete%% *}"
27719  tmp="$complete EOL"
27720  arguments="${tmp#* }"
27721
27722  # Input might be given as Windows format, start by converting to
27723  # unix format.
27724  new_path=`$CYGPATH -u "$path"`
27725
27726  # Now try to locate executable using which
27727  new_path=`$WHICH "$new_path" 2> /dev/null`
27728  # bat and cmd files are not always considered executable in cygwin causing which
27729  # to not find them
27730  if test "x$new_path" = x \
27731           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27732           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27733    new_path=`$CYGPATH -u "$path"`
27734  fi
27735  if test "x$new_path" = x; then
27736    # Oops. Which didn't find the executable.
27737    # The splitting of arguments from the executable at a space might have been incorrect,
27738    # since paths with space are more likely in Windows. Give it another try with the whole
27739    # argument.
27740    path="$complete"
27741    arguments="EOL"
27742    new_path=`$CYGPATH -u "$path"`
27743    new_path=`$WHICH "$new_path" 2> /dev/null`
27744    # bat and cmd files are not always considered executable in cygwin causing which
27745    # to not find them
27746    if test "x$new_path" = x \
27747             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27748             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27749      new_path=`$CYGPATH -u "$path"`
27750    fi
27751    if test "x$new_path" = x; then
27752      # It's still not found. Now this is an unrecoverable error.
27753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27754$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27755      has_space=`$ECHO "$complete" | $GREP " "`
27756      if test "x$has_space" != x; then
27757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27759      fi
27760      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27761    fi
27762  fi
27763
27764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27767  # "foo.exe" is OK but "foo" is an error.
27768  #
27769  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27770  # It is also a way to make sure we got the proper file name for the real test later on.
27771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27772  if test "x$test_shortpath" = x; then
27773    # Short path failed, file does not exist as specified.
27774    # Try adding .exe or .cmd
27775    if test -f "${new_path}.exe"; then
27776       input_to_shortpath="${new_path}.exe"
27777    elif test -f "${new_path}.cmd"; then
27778       input_to_shortpath="${new_path}.cmd"
27779    else
27780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27781$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27782      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27783$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27784      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27785    fi
27786  else
27787    input_to_shortpath="$new_path"
27788  fi
27789
27790  # Call helper function which possibly converts this using DOS-style short mode.
27791  # If so, the updated path is stored in $new_path.
27792  new_path="$input_to_shortpath"
27793
27794  input_path="$input_to_shortpath"
27795  # Check if we need to convert this using DOS-style short mode. If the path
27796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27797  # take no chances and rewrite it.
27798  # Note: m4 eats our [], so we need to use [ and ] instead.
27799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27800  if test "x$has_forbidden_chars" != x; then
27801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27805      # Going to short mode and back again did indeed matter. Since short mode is
27806      # case insensitive, let's make it lowercase to improve readability.
27807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27808      # Now convert it back to Unix-stile (cygpath)
27809      input_path=`$CYGPATH -u "$shortmode_path"`
27810      new_path="$input_path"
27811    fi
27812  fi
27813
27814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27815  if test "x$test_cygdrive_prefix" = x; then
27816    # As a simple fix, exclude /usr/bin since it's not a real path.
27817    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27819      # a path prefixed by /cygdrive for fixpath to work.
27820      new_path="$CYGWIN_ROOT_PATH$input_path"
27821    fi
27822  fi
27823
27824  # remove trailing .exe if any
27825  new_path="${new_path/%.exe/}"
27826
27827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27828
27829  # First separate the path from the arguments. This will split at the first
27830  # space.
27831  complete="$OBJDUMP"
27832  path="${complete%% *}"
27833  tmp="$complete EOL"
27834  arguments="${tmp#* }"
27835
27836  # Input might be given as Windows format, start by converting to
27837  # unix format.
27838  new_path="$path"
27839
27840  windows_path="$new_path"
27841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27842    unix_path=`$CYGPATH -u "$windows_path"`
27843    new_path="$unix_path"
27844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27846    new_path="$unix_path"
27847  fi
27848
27849
27850  # Now try to locate executable using which
27851  new_path=`$WHICH "$new_path" 2> /dev/null`
27852
27853  if test "x$new_path" = x; then
27854    # Oops. Which didn't find the executable.
27855    # The splitting of arguments from the executable at a space might have been incorrect,
27856    # since paths with space are more likely in Windows. Give it another try with the whole
27857    # argument.
27858    path="$complete"
27859    arguments="EOL"
27860    new_path="$path"
27861
27862  windows_path="$new_path"
27863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27864    unix_path=`$CYGPATH -u "$windows_path"`
27865    new_path="$unix_path"
27866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27868    new_path="$unix_path"
27869  fi
27870
27871
27872    new_path=`$WHICH "$new_path" 2> /dev/null`
27873
27874    if test "x$new_path" = x; then
27875      # It's still not found. Now this is an unrecoverable error.
27876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27877$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27878      has_space=`$ECHO "$complete" | $GREP " "`
27879      if test "x$has_space" != x; then
27880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27882      fi
27883      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27884    fi
27885  fi
27886
27887  # Now new_path has a complete unix path to the binary
27888  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27889    # Keep paths in /bin as-is, but remove trailing .exe if any
27890    new_path="${new_path/%.exe/}"
27891    # Do not save /bin paths to all_fixpath_prefixes!
27892  else
27893    # Not in mixed or Windows style, start by that.
27894    new_path=`cmd //c echo $new_path`
27895
27896  input_path="$new_path"
27897  # Check if we need to convert this using DOS-style short mode. If the path
27898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27899  # take no chances and rewrite it.
27900  # Note: m4 eats our [], so we need to use [ and ] instead.
27901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27902  if test "x$has_forbidden_chars" != x; then
27903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27905  fi
27906
27907    # Output is in $new_path
27908
27909  windows_path="$new_path"
27910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27911    unix_path=`$CYGPATH -u "$windows_path"`
27912    new_path="$unix_path"
27913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27915    new_path="$unix_path"
27916  fi
27917
27918    # remove trailing .exe if any
27919    new_path="${new_path/%.exe/}"
27920
27921    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27922    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27923  fi
27924
27925  else
27926    # We're on a posix platform. Hooray! :)
27927    # First separate the path from the arguments. This will split at the first
27928    # space.
27929    complete="$OBJDUMP"
27930    path="${complete%% *}"
27931    tmp="$complete EOL"
27932    arguments="${tmp#* }"
27933
27934    # Cannot rely on the command "which" here since it doesn't always work.
27935    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27936    if test -z "$is_absolute_path"; then
27937      # Path to executable is not absolute. Find it.
27938      IFS_save="$IFS"
27939      IFS=:
27940      for p in $PATH; do
27941        if test -f "$p/$path" && test -x "$p/$path"; then
27942          new_path="$p/$path"
27943          break
27944        fi
27945      done
27946      IFS="$IFS_save"
27947    else
27948      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27949$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27950      new_path="$path"
27951    fi
27952
27953    if test "x$new_path" = x; then
27954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27955$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27956        has_space=`$ECHO "$complete" | $GREP " "`
27957        if test "x$has_space" != x; then
27958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27960        fi
27961        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27962      fi
27963  fi
27964
27965      # Now join together the path and the arguments once again
27966      if test "x$arguments" != xEOL; then
27967        new_complete="$new_path ${arguments% *}"
27968      else
27969        new_complete="$new_path"
27970      fi
27971
27972  if test "x$complete" != "x$new_complete"; then
27973      OBJDUMP="$new_complete"
27974      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27975$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27976    fi
27977
27978fi
27979
27980if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27981   # Extract the first word of "lipo", so it can be a program name with args.
27982set dummy lipo; ac_word=$2
27983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27984$as_echo_n "checking for $ac_word... " >&6; }
27985if ${ac_cv_path_LIPO+:} false; then :
27986  $as_echo_n "(cached) " >&6
27987else
27988  case $LIPO in
27989  [\\/]* | ?:[\\/]*)
27990  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27991  ;;
27992  *)
27993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27994for as_dir in $PATH
27995do
27996  IFS=$as_save_IFS
27997  test -z "$as_dir" && as_dir=.
27998    for ac_exec_ext in '' $ac_executable_extensions; do
27999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28000    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28002    break 2
28003  fi
28004done
28005  done
28006IFS=$as_save_IFS
28007
28008  ;;
28009esac
28010fi
28011LIPO=$ac_cv_path_LIPO
28012if test -n "$LIPO"; then
28013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28014$as_echo "$LIPO" >&6; }
28015else
28016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28017$as_echo "no" >&6; }
28018fi
28019
28020
28021
28022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28023
28024  # First separate the path from the arguments. This will split at the first
28025  # space.
28026  complete="$LIPO"
28027  path="${complete%% *}"
28028  tmp="$complete EOL"
28029  arguments="${tmp#* }"
28030
28031  # Input might be given as Windows format, start by converting to
28032  # unix format.
28033  new_path=`$CYGPATH -u "$path"`
28034
28035  # Now try to locate executable using which
28036  new_path=`$WHICH "$new_path" 2> /dev/null`
28037  # bat and cmd files are not always considered executable in cygwin causing which
28038  # to not find them
28039  if test "x$new_path" = x \
28040           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28041           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28042    new_path=`$CYGPATH -u "$path"`
28043  fi
28044  if test "x$new_path" = x; then
28045    # Oops. Which didn't find the executable.
28046    # The splitting of arguments from the executable at a space might have been incorrect,
28047    # since paths with space are more likely in Windows. Give it another try with the whole
28048    # argument.
28049    path="$complete"
28050    arguments="EOL"
28051    new_path=`$CYGPATH -u "$path"`
28052    new_path=`$WHICH "$new_path" 2> /dev/null`
28053    # bat and cmd files are not always considered executable in cygwin causing which
28054    # to not find them
28055    if test "x$new_path" = x \
28056             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28057             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28058      new_path=`$CYGPATH -u "$path"`
28059    fi
28060    if test "x$new_path" = x; then
28061      # It's still not found. Now this is an unrecoverable error.
28062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28063$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28064      has_space=`$ECHO "$complete" | $GREP " "`
28065      if test "x$has_space" != x; then
28066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28068      fi
28069      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28070    fi
28071  fi
28072
28073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28076  # "foo.exe" is OK but "foo" is an error.
28077  #
28078  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28079  # It is also a way to make sure we got the proper file name for the real test later on.
28080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28081  if test "x$test_shortpath" = x; then
28082    # Short path failed, file does not exist as specified.
28083    # Try adding .exe or .cmd
28084    if test -f "${new_path}.exe"; then
28085       input_to_shortpath="${new_path}.exe"
28086    elif test -f "${new_path}.cmd"; then
28087       input_to_shortpath="${new_path}.cmd"
28088    else
28089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28090$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28093      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28094    fi
28095  else
28096    input_to_shortpath="$new_path"
28097  fi
28098
28099  # Call helper function which possibly converts this using DOS-style short mode.
28100  # If so, the updated path is stored in $new_path.
28101  new_path="$input_to_shortpath"
28102
28103  input_path="$input_to_shortpath"
28104  # Check if we need to convert this using DOS-style short mode. If the path
28105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28106  # take no chances and rewrite it.
28107  # Note: m4 eats our [], so we need to use [ and ] instead.
28108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28109  if test "x$has_forbidden_chars" != x; then
28110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28114      # Going to short mode and back again did indeed matter. Since short mode is
28115      # case insensitive, let's make it lowercase to improve readability.
28116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28117      # Now convert it back to Unix-stile (cygpath)
28118      input_path=`$CYGPATH -u "$shortmode_path"`
28119      new_path="$input_path"
28120    fi
28121  fi
28122
28123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28124  if test "x$test_cygdrive_prefix" = x; then
28125    # As a simple fix, exclude /usr/bin since it's not a real path.
28126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28128      # a path prefixed by /cygdrive for fixpath to work.
28129      new_path="$CYGWIN_ROOT_PATH$input_path"
28130    fi
28131  fi
28132
28133  # remove trailing .exe if any
28134  new_path="${new_path/%.exe/}"
28135
28136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28137
28138  # First separate the path from the arguments. This will split at the first
28139  # space.
28140  complete="$LIPO"
28141  path="${complete%% *}"
28142  tmp="$complete EOL"
28143  arguments="${tmp#* }"
28144
28145  # Input might be given as Windows format, start by converting to
28146  # unix format.
28147  new_path="$path"
28148
28149  windows_path="$new_path"
28150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28151    unix_path=`$CYGPATH -u "$windows_path"`
28152    new_path="$unix_path"
28153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28155    new_path="$unix_path"
28156  fi
28157
28158
28159  # Now try to locate executable using which
28160  new_path=`$WHICH "$new_path" 2> /dev/null`
28161
28162  if test "x$new_path" = x; then
28163    # Oops. Which didn't find the executable.
28164    # The splitting of arguments from the executable at a space might have been incorrect,
28165    # since paths with space are more likely in Windows. Give it another try with the whole
28166    # argument.
28167    path="$complete"
28168    arguments="EOL"
28169    new_path="$path"
28170
28171  windows_path="$new_path"
28172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28173    unix_path=`$CYGPATH -u "$windows_path"`
28174    new_path="$unix_path"
28175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28177    new_path="$unix_path"
28178  fi
28179
28180
28181    new_path=`$WHICH "$new_path" 2> /dev/null`
28182
28183    if test "x$new_path" = x; then
28184      # It's still not found. Now this is an unrecoverable error.
28185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28186$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28187      has_space=`$ECHO "$complete" | $GREP " "`
28188      if test "x$has_space" != x; then
28189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28191      fi
28192      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28193    fi
28194  fi
28195
28196  # Now new_path has a complete unix path to the binary
28197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28198    # Keep paths in /bin as-is, but remove trailing .exe if any
28199    new_path="${new_path/%.exe/}"
28200    # Do not save /bin paths to all_fixpath_prefixes!
28201  else
28202    # Not in mixed or Windows style, start by that.
28203    new_path=`cmd //c echo $new_path`
28204
28205  input_path="$new_path"
28206  # Check if we need to convert this using DOS-style short mode. If the path
28207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28208  # take no chances and rewrite it.
28209  # Note: m4 eats our [], so we need to use [ and ] instead.
28210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28211  if test "x$has_forbidden_chars" != x; then
28212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28214  fi
28215
28216    # Output is in $new_path
28217
28218  windows_path="$new_path"
28219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28220    unix_path=`$CYGPATH -u "$windows_path"`
28221    new_path="$unix_path"
28222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28224    new_path="$unix_path"
28225  fi
28226
28227    # remove trailing .exe if any
28228    new_path="${new_path/%.exe/}"
28229
28230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28232  fi
28233
28234  else
28235    # We're on a posix platform. Hooray! :)
28236    # First separate the path from the arguments. This will split at the first
28237    # space.
28238    complete="$LIPO"
28239    path="${complete%% *}"
28240    tmp="$complete EOL"
28241    arguments="${tmp#* }"
28242
28243    # Cannot rely on the command "which" here since it doesn't always work.
28244    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28245    if test -z "$is_absolute_path"; then
28246      # Path to executable is not absolute. Find it.
28247      IFS_save="$IFS"
28248      IFS=:
28249      for p in $PATH; do
28250        if test -f "$p/$path" && test -x "$p/$path"; then
28251          new_path="$p/$path"
28252          break
28253        fi
28254      done
28255      IFS="$IFS_save"
28256    else
28257      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28258$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28259      new_path="$path"
28260    fi
28261
28262    if test "x$new_path" = x; then
28263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28264$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28265        has_space=`$ECHO "$complete" | $GREP " "`
28266        if test "x$has_space" != x; then
28267          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28269        fi
28270        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28271      fi
28272  fi
28273
28274      # Now join together the path and the arguments once again
28275      if test "x$arguments" != xEOL; then
28276        new_complete="$new_path ${arguments% *}"
28277      else
28278        new_complete="$new_path"
28279      fi
28280
28281  if test "x$complete" != "x$new_complete"; then
28282      LIPO="$new_complete"
28283      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28284$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28285    fi
28286
28287fi
28288
28289
28290
28291# Restore old path without tools dir
28292PATH="$OLD_PATH"
28293
28294
28295# FIXME: Currently we must test this after paths but before flags. Fix!
28296
28297# And we can test some aspects on the target using configure macros.
28298
28299
28300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28301$as_echo_n "checking for ANSI C header files... " >&6; }
28302if ${ac_cv_header_stdc+:} false; then :
28303  $as_echo_n "(cached) " >&6
28304else
28305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28306/* end confdefs.h.  */
28307#include <stdlib.h>
28308#include <stdarg.h>
28309#include <string.h>
28310#include <float.h>
28311
28312int
28313main ()
28314{
28315
28316  ;
28317  return 0;
28318}
28319_ACEOF
28320if ac_fn_cxx_try_compile "$LINENO"; then :
28321  ac_cv_header_stdc=yes
28322else
28323  ac_cv_header_stdc=no
28324fi
28325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28326
28327if test $ac_cv_header_stdc = yes; then
28328  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28330/* end confdefs.h.  */
28331#include <string.h>
28332
28333_ACEOF
28334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28335  $EGREP "memchr" >/dev/null 2>&1; then :
28336
28337else
28338  ac_cv_header_stdc=no
28339fi
28340rm -f conftest*
28341
28342fi
28343
28344if test $ac_cv_header_stdc = yes; then
28345  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28347/* end confdefs.h.  */
28348#include <stdlib.h>
28349
28350_ACEOF
28351if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28352  $EGREP "free" >/dev/null 2>&1; then :
28353
28354else
28355  ac_cv_header_stdc=no
28356fi
28357rm -f conftest*
28358
28359fi
28360
28361if test $ac_cv_header_stdc = yes; then
28362  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28363  if test "$cross_compiling" = yes; then :
28364  :
28365else
28366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28367/* end confdefs.h.  */
28368#include <ctype.h>
28369#include <stdlib.h>
28370#if ((' ' & 0x0FF) == 0x020)
28371# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28372# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28373#else
28374# define ISLOWER(c) \
28375		   (('a' <= (c) && (c) <= 'i') \
28376		     || ('j' <= (c) && (c) <= 'r') \
28377		     || ('s' <= (c) && (c) <= 'z'))
28378# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28379#endif
28380
28381#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28382int
28383main ()
28384{
28385  int i;
28386  for (i = 0; i < 256; i++)
28387    if (XOR (islower (i), ISLOWER (i))
28388	|| toupper (i) != TOUPPER (i))
28389      return 2;
28390  return 0;
28391}
28392_ACEOF
28393if ac_fn_cxx_try_run "$LINENO"; then :
28394
28395else
28396  ac_cv_header_stdc=no
28397fi
28398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28399  conftest.$ac_objext conftest.beam conftest.$ac_ext
28400fi
28401
28402fi
28403fi
28404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28405$as_echo "$ac_cv_header_stdc" >&6; }
28406if test $ac_cv_header_stdc = yes; then
28407
28408$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28409
28410fi
28411
28412# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28413for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28414		  inttypes.h stdint.h unistd.h
28415do :
28416  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28417ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28418"
28419if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28420  cat >>confdefs.h <<_ACEOF
28421#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28422_ACEOF
28423
28424fi
28425
28426done
28427
28428
28429
28430###############################################################################
28431#
28432# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28433# (The JVM can use 32 or 64 bit Java pointers but that decision
28434# is made at runtime.)
28435#
28436
28437if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28438  # Always specify -m flags on Solaris
28439
28440  # When we add flags to the "official" CFLAGS etc, we need to
28441  # keep track of these additions in ADDED_CFLAGS etc. These
28442  # will later be checked to make sure only controlled additions
28443  # have been made to CFLAGS etc.
28444  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28445  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28446  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28447
28448  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28449  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28450  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28451
28452  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28453  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28454  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28455
28456elif test "x$COMPILE_TYPE" = xreduced; then
28457  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28458    # Specify -m if running reduced on other Posix platforms
28459
28460  # When we add flags to the "official" CFLAGS etc, we need to
28461  # keep track of these additions in ADDED_CFLAGS etc. These
28462  # will later be checked to make sure only controlled additions
28463  # have been made to CFLAGS etc.
28464  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28465  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28466  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28467
28468  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28469  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28470  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28471
28472  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28473  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28474  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28475
28476  fi
28477fi
28478
28479# Make compilation sanity check
28480for ac_header in stdio.h
28481do :
28482  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28483if test "x$ac_cv_header_stdio_h" = xyes; then :
28484  cat >>confdefs.h <<_ACEOF
28485#define HAVE_STDIO_H 1
28486_ACEOF
28487
28488else
28489
28490  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28491$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28492  if test "x$COMPILE_TYPE" = xreduced; then
28493    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28494$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28495  elif test "x$COMPILE_TYPE" = xcross; then
28496    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28497$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28498  fi
28499  as_fn_error $? "Cannot continue." "$LINENO" 5
28500
28501fi
28502
28503done
28504
28505
28506# The cast to long int works around a bug in the HP C Compiler
28507# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28508# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28509# This bug is HP SR number 8606223364.
28510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28511$as_echo_n "checking size of int *... " >&6; }
28512if ${ac_cv_sizeof_int_p+:} false; then :
28513  $as_echo_n "(cached) " >&6
28514else
28515  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28516
28517else
28518  if test "$ac_cv_type_int_p" = yes; then
28519     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28521as_fn_error 77 "cannot compute sizeof (int *)
28522See \`config.log' for more details" "$LINENO" 5; }
28523   else
28524     ac_cv_sizeof_int_p=0
28525   fi
28526fi
28527
28528fi
28529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28530$as_echo "$ac_cv_sizeof_int_p" >&6; }
28531
28532
28533
28534cat >>confdefs.h <<_ACEOF
28535#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28536_ACEOF
28537
28538
28539
28540if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28541  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28542  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28543fi
28544
28545if test "x$SIZEOF_INT_P" = x; then
28546    # The test failed, lets stick to the assumed value.
28547    { $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
28548$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28549else
28550    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28551
28552    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28553        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
28554    fi
28555fi
28556
28557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28558$as_echo_n "checking for target address size... " >&6; }
28559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28560$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28561
28562
28563###############################################################################
28564#
28565# Is the target little of big endian?
28566#
28567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28568$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28569if ${ac_cv_c_bigendian+:} false; then :
28570  $as_echo_n "(cached) " >&6
28571else
28572  ac_cv_c_bigendian=unknown
28573    # See if we're dealing with a universal compiler.
28574    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28575/* end confdefs.h.  */
28576#ifndef __APPLE_CC__
28577	       not a universal capable compiler
28578	     #endif
28579	     typedef int dummy;
28580
28581_ACEOF
28582if ac_fn_cxx_try_compile "$LINENO"; then :
28583
28584	# Check for potential -arch flags.  It is not universal unless
28585	# there are at least two -arch flags with different values.
28586	ac_arch=
28587	ac_prev=
28588	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28589	 if test -n "$ac_prev"; then
28590	   case $ac_word in
28591	     i?86 | x86_64 | ppc | ppc64)
28592	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28593		 ac_arch=$ac_word
28594	       else
28595		 ac_cv_c_bigendian=universal
28596		 break
28597	       fi
28598	       ;;
28599	   esac
28600	   ac_prev=
28601	 elif test "x$ac_word" = "x-arch"; then
28602	   ac_prev=arch
28603	 fi
28604       done
28605fi
28606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28607    if test $ac_cv_c_bigendian = unknown; then
28608      # See if sys/param.h defines the BYTE_ORDER macro.
28609      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28610/* end confdefs.h.  */
28611#include <sys/types.h>
28612	     #include <sys/param.h>
28613
28614int
28615main ()
28616{
28617#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28618		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28619		     && LITTLE_ENDIAN)
28620	      bogus endian macros
28621	     #endif
28622
28623  ;
28624  return 0;
28625}
28626_ACEOF
28627if ac_fn_cxx_try_compile "$LINENO"; then :
28628  # It does; now see whether it defined to BIG_ENDIAN or not.
28629	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28630/* end confdefs.h.  */
28631#include <sys/types.h>
28632		#include <sys/param.h>
28633
28634int
28635main ()
28636{
28637#if BYTE_ORDER != BIG_ENDIAN
28638		 not big endian
28639		#endif
28640
28641  ;
28642  return 0;
28643}
28644_ACEOF
28645if ac_fn_cxx_try_compile "$LINENO"; then :
28646  ac_cv_c_bigendian=yes
28647else
28648  ac_cv_c_bigendian=no
28649fi
28650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28651fi
28652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28653    fi
28654    if test $ac_cv_c_bigendian = unknown; then
28655      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28656      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28657/* end confdefs.h.  */
28658#include <limits.h>
28659
28660int
28661main ()
28662{
28663#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28664	      bogus endian macros
28665	     #endif
28666
28667  ;
28668  return 0;
28669}
28670_ACEOF
28671if ac_fn_cxx_try_compile "$LINENO"; then :
28672  # It does; now see whether it defined to _BIG_ENDIAN or not.
28673	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28674/* end confdefs.h.  */
28675#include <limits.h>
28676
28677int
28678main ()
28679{
28680#ifndef _BIG_ENDIAN
28681		 not big endian
28682		#endif
28683
28684  ;
28685  return 0;
28686}
28687_ACEOF
28688if ac_fn_cxx_try_compile "$LINENO"; then :
28689  ac_cv_c_bigendian=yes
28690else
28691  ac_cv_c_bigendian=no
28692fi
28693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28694fi
28695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28696    fi
28697    if test $ac_cv_c_bigendian = unknown; then
28698      # Compile a test program.
28699      if test "$cross_compiling" = yes; then :
28700  # Try to guess by grepping values from an object file.
28701	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28702/* end confdefs.h.  */
28703short int ascii_mm[] =
28704		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28705		short int ascii_ii[] =
28706		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28707		int use_ascii (int i) {
28708		  return ascii_mm[i] + ascii_ii[i];
28709		}
28710		short int ebcdic_ii[] =
28711		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28712		short int ebcdic_mm[] =
28713		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28714		int use_ebcdic (int i) {
28715		  return ebcdic_mm[i] + ebcdic_ii[i];
28716		}
28717		extern int foo;
28718
28719int
28720main ()
28721{
28722return use_ascii (foo) == use_ebcdic (foo);
28723  ;
28724  return 0;
28725}
28726_ACEOF
28727if ac_fn_cxx_try_compile "$LINENO"; then :
28728  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28729	      ac_cv_c_bigendian=yes
28730	    fi
28731	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28732	      if test "$ac_cv_c_bigendian" = unknown; then
28733		ac_cv_c_bigendian=no
28734	      else
28735		# finding both strings is unlikely to happen, but who knows?
28736		ac_cv_c_bigendian=unknown
28737	      fi
28738	    fi
28739fi
28740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28741else
28742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28743/* end confdefs.h.  */
28744$ac_includes_default
28745int
28746main ()
28747{
28748
28749	     /* Are we little or big endian?  From Harbison&Steele.  */
28750	     union
28751	     {
28752	       long int l;
28753	       char c[sizeof (long int)];
28754	     } u;
28755	     u.l = 1;
28756	     return u.c[sizeof (long int) - 1] == 1;
28757
28758  ;
28759  return 0;
28760}
28761_ACEOF
28762if ac_fn_cxx_try_run "$LINENO"; then :
28763  ac_cv_c_bigendian=no
28764else
28765  ac_cv_c_bigendian=yes
28766fi
28767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28768  conftest.$ac_objext conftest.beam conftest.$ac_ext
28769fi
28770
28771    fi
28772fi
28773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28774$as_echo "$ac_cv_c_bigendian" >&6; }
28775 case $ac_cv_c_bigendian in #(
28776   yes)
28777     ENDIAN="big";; #(
28778   no)
28779     ENDIAN="little" ;; #(
28780   universal)
28781     ENDIAN="universal_endianness"
28782     ;; #(
28783   *)
28784     ENDIAN="unknown" ;;
28785 esac
28786
28787
28788if test "x$ENDIAN" = xuniversal_endianness; then
28789    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28790fi
28791if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28792    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
28793fi
28794
28795
28796# Configure flags for the tools
28797
28798
28799###############################################################################
28800#
28801# How to compile shared libraries.
28802#
28803
28804if test "x$GCC" = xyes; then
28805    COMPILER_NAME=gcc
28806    PICFLAG="-fPIC"
28807    LIBRARY_PREFIX=lib
28808    SHARED_LIBRARY='lib$1.so'
28809    STATIC_LIBRARY='lib$1.a'
28810    SHARED_LIBRARY_FLAGS="-shared"
28811    SHARED_LIBRARY_SUFFIX='.so'
28812    STATIC_LIBRARY_SUFFIX='.a'
28813    OBJ_SUFFIX='.o'
28814    EXE_SUFFIX=''
28815    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28816    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28817    C_FLAG_REORDER=''
28818    CXX_FLAG_REORDER=''
28819    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28820    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28821    LD="$CC"
28822    LDEXE="$CC"
28823    LDCXX="$CXX"
28824    LDEXECXX="$CXX"
28825    POST_STRIP_CMD="$STRIP -g"
28826
28827    # Linking is different on MacOSX
28828    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28829        # Might change in the future to clang.
28830        COMPILER_NAME=gcc
28831        SHARED_LIBRARY='lib$1.dylib'
28832        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28833        SHARED_LIBRARY_SUFFIX='.dylib'
28834        EXE_SUFFIX=''
28835        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28836        SET_SHARED_LIBRARY_MAPFILE=''
28837        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28838        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28839        POST_STRIP_CMD="$STRIP -S"
28840    fi
28841else
28842    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28843        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28844        COMPILER_NAME=ossc
28845        PICFLAG="-KPIC"
28846        LIBRARY_PREFIX=lib
28847        SHARED_LIBRARY='lib$1.so'
28848        STATIC_LIBRARY='lib$1.a'
28849        SHARED_LIBRARY_FLAGS="-G"
28850        SHARED_LIBRARY_SUFFIX='.so'
28851        STATIC_LIBRARY_SUFFIX='.a'
28852        OBJ_SUFFIX='.o'
28853        EXE_SUFFIX=''
28854        SET_SHARED_LIBRARY_NAME=''
28855        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28856	C_FLAG_REORDER='-xF'
28857	CXX_FLAG_REORDER='-xF'
28858        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28859        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28860        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28861        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28862        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28863        POST_STRIP_CMD="$STRIP -x"
28864        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28865    fi
28866    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28867        # If it is not gcc, then assume it is the MS Visual Studio compiler
28868        COMPILER_NAME=cl
28869        PICFLAG=""
28870        LIBRARY_PREFIX=
28871        SHARED_LIBRARY='$1.dll'
28872        STATIC_LIBRARY='$1.lib'
28873        SHARED_LIBRARY_FLAGS="-LD"
28874        SHARED_LIBRARY_SUFFIX='.dll'
28875        STATIC_LIBRARY_SUFFIX='.lib'
28876        OBJ_SUFFIX='.obj'
28877        EXE_SUFFIX='.exe'
28878        SET_SHARED_LIBRARY_NAME=''
28879        SET_SHARED_LIBRARY_MAPFILE=''
28880        SET_SHARED_LIBRARY_ORIGIN=''
28881        SET_EXECUTABLE_ORIGIN=''
28882    fi
28883fi
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903# The (cross) compiler is now configured, we can now test capabilities
28904# of the target platform.
28905
28906
28907
28908###############################################################################
28909#
28910# Setup the opt flags for different compilers
28911# and different operating systems.
28912#
28913
28914#
28915# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28916#
28917if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28918    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28919    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28920    CFLAGS="$CFLAGS -mstackrealign"
28921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28922$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28923    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28924/* end confdefs.h.  */
28925int main() { return 0; }
28926_ACEOF
28927if ac_fn_cxx_try_link "$LINENO"; then :
28928
28929		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28930$as_echo "yes" >&6; }
28931
28932else
28933
28934		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28935$as_echo "no" >&6; }
28936	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28937
28938fi
28939rm -f core conftest.err conftest.$ac_objext \
28940    conftest$ac_exeext conftest.$ac_ext
28941fi
28942
28943C_FLAG_DEPS="-MMD -MF"
28944CXX_FLAG_DEPS="-MMD -MF"
28945
28946case $COMPILER_TYPE in
28947  CC )
28948    case $COMPILER_NAME in
28949      gcc )
28950      	case $OPENJDK_TARGET_OS in
28951	  macosx )
28952	    # On MacOSX we optimize for size, something
28953	    # we should do for all platforms?
28954	    C_O_FLAG_HI="-Os"
28955	    C_O_FLAG_NORM="-Os"
28956	    C_O_FLAG_NONE=""
28957	    ;;
28958	  *)
28959	    C_O_FLAG_HI="-O3"
28960	    C_O_FLAG_NORM="-O2"
28961	    C_O_FLAG_NONE="-O0"
28962	    ;;
28963	esac
28964        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28965        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28966        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28967        CFLAGS_DEBUG_SYMBOLS="-g"
28968        CXXFLAGS_DEBUG_SYMBOLS="-g"
28969        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28970            CFLAGS_DEBUG_SYMBOLS="-g1"
28971            CXXFLAGS_DEBUG_SYMBOLS="-g1"
28972        fi
28973        ;;
28974      ossc )
28975        #
28976        # Forte has different names for this with their C++ compiler...
28977        #
28978        C_FLAG_DEPS="-xMMD -xMF"
28979        CXX_FLAG_DEPS="-xMMD -xMF"
28980
28981        # Extra options used with HIGHEST
28982        #
28983        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28984        #          done with care, there are some assumptions below that need to
28985        #          be understood about the use of pointers, and IEEE behavior.
28986        #
28987        # Use non-standard floating point mode (not IEEE 754)
28988        CC_HIGHEST="$CC_HIGHEST -fns"
28989        # Do some simplification of floating point arithmetic (not IEEE 754)
28990        CC_HIGHEST="$CC_HIGHEST -fsimple"
28991        # Use single precision floating point with 'float'
28992        CC_HIGHEST="$CC_HIGHEST -fsingle"
28993        # Assume memory references via basic pointer types do not alias
28994        #   (Source with excessing pointer casting and data access with mixed
28995        #    pointer types are not recommended)
28996        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28997        # Use intrinsic or inline versions for math/std functions
28998        #   (If you expect perfect errno behavior, do not use this)
28999        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29000        # Loop data dependency optimizations (need -xO3 or higher)
29001        CC_HIGHEST="$CC_HIGHEST -xdepend"
29002        # Pointer parameters to functions do not overlap
29003        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29004        #    If you pass in multiple pointers to the same data, do not use this)
29005        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29006        # Inline some library routines
29007        #   (If you expect perfect errno behavior, do not use this)
29008        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29009        # Use optimized math routines
29010        #   (If you expect perfect errno behavior, do not use this)
29011        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29012        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29013
29014        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29015          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29016          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29017        fi
29018
29019        case $OPENJDK_TARGET_CPU_ARCH in
29020          x86)
29021            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29022            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29023            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29024            C_O_FLAG_NONE="-xregs=no%frameptr"
29025            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29026            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29027            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29028            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29029            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29030               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29031               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29032            fi
29033            ;;
29034          sparc)
29035            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29036            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29037            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29038            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29039            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29040            C_O_FLAG_NONE=""
29041            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29042            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29043            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29044            CXX_O_FLAG_NONE=""
29045            ;;
29046        esac
29047
29048    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29049    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29050    esac
29051    ;;
29052  CL )
29053    C_O_FLAG_HIGHEST="-O2"
29054    C_O_FLAG_HI="-O1"
29055    C_O_FLAG_NORM="-O1"
29056    C_O_FLAG_NONE="-Od"
29057    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29058    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29059    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29060    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29061    ;;
29062esac
29063
29064if test -z "$C_O_FLAG_HIGHEST"; then
29065   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29066fi
29067
29068if test -z "$CXX_O_FLAG_HIGHEST"; then
29069   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29070fi
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29086   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29087$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29088fi
29089
29090if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29091   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29092$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29093fi
29094
29095if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29096   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29097$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29098fi
29099
29100
29101# Check whether --with-extra-cflags was given.
29102if test "${with_extra_cflags+set}" = set; then :
29103  withval=$with_extra_cflags;
29104fi
29105
29106
29107
29108# Check whether --with-extra-cxxflags was given.
29109if test "${with_extra_cxxflags+set}" = set; then :
29110  withval=$with_extra_cxxflags;
29111fi
29112
29113
29114
29115# Check whether --with-extra-ldflags was given.
29116if test "${with_extra_ldflags+set}" = set; then :
29117  withval=$with_extra_ldflags;
29118fi
29119
29120
29121CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29122CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29123LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29124
29125# Hotspot needs these set in their legacy form
29126LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29127LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29128LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29129
29130
29131
29132
29133
29134###############################################################################
29135#
29136# Now setup the CFLAGS and LDFLAGS for the JDK build.
29137# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29138#
29139case $COMPILER_NAME in
29140      gcc )
29141      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29142                          -pipe \
29143                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29144	  case $OPENJDK_TARGET_CPU_ARCH in
29145	  arm )
29146            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29147	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29148	  ;;
29149	  ppc )
29150            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29151	  ;;
29152	  * )
29153	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29154	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29155          ;;
29156	  esac
29157          ;;
29158      ossc )
29159          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29160          case $OPENJDK_TARGET_CPU_ARCH in
29161          x86 )
29162            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29163       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29164          ;;
29165          esac
29166
29167      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29168      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29169
29170          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29171          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29172          ;;
29173      cl )
29174          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29175               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29176	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29177	       -DWIN32 -DIAL"
29178          case $OPENJDK_TARGET_CPU in
29179              x86 )
29180                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29181                  ;;
29182              x86_64 )
29183                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29184                  ;;
29185          esac
29186          ;;
29187esac
29188
29189###############################################################################
29190
29191# Adjust flags according to debug level.
29192case $DEBUG_LEVEL in
29193      fastdebug )
29194              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29195              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29196	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29197	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29198	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29199	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29200              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29201              ;;
29202      slowdebug )
29203              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29204              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29205	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29206	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29207	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29208	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29209              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29210              ;;
29211esac
29212
29213CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29214
29215# The package path is used only on macosx?
29216PACKAGE_PATH=/opt/local
29217
29218
29219if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29220    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29221    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29222    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29223    #   Note: -Dmacro         is the same as    #define macro 1
29224    #         -Dmacro=	    is the same as    #define macro
29225    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29226        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29227    else
29228        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29229    fi
29230else
29231    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29232fi
29233if test "x$OPENJDK_TARGET_OS" = xlinux; then
29234    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29235fi
29236if test "x$OPENJDK_TARGET_OS" = xwindows; then
29237    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29238fi
29239if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29240    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29241fi
29242if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29243    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29244    # Setting these parameters makes it an error to link to macosx APIs that are
29245    # newer than the given OS version and makes the linked binaries compatible even
29246    # if built on a newer version of the OS.
29247    # The expected format is X.Y.Z
29248    MACOSX_VERSION_MIN=10.7.0
29249
29250    # The macro takes the version with no dots, ex: 1070
29251    # Let the flags variables get resolved in make for easier override on make
29252    # command line.
29253    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29254    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29255fi
29256if test "x$OPENJDK_TARGET_OS" = xbsd; then
29257    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29258fi
29259if test "x$DEBUG_LEVEL" = xrelease; then
29260    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29261    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29262        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29263    fi
29264else
29265    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29266fi
29267
29268CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29269CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29270
29271CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29272        -I${JDK_OUTPUTDIR}/include \
29273        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29274        -I${JDK_TOPDIR}/src/share/javavm/export \
29275        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29276        -I${JDK_TOPDIR}/src/share/native/common \
29277        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29278
29279# The shared libraries are compiled using the picflag.
29280CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29281CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29282
29283# Executable flags
29284CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29285CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29286
29287# Now this is odd. The JDK native libraries have to link against libjvm.so
29288# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29289# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29290# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29291# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29292# libraries will link to whatever is in memory. Yuck.
29293#
29294# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29295if test "x$COMPILER_NAME" = xcl; then
29296    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29297    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29298        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29299    fi
29300    # TODO: make -debug optional "--disable-full-debug-symbols"
29301    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29302    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29303    LDFLAGS_JDKLIB_SUFFIX=""
29304    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29305        LDFLAGS_STACK_SIZE=1048576
29306    else
29307        LDFLAGS_STACK_SIZE=327680
29308    fi
29309    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29310else
29311    if test "x$COMPILER_NAME" = xgcc; then
29312        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29313        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29314        if test -n "$HAS_GNU_HASH"; then
29315            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29316        fi
29317        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29318          # And since we now know that the linker is gnu, then add -z defs, to forbid
29319          # undefined symbols in object files.
29320          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29321          if test "x$DEBUG_LEVEL" = "xrelease"; then
29322              # When building release libraries, tell the linker optimize them.
29323              # Should this be supplied to the OSS linker as well?
29324              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29325          fi
29326        fi
29327    fi
29328    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29329                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29330
29331    # On some platforms (mac) the linker warns about non existing -L dirs.
29332    # Add server first if available. Linking aginst client does not always produce the same results.
29333    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29334    # Default to server for other variants.
29335    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29336        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29337    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29338        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29339    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29340        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29341    else
29342        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29343    fi
29344
29345    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29346    if test "x$COMPILER_NAME" = xossc; then
29347        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29348    fi
29349
29350    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29351    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29352        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29353    fi
29354fi
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370  # Some Zero and Shark settings.
29371  # ZERO_ARCHFLAG tells the compiler which mode to build for
29372  case "${OPENJDK_TARGET_CPU}" in
29373    s390)
29374      ZERO_ARCHFLAG="-m31"
29375      ;;
29376    *)
29377      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29378  esac
29379
29380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29381$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29382  supports=yes
29383
29384  saved_cflags="$CFLAGS"
29385  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29386  ac_ext=c
29387ac_cpp='$CPP $CPPFLAGS'
29388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29390ac_compiler_gnu=$ac_cv_c_compiler_gnu
29391
29392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29393/* end confdefs.h.  */
29394
29395    int i;
29396
29397_ACEOF
29398if ac_fn_c_try_compile "$LINENO"; then :
29399
29400else
29401  supports=no
29402fi
29403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29404  ac_ext=cpp
29405ac_cpp='$CXXCPP $CPPFLAGS'
29406ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29407ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29408ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29409
29410  CFLAGS="$saved_cflags"
29411
29412  saved_cxxflags="$CXXFLAGS"
29413  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29414  ac_ext=cpp
29415ac_cpp='$CXXCPP $CPPFLAGS'
29416ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29417ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29418ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29419
29420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29421/* end confdefs.h.  */
29422
29423    int i;
29424
29425_ACEOF
29426if ac_fn_cxx_try_compile "$LINENO"; then :
29427
29428else
29429  supports=no
29430fi
29431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29432  ac_ext=cpp
29433ac_cpp='$CXXCPP $CPPFLAGS'
29434ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29435ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29436ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29437
29438  CXXFLAGS="$saved_cxxflags"
29439
29440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29441$as_echo "$supports" >&6; }
29442  if test "x$supports" = "xyes" ; then
29443    :
29444  else
29445    ZERO_ARCHFLAG=""
29446  fi
29447
29448
29449
29450  # Check that the compiler supports -mX flags
29451  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29452
29453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29454$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29455  supports=yes
29456
29457  saved_cflags="$CFLAGS"
29458  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29459  ac_ext=c
29460ac_cpp='$CPP $CPPFLAGS'
29461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29463ac_compiler_gnu=$ac_cv_c_compiler_gnu
29464
29465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29466/* end confdefs.h.  */
29467
29468    int i;
29469
29470_ACEOF
29471if ac_fn_c_try_compile "$LINENO"; then :
29472
29473else
29474  supports=no
29475fi
29476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29477  ac_ext=cpp
29478ac_cpp='$CXXCPP $CPPFLAGS'
29479ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29480ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29481ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29482
29483  CFLAGS="$saved_cflags"
29484
29485  saved_cxxflags="$CXXFLAGS"
29486  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29487  ac_ext=cpp
29488ac_cpp='$CXXCPP $CPPFLAGS'
29489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29492
29493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29494/* end confdefs.h.  */
29495
29496    int i;
29497
29498_ACEOF
29499if ac_fn_cxx_try_compile "$LINENO"; then :
29500
29501else
29502  supports=no
29503fi
29504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29505  ac_ext=cpp
29506ac_cpp='$CXXCPP $CPPFLAGS'
29507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29510
29511  CXXFLAGS="$saved_cxxflags"
29512
29513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29514$as_echo "$supports" >&6; }
29515  if test "x$supports" = "xyes" ; then
29516    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29517  else
29518    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29519  fi
29520
29521
29522
29523
29524# Setup debug symbols (need objcopy from the toolchain for that)
29525
29526#
29527# ENABLE_DEBUG_SYMBOLS
29528# This must be done after the toolchain is setup, since we're looking at objcopy.
29529#
29530# Check whether --enable-debug-symbols was given.
29531if test "${enable_debug_symbols+set}" = set; then :
29532  enableval=$enable_debug_symbols;
29533fi
29534
29535
29536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29537$as_echo_n "checking if we should generate debug symbols... " >&6; }
29538
29539if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29540   # explicit enabling of enable-debug-symbols and can't find objcopy
29541   #   this is an error
29542   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29543fi
29544
29545if test "x$enable_debug_symbols" = "xyes"; then
29546  ENABLE_DEBUG_SYMBOLS=true
29547elif test "x$enable_debug_symbols" = "xno"; then
29548  ENABLE_DEBUG_SYMBOLS=false
29549else
29550  # default on macosx is false
29551  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29552    ENABLE_DEBUG_SYMBOLS=false
29553  # Default is on if objcopy is found, otherwise off
29554  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29555    ENABLE_DEBUG_SYMBOLS=true
29556  else
29557    ENABLE_DEBUG_SYMBOLS=false
29558  fi
29559fi
29560
29561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29562$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29563
29564#
29565# ZIP_DEBUGINFO_FILES
29566#
29567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29568$as_echo_n "checking if we should zip debug-info files... " >&6; }
29569# Check whether --enable-zip-debug-info was given.
29570if test "${enable_zip_debug_info+set}" = set; then :
29571  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29572else
29573  enable_zip_debug_info="yes"
29574fi
29575
29576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29577$as_echo "${enable_zip_debug_info}" >&6; }
29578
29579if test "x${enable_zip_debug_info}" = "xno"; then
29580   ZIP_DEBUGINFO_FILES=false
29581else
29582   ZIP_DEBUGINFO_FILES=true
29583fi
29584
29585
29586
29587
29588
29589
29590
29591###############################################################################
29592#
29593# Check dependencies for external and internal libraries.
29594#
29595###############################################################################
29596
29597
29598
29599###############################################################################
29600#
29601# OS specific settings that we never will need to probe.
29602#
29603if test "x$OPENJDK_TARGET_OS" = xlinux; then
29604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29605$as_echo_n "checking what is not needed on Linux?... " >&6; }
29606    PULSE_NOT_NEEDED=yes
29607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29608$as_echo "pulse" >&6; }
29609fi
29610
29611if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29613$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29614    ALSA_NOT_NEEDED=yes
29615    PULSE_NOT_NEEDED=yes
29616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29617$as_echo "alsa pulse" >&6; }
29618fi
29619
29620if test "x$OPENJDK_TARGET_OS" = xwindows; then
29621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29622$as_echo_n "checking what is not needed on Windows?... " >&6; }
29623    CUPS_NOT_NEEDED=yes
29624    ALSA_NOT_NEEDED=yes
29625    PULSE_NOT_NEEDED=yes
29626    X11_NOT_NEEDED=yes
29627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29628$as_echo "alsa cups pulse x11" >&6; }
29629fi
29630
29631if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29633$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29634    ALSA_NOT_NEEDED=yes
29635    PULSE_NOT_NEEDED=yes
29636    X11_NOT_NEEDED=yes
29637    FREETYPE2_NOT_NEEDED=yes
29638    # If the java runtime framework is disabled, then we need X11.
29639    # This will be adjusted below.
29640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29641$as_echo "alsa pulse x11" >&6; }
29642fi
29643
29644if test "x$OPENJDK_TARGET_OS" = xbsd; then
29645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29646$as_echo_n "checking what is not needed on bsd?... " >&6; }
29647    ALSA_NOT_NEEDED=yes
29648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29649$as_echo "alsa" >&6; }
29650fi
29651
29652if test "x$OPENJDK" = "xfalse"; then
29653    FREETYPE2_NOT_NEEDED=yes
29654fi
29655
29656if test "x$SUPPORT_HEADFUL" = xno; then
29657    X11_NOT_NEEDED=yes
29658fi
29659
29660###############################################################################
29661#
29662# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29663# that uses this API.
29664#
29665# Check whether --enable-macosx-runtime-support was given.
29666if test "${enable_macosx_runtime_support+set}" = set; then :
29667  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29668else
29669  MACOSX_RUNTIME_SUPPORT="no"
29670fi
29671
29672
29673USE_MACOSX_RUNTIME_SUPPORT=no
29674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29675$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29676if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29677    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29678        MACOSX_RUNTIME_SUPPORT=yes
29679        USE_MACOSX_RUNTIME_SUPPORT=yes
29680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29681$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29682    else
29683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29684$as_echo "yes, but explicitly disabled." >&6; }
29685    fi
29686else
29687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29688$as_echo "no" >&6; }
29689fi
29690
29691if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29693$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29694    X11_NOT_NEEDED=
29695    FREETYPE2_NOT_NEEDED=
29696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29697$as_echo "alsa pulse" >&6; }
29698fi
29699
29700
29701
29702###############################################################################
29703#
29704# Check for X Windows
29705#
29706
29707# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29708# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29709# --x-libraries for the sysroot, if that seems to be correct.
29710if test "x$SYS_ROOT" != "x/"; then
29711  if test "x$x_includes" = xNONE; then
29712    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29713      x_includes="$SYS_ROOT/usr/X11R6/include"
29714    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29715      x_includes="$SYS_ROOT/usr/include"
29716    fi
29717  fi
29718  if test "x$x_libraries" = xNONE; then
29719    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29720      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29721    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29722      x_libraries="$SYS_ROOT/usr/lib64"
29723    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29724      x_libraries="$SYS_ROOT/usr/lib"
29725    fi
29726  fi
29727fi
29728
29729# Now let autoconf do it's magic
29730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29731$as_echo_n "checking for X... " >&6; }
29732
29733
29734# Check whether --with-x was given.
29735if test "${with_x+set}" = set; then :
29736  withval=$with_x;
29737fi
29738
29739# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29740if test "x$with_x" = xno; then
29741  # The user explicitly disabled X.
29742  have_x=disabled
29743else
29744  case $x_includes,$x_libraries in #(
29745    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29746    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29747  $as_echo_n "(cached) " >&6
29748else
29749  # One or both of the vars are not set, and there is no cached value.
29750ac_x_includes=no ac_x_libraries=no
29751rm -f -r conftest.dir
29752if mkdir conftest.dir; then
29753  cd conftest.dir
29754  cat >Imakefile <<'_ACEOF'
29755incroot:
29756	@echo incroot='${INCROOT}'
29757usrlibdir:
29758	@echo usrlibdir='${USRLIBDIR}'
29759libdir:
29760	@echo libdir='${LIBDIR}'
29761_ACEOF
29762  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29763    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29764    for ac_var in incroot usrlibdir libdir; do
29765      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29766    done
29767    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29768    for ac_extension in a so sl dylib la dll; do
29769      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29770	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29771	ac_im_usrlibdir=$ac_im_libdir; break
29772      fi
29773    done
29774    # Screen out bogus values from the imake configuration.  They are
29775    # bogus both because they are the default anyway, and because
29776    # using them would break gcc on systems where it needs fixed includes.
29777    case $ac_im_incroot in
29778	/usr/include) ac_x_includes= ;;
29779	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29780    esac
29781    case $ac_im_usrlibdir in
29782	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29783	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29784    esac
29785  fi
29786  cd ..
29787  rm -f -r conftest.dir
29788fi
29789
29790# Standard set of common directories for X headers.
29791# Check X11 before X11Rn because it is often a symlink to the current release.
29792ac_x_header_dirs='
29793/usr/X11/include
29794/usr/X11R7/include
29795/usr/X11R6/include
29796/usr/X11R5/include
29797/usr/X11R4/include
29798
29799/usr/include/X11
29800/usr/include/X11R7
29801/usr/include/X11R6
29802/usr/include/X11R5
29803/usr/include/X11R4
29804
29805/usr/local/X11/include
29806/usr/local/X11R7/include
29807/usr/local/X11R6/include
29808/usr/local/X11R5/include
29809/usr/local/X11R4/include
29810
29811/usr/local/include/X11
29812/usr/local/include/X11R7
29813/usr/local/include/X11R6
29814/usr/local/include/X11R5
29815/usr/local/include/X11R4
29816
29817/usr/X386/include
29818/usr/x386/include
29819/usr/XFree86/include/X11
29820
29821/usr/include
29822/usr/local/include
29823/usr/unsupported/include
29824/usr/athena/include
29825/usr/local/x11r5/include
29826/usr/lpp/Xamples/include
29827
29828/usr/openwin/include
29829/usr/openwin/share/include'
29830
29831if test "$ac_x_includes" = no; then
29832  # Guess where to find include files, by looking for Xlib.h.
29833  # First, try using that file with no special directory specified.
29834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29835/* end confdefs.h.  */
29836#include <X11/Xlib.h>
29837_ACEOF
29838if ac_fn_cxx_try_cpp "$LINENO"; then :
29839  # We can compile using X headers with no special include directory.
29840ac_x_includes=
29841else
29842  for ac_dir in $ac_x_header_dirs; do
29843  if test -r "$ac_dir/X11/Xlib.h"; then
29844    ac_x_includes=$ac_dir
29845    break
29846  fi
29847done
29848fi
29849rm -f conftest.err conftest.i conftest.$ac_ext
29850fi # $ac_x_includes = no
29851
29852if test "$ac_x_libraries" = no; then
29853  # Check for the libraries.
29854  # See if we find them without any special options.
29855  # Don't add to $LIBS permanently.
29856  ac_save_LIBS=$LIBS
29857  LIBS="-lX11 $LIBS"
29858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29859/* end confdefs.h.  */
29860#include <X11/Xlib.h>
29861int
29862main ()
29863{
29864XrmInitialize ()
29865  ;
29866  return 0;
29867}
29868_ACEOF
29869if ac_fn_cxx_try_link "$LINENO"; then :
29870  LIBS=$ac_save_LIBS
29871# We can link X programs with no special library path.
29872ac_x_libraries=
29873else
29874  LIBS=$ac_save_LIBS
29875for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29876do
29877  # Don't even attempt the hair of trying to link an X program!
29878  for ac_extension in a so sl dylib la dll; do
29879    if test -r "$ac_dir/libX11.$ac_extension"; then
29880      ac_x_libraries=$ac_dir
29881      break 2
29882    fi
29883  done
29884done
29885fi
29886rm -f core conftest.err conftest.$ac_objext \
29887    conftest$ac_exeext conftest.$ac_ext
29888fi # $ac_x_libraries = no
29889
29890case $ac_x_includes,$ac_x_libraries in #(
29891  no,* | *,no | *\'*)
29892    # Didn't find X, or a directory has "'" in its name.
29893    ac_cv_have_x="have_x=no";; #(
29894  *)
29895    # Record where we found X for the cache.
29896    ac_cv_have_x="have_x=yes\
29897	ac_x_includes='$ac_x_includes'\
29898	ac_x_libraries='$ac_x_libraries'"
29899esac
29900fi
29901;; #(
29902    *) have_x=yes;;
29903  esac
29904  eval "$ac_cv_have_x"
29905fi # $with_x != no
29906
29907if test "$have_x" != yes; then
29908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29909$as_echo "$have_x" >&6; }
29910  no_x=yes
29911else
29912  # If each of the values was on the command line, it overrides each guess.
29913  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29914  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29915  # Update the cache value to reflect the command line values.
29916  ac_cv_have_x="have_x=yes\
29917	ac_x_includes='$x_includes'\
29918	ac_x_libraries='$x_libraries'"
29919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29920$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29921fi
29922
29923if test "$no_x" = yes; then
29924  # Not all programs may use this symbol, but it does not hurt to define it.
29925
29926$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29927
29928  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29929else
29930  if test -n "$x_includes"; then
29931    X_CFLAGS="$X_CFLAGS -I$x_includes"
29932  fi
29933
29934  # It would also be nice to do this for all -L options, not just this one.
29935  if test -n "$x_libraries"; then
29936    X_LIBS="$X_LIBS -L$x_libraries"
29937    # For Solaris; some versions of Sun CC require a space after -R and
29938    # others require no space.  Words are not sufficient . . . .
29939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29940$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29941    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29942    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29943    ac_cxx_werror_flag=yes
29944    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29945/* end confdefs.h.  */
29946
29947int
29948main ()
29949{
29950
29951  ;
29952  return 0;
29953}
29954_ACEOF
29955if ac_fn_cxx_try_link "$LINENO"; then :
29956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29957$as_echo "no" >&6; }
29958       X_LIBS="$X_LIBS -R$x_libraries"
29959else
29960  LIBS="$ac_xsave_LIBS -R $x_libraries"
29961       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29962/* end confdefs.h.  */
29963
29964int
29965main ()
29966{
29967
29968  ;
29969  return 0;
29970}
29971_ACEOF
29972if ac_fn_cxx_try_link "$LINENO"; then :
29973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29974$as_echo "yes" >&6; }
29975	  X_LIBS="$X_LIBS -R $x_libraries"
29976else
29977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29978$as_echo "neither works" >&6; }
29979fi
29980rm -f core conftest.err conftest.$ac_objext \
29981    conftest$ac_exeext conftest.$ac_ext
29982fi
29983rm -f core conftest.err conftest.$ac_objext \
29984    conftest$ac_exeext conftest.$ac_ext
29985    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29986    LIBS=$ac_xsave_LIBS
29987  fi
29988
29989  # Check for system-dependent libraries X programs must link with.
29990  # Do this before checking for the system-independent R6 libraries
29991  # (-lICE), since we may need -lsocket or whatever for X linking.
29992
29993  if test "$ISC" = yes; then
29994    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29995  else
29996    # Martyn Johnson says this is needed for Ultrix, if the X
29997    # libraries were built with DECnet support.  And Karl Berry says
29998    # the Alpha needs dnet_stub (dnet does not exist).
29999    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30000    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30001/* end confdefs.h.  */
30002
30003/* Override any GCC internal prototype to avoid an error.
30004   Use char because int might match the return type of a GCC
30005   builtin and then its argument prototype would still apply.  */
30006#ifdef __cplusplus
30007extern "C"
30008#endif
30009char XOpenDisplay ();
30010int
30011main ()
30012{
30013return XOpenDisplay ();
30014  ;
30015  return 0;
30016}
30017_ACEOF
30018if ac_fn_cxx_try_link "$LINENO"; then :
30019
30020else
30021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30022$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30023if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30024  $as_echo_n "(cached) " >&6
30025else
30026  ac_check_lib_save_LIBS=$LIBS
30027LIBS="-ldnet  $LIBS"
30028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30029/* end confdefs.h.  */
30030
30031/* Override any GCC internal prototype to avoid an error.
30032   Use char because int might match the return type of a GCC
30033   builtin and then its argument prototype would still apply.  */
30034#ifdef __cplusplus
30035extern "C"
30036#endif
30037char dnet_ntoa ();
30038int
30039main ()
30040{
30041return dnet_ntoa ();
30042  ;
30043  return 0;
30044}
30045_ACEOF
30046if ac_fn_cxx_try_link "$LINENO"; then :
30047  ac_cv_lib_dnet_dnet_ntoa=yes
30048else
30049  ac_cv_lib_dnet_dnet_ntoa=no
30050fi
30051rm -f core conftest.err conftest.$ac_objext \
30052    conftest$ac_exeext conftest.$ac_ext
30053LIBS=$ac_check_lib_save_LIBS
30054fi
30055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30056$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30057if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30058  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30059fi
30060
30061    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30063$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30064if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30065  $as_echo_n "(cached) " >&6
30066else
30067  ac_check_lib_save_LIBS=$LIBS
30068LIBS="-ldnet_stub  $LIBS"
30069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30070/* end confdefs.h.  */
30071
30072/* Override any GCC internal prototype to avoid an error.
30073   Use char because int might match the return type of a GCC
30074   builtin and then its argument prototype would still apply.  */
30075#ifdef __cplusplus
30076extern "C"
30077#endif
30078char dnet_ntoa ();
30079int
30080main ()
30081{
30082return dnet_ntoa ();
30083  ;
30084  return 0;
30085}
30086_ACEOF
30087if ac_fn_cxx_try_link "$LINENO"; then :
30088  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30089else
30090  ac_cv_lib_dnet_stub_dnet_ntoa=no
30091fi
30092rm -f core conftest.err conftest.$ac_objext \
30093    conftest$ac_exeext conftest.$ac_ext
30094LIBS=$ac_check_lib_save_LIBS
30095fi
30096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30097$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30098if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30099  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30100fi
30101
30102    fi
30103fi
30104rm -f core conftest.err conftest.$ac_objext \
30105    conftest$ac_exeext conftest.$ac_ext
30106    LIBS="$ac_xsave_LIBS"
30107
30108    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30109    # to get the SysV transport functions.
30110    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30111    # needs -lnsl.
30112    # The nsl library prevents programs from opening the X display
30113    # on Irix 5.2, according to T.E. Dickey.
30114    # The functions gethostbyname, getservbyname, and inet_addr are
30115    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30116    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30117if test "x$ac_cv_func_gethostbyname" = xyes; then :
30118
30119fi
30120
30121    if test $ac_cv_func_gethostbyname = no; then
30122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30123$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30124if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30125  $as_echo_n "(cached) " >&6
30126else
30127  ac_check_lib_save_LIBS=$LIBS
30128LIBS="-lnsl  $LIBS"
30129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30130/* end confdefs.h.  */
30131
30132/* Override any GCC internal prototype to avoid an error.
30133   Use char because int might match the return type of a GCC
30134   builtin and then its argument prototype would still apply.  */
30135#ifdef __cplusplus
30136extern "C"
30137#endif
30138char gethostbyname ();
30139int
30140main ()
30141{
30142return gethostbyname ();
30143  ;
30144  return 0;
30145}
30146_ACEOF
30147if ac_fn_cxx_try_link "$LINENO"; then :
30148  ac_cv_lib_nsl_gethostbyname=yes
30149else
30150  ac_cv_lib_nsl_gethostbyname=no
30151fi
30152rm -f core conftest.err conftest.$ac_objext \
30153    conftest$ac_exeext conftest.$ac_ext
30154LIBS=$ac_check_lib_save_LIBS
30155fi
30156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30157$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30158if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30159  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30160fi
30161
30162      if test $ac_cv_lib_nsl_gethostbyname = no; then
30163	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30164$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30165if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30166  $as_echo_n "(cached) " >&6
30167else
30168  ac_check_lib_save_LIBS=$LIBS
30169LIBS="-lbsd  $LIBS"
30170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30171/* end confdefs.h.  */
30172
30173/* Override any GCC internal prototype to avoid an error.
30174   Use char because int might match the return type of a GCC
30175   builtin and then its argument prototype would still apply.  */
30176#ifdef __cplusplus
30177extern "C"
30178#endif
30179char gethostbyname ();
30180int
30181main ()
30182{
30183return gethostbyname ();
30184  ;
30185  return 0;
30186}
30187_ACEOF
30188if ac_fn_cxx_try_link "$LINENO"; then :
30189  ac_cv_lib_bsd_gethostbyname=yes
30190else
30191  ac_cv_lib_bsd_gethostbyname=no
30192fi
30193rm -f core conftest.err conftest.$ac_objext \
30194    conftest$ac_exeext conftest.$ac_ext
30195LIBS=$ac_check_lib_save_LIBS
30196fi
30197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30198$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30199if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30200  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30201fi
30202
30203      fi
30204    fi
30205
30206    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30207    # socket/setsockopt and other routines are undefined under SCO ODT
30208    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30209    # on later versions), says Simon Leinen: it contains gethostby*
30210    # variants that don't use the name server (or something).  -lsocket
30211    # must be given before -lnsl if both are needed.  We assume that
30212    # if connect needs -lnsl, so does gethostbyname.
30213    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30214if test "x$ac_cv_func_connect" = xyes; then :
30215
30216fi
30217
30218    if test $ac_cv_func_connect = no; then
30219      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30220$as_echo_n "checking for connect in -lsocket... " >&6; }
30221if ${ac_cv_lib_socket_connect+:} false; then :
30222  $as_echo_n "(cached) " >&6
30223else
30224  ac_check_lib_save_LIBS=$LIBS
30225LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30227/* end confdefs.h.  */
30228
30229/* Override any GCC internal prototype to avoid an error.
30230   Use char because int might match the return type of a GCC
30231   builtin and then its argument prototype would still apply.  */
30232#ifdef __cplusplus
30233extern "C"
30234#endif
30235char connect ();
30236int
30237main ()
30238{
30239return connect ();
30240  ;
30241  return 0;
30242}
30243_ACEOF
30244if ac_fn_cxx_try_link "$LINENO"; then :
30245  ac_cv_lib_socket_connect=yes
30246else
30247  ac_cv_lib_socket_connect=no
30248fi
30249rm -f core conftest.err conftest.$ac_objext \
30250    conftest$ac_exeext conftest.$ac_ext
30251LIBS=$ac_check_lib_save_LIBS
30252fi
30253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30254$as_echo "$ac_cv_lib_socket_connect" >&6; }
30255if test "x$ac_cv_lib_socket_connect" = xyes; then :
30256  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30257fi
30258
30259    fi
30260
30261    # Guillermo Gomez says -lposix is necessary on A/UX.
30262    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30263if test "x$ac_cv_func_remove" = xyes; then :
30264
30265fi
30266
30267    if test $ac_cv_func_remove = no; then
30268      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30269$as_echo_n "checking for remove in -lposix... " >&6; }
30270if ${ac_cv_lib_posix_remove+:} false; then :
30271  $as_echo_n "(cached) " >&6
30272else
30273  ac_check_lib_save_LIBS=$LIBS
30274LIBS="-lposix  $LIBS"
30275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30276/* end confdefs.h.  */
30277
30278/* Override any GCC internal prototype to avoid an error.
30279   Use char because int might match the return type of a GCC
30280   builtin and then its argument prototype would still apply.  */
30281#ifdef __cplusplus
30282extern "C"
30283#endif
30284char remove ();
30285int
30286main ()
30287{
30288return remove ();
30289  ;
30290  return 0;
30291}
30292_ACEOF
30293if ac_fn_cxx_try_link "$LINENO"; then :
30294  ac_cv_lib_posix_remove=yes
30295else
30296  ac_cv_lib_posix_remove=no
30297fi
30298rm -f core conftest.err conftest.$ac_objext \
30299    conftest$ac_exeext conftest.$ac_ext
30300LIBS=$ac_check_lib_save_LIBS
30301fi
30302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30303$as_echo "$ac_cv_lib_posix_remove" >&6; }
30304if test "x$ac_cv_lib_posix_remove" = xyes; then :
30305  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30306fi
30307
30308    fi
30309
30310    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30311    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30312if test "x$ac_cv_func_shmat" = xyes; then :
30313
30314fi
30315
30316    if test $ac_cv_func_shmat = no; then
30317      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30318$as_echo_n "checking for shmat in -lipc... " >&6; }
30319if ${ac_cv_lib_ipc_shmat+:} false; then :
30320  $as_echo_n "(cached) " >&6
30321else
30322  ac_check_lib_save_LIBS=$LIBS
30323LIBS="-lipc  $LIBS"
30324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30325/* end confdefs.h.  */
30326
30327/* Override any GCC internal prototype to avoid an error.
30328   Use char because int might match the return type of a GCC
30329   builtin and then its argument prototype would still apply.  */
30330#ifdef __cplusplus
30331extern "C"
30332#endif
30333char shmat ();
30334int
30335main ()
30336{
30337return shmat ();
30338  ;
30339  return 0;
30340}
30341_ACEOF
30342if ac_fn_cxx_try_link "$LINENO"; then :
30343  ac_cv_lib_ipc_shmat=yes
30344else
30345  ac_cv_lib_ipc_shmat=no
30346fi
30347rm -f core conftest.err conftest.$ac_objext \
30348    conftest$ac_exeext conftest.$ac_ext
30349LIBS=$ac_check_lib_save_LIBS
30350fi
30351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30352$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30353if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30354  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30355fi
30356
30357    fi
30358  fi
30359
30360  # Check for libraries that X11R6 Xt/Xaw programs need.
30361  ac_save_LDFLAGS=$LDFLAGS
30362  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30363  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30364  # check for ICE first), but we must link in the order -lSM -lICE or
30365  # we get undefined symbols.  So assume we have SM if we have ICE.
30366  # These have to be linked with before -lX11, unlike the other
30367  # libraries we check for below, so use a different variable.
30368  # John Interrante, Karl Berry
30369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30370$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30371if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30372  $as_echo_n "(cached) " >&6
30373else
30374  ac_check_lib_save_LIBS=$LIBS
30375LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30377/* end confdefs.h.  */
30378
30379/* Override any GCC internal prototype to avoid an error.
30380   Use char because int might match the return type of a GCC
30381   builtin and then its argument prototype would still apply.  */
30382#ifdef __cplusplus
30383extern "C"
30384#endif
30385char IceConnectionNumber ();
30386int
30387main ()
30388{
30389return IceConnectionNumber ();
30390  ;
30391  return 0;
30392}
30393_ACEOF
30394if ac_fn_cxx_try_link "$LINENO"; then :
30395  ac_cv_lib_ICE_IceConnectionNumber=yes
30396else
30397  ac_cv_lib_ICE_IceConnectionNumber=no
30398fi
30399rm -f core conftest.err conftest.$ac_objext \
30400    conftest$ac_exeext conftest.$ac_ext
30401LIBS=$ac_check_lib_save_LIBS
30402fi
30403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30404$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30405if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30406  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30407fi
30408
30409  LDFLAGS=$ac_save_LDFLAGS
30410
30411fi
30412
30413
30414# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30415# this doesn't make sense so we remove it.
30416if test "x$COMPILE_TYPE" = xcross; then
30417  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30418fi
30419
30420if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30421
30422    # Print a helpful message on how to acquire the necessary build dependency.
30423    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30424    MISSING_DEPENDENCY=x11
30425    PKGHANDLER_COMMAND=
30426
30427    case $PKGHANDLER in
30428	apt-get)
30429                apt_help     $MISSING_DEPENDENCY ;;
30430    yum)
30431                yum_help     $MISSING_DEPENDENCY ;;
30432	port)
30433                port_help    $MISSING_DEPENDENCY ;;
30434	pkgutil)
30435                pkgutil_help $MISSING_DEPENDENCY ;;
30436	pkgadd)
30437                pkgadd_help  $MISSING_DEPENDENCY ;;
30438    * )
30439      break ;;
30440    esac
30441
30442    if test "x$PKGHANDLER_COMMAND" != x; then
30443        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30444    fi
30445
30446    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30447fi
30448
30449# Some of the old makefiles require a setting of OPENWIN_HOME
30450# Since the X11R6 directory has disappeared on later Linuxes,
30451# we need to probe for it.
30452if test "x$OPENJDK_TARGET_OS" = xlinux; then
30453    if test -d "$SYS_ROOT/usr/X11R6"; then
30454        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30455    elif test -d "$SYS_ROOT/usr/include/X11"; then
30456        OPENWIN_HOME="$SYS_ROOT/usr"
30457    fi
30458fi
30459if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30460    OPENWIN_HOME="/usr/openwin"
30461fi
30462
30463
30464
30465#
30466# Weird Sol10 something check...TODO change to try compile
30467#
30468if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30469  if test "`uname -r`" = "5.10"; then
30470     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30471     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30472     fi
30473  fi
30474fi
30475
30476ac_ext=c
30477ac_cpp='$CPP $CPPFLAGS'
30478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30480ac_compiler_gnu=$ac_cv_c_compiler_gnu
30481
30482OLD_CFLAGS="$CFLAGS"
30483CFLAGS="$CFLAGS $X_CFLAGS"
30484
30485# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30486for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30487do :
30488  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30489ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30490                   # include <X11/Xutil.h>
30491
30492"
30493if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30494  cat >>confdefs.h <<_ACEOF
30495#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30496_ACEOF
30497 X11_A_OK=yes
30498else
30499  X11_A_OK=no; break
30500fi
30501
30502done
30503
30504
30505CFLAGS="$OLD_CFLAGS"
30506ac_ext=cpp
30507ac_cpp='$CXXCPP $CPPFLAGS'
30508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30511
30512
30513if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30514
30515    # Print a helpful message on how to acquire the necessary build dependency.
30516    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30517    MISSING_DEPENDENCY=x11
30518    PKGHANDLER_COMMAND=
30519
30520    case $PKGHANDLER in
30521	apt-get)
30522                apt_help     $MISSING_DEPENDENCY ;;
30523    yum)
30524                yum_help     $MISSING_DEPENDENCY ;;
30525	port)
30526                port_help    $MISSING_DEPENDENCY ;;
30527	pkgutil)
30528                pkgutil_help $MISSING_DEPENDENCY ;;
30529	pkgadd)
30530                pkgadd_help  $MISSING_DEPENDENCY ;;
30531    * )
30532      break ;;
30533    esac
30534
30535    if test "x$PKGHANDLER_COMMAND" != x; then
30536        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30537    fi
30538
30539    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30540fi
30541
30542
30543
30544
30545
30546
30547###############################################################################
30548#
30549# The common unix printing system cups is used to print from java.
30550#
30551
30552# Check whether --with-cups was given.
30553if test "${with_cups+set}" = set; then :
30554  withval=$with_cups;
30555fi
30556
30557
30558# Check whether --with-cups-include was given.
30559if test "${with_cups_include+set}" = set; then :
30560  withval=$with_cups_include;
30561fi
30562
30563
30564if test "x$CUPS_NOT_NEEDED" = xyes; then
30565	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30566		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30567$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30568	fi
30569	CUPS_CFLAGS=
30570else
30571	CUPS_FOUND=no
30572
30573	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30574	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30575	fi
30576
30577	if test "x${with_cups}" != x; then
30578	    CUPS_CFLAGS="-I${with_cups}/include"
30579	    CUPS_FOUND=yes
30580	fi
30581	if test "x${with_cups_include}" != x; then
30582	    CUPS_CFLAGS="-I${with_cups_include}"
30583	    CUPS_FOUND=yes
30584	fi
30585	if test "x$CUPS_FOUND" = xno; then
30586
30587
30588    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30589        # Source the builddeps file again, to make sure it uses the latest variables!
30590        . $builddepsfile
30591        # Look for a target and build machine specific resource!
30592        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30593        if test "x$resource" = x; then
30594            # Ok, lets instead look for a target specific resource
30595            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30596        fi
30597        if test "x$resource" = x; then
30598            # Ok, lets instead look for a build specific resource
30599            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30600        fi
30601        if test "x$resource" = x; then
30602            # Ok, lets instead look for a generic resource
30603            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30604            resource=${builddep_cups}
30605        fi
30606        if test "x$resource" != x; then
30607            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30608$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30609	    # If the resource in the builddeps.conf file is an existing directory,
30610	    # for example /java/linux/cups
30611	    if test -d ${resource}; then
30612	       depdir=${resource}
30613	    else
30614
30615# cups is for example mymodule
30616# $resource is for example libs/general/libmymod_1_2_3.zip
30617# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30618# $with_builddeps_dir is for example /localhome/builddeps
30619# depdir is the name of the variable into which we store the depdir, eg MYMOD
30620# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30621# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30622    filename=`basename $resource`
30623    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30624    filebase=${filename%%.*}
30625    extension=${filename#*.}
30626    installdir=$with_builddeps_dir/$filebase
30627    if test ! -f $installdir/$filename.unpacked; then
30628        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30629$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30630        if test ! -d $installdir; then
30631            mkdir -p $installdir
30632        fi
30633        if test ! -d $installdir; then
30634            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30635        fi
30636        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30637        touch $tmpfile
30638        if test ! -f $tmpfile; then
30639            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30640        fi
30641
30642    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30643    # $tmpfile is the local file name for the downloaded file.
30644    VALID_TOOL=no
30645    if test "x$BDEPS_FTP" = xwget; then
30646       VALID_TOOL=yes
30647       wget -O $tmpfile $with_builddeps_server/$resource
30648    fi
30649    if test "x$BDEPS_FTP" = xlftp; then
30650       VALID_TOOL=yes
30651       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30652    fi
30653    if test "x$BDEPS_FTP" = xftp; then
30654        VALID_TOOL=yes
30655        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30656        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30657        FTPUSERPWD=${FTPSERVER%%@*}
30658        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30659            FTPUSER=${userpwd%%:*}
30660            FTPPWD=${userpwd#*@}
30661            FTPSERVER=${FTPSERVER#*@}
30662        else
30663            FTPUSER=ftp
30664            FTPPWD=ftp
30665        fi
30666        # the "pass" command does not work on some
30667        # ftp clients (read ftp.exe) but if it works,
30668        # passive mode is better!
30669        (\
30670            echo "user $FTPUSER $FTPPWD"        ;\
30671            echo "pass"                         ;\
30672            echo "bin"                          ;\
30673            echo "get $FTPPATH $tmpfile"              ;\
30674        ) | ftp -in $FTPSERVER
30675    fi
30676    if test "x$VALID_TOOL" != xyes; then
30677       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30678    fi
30679
30680        mv $tmpfile $installdir/$filename
30681        if test ! -s $installdir/$filename; then
30682            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30683        fi
30684        case "$extension" in
30685            zip)  echo "Unzipping $installdir/$filename..."
30686               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30687            ;;
30688            tar.gz) echo "Untaring $installdir/$filename..."
30689               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30690            ;;
30691            tgz) echo "Untaring $installdir/$filename..."
30692               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30693            ;;
30694            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30695            ;;
30696        esac
30697    fi
30698    if test -f $installdir/$filename.unpacked; then
30699        depdir=$installdir
30700    fi
30701
30702	    fi
30703            # Source the builddeps file again, because in the previous command, the depdir
30704            # was updated to point at the current build dependency install directory.
30705            . $builddepsfile
30706            # Now extract variables from the builddeps.conf files.
30707            theroot=${builddep_cups_ROOT}
30708            thecflags=${builddep_cups_CFLAGS}
30709            thelibs=${builddep_cups_LIBS}
30710            if test "x$depdir" = x; then
30711                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30712            fi
30713            CUPS=$depdir
30714            if test "x$theroot" != x; then
30715               CUPS="$theroot"
30716            fi
30717            if test "x$thecflags" != x; then
30718               CUPS_CFLAGS="$thecflags"
30719            fi
30720            if test "x$thelibs" != x; then
30721               CUPS_LIBS="$thelibs"
30722            fi
30723            CUPS_FOUND=yes
30724
30725        fi
30726
30727    fi
30728
30729	fi
30730	if test "x$CUPS_FOUND" = xno; then
30731	    # Are the cups headers installed in the default /usr/include location?
30732	    for ac_header in cups/cups.h cups/ppd.h
30733do :
30734  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30735ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30736if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30737  cat >>confdefs.h <<_ACEOF
30738#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30739_ACEOF
30740 CUPS_FOUND=yes
30741	                      CUPS_CFLAGS=
30742	                      DEFAULT_CUPS=yes
30743fi
30744
30745done
30746
30747	fi
30748	if test "x$CUPS_FOUND" = xno; then
30749	    # Getting nervous now? Lets poke around for standard Solaris third-party
30750	    # package installation locations.
30751	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30752$as_echo_n "checking for cups headers... " >&6; }
30753	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30754	       # An SFW package seems to be installed!
30755	       CUPS_FOUND=yes
30756	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30757	    elif test -s /opt/csw/include/cups/cups.h; then
30758	       # A CSW package seems to be installed!
30759	       CUPS_FOUND=yes
30760	       CUPS_CFLAGS="-I/opt/csw/include"
30761	    fi
30762	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30763$as_echo "$CUPS_FOUND" >&6; }
30764	fi
30765	if test "x$CUPS_FOUND" = xno; then
30766
30767    # Print a helpful message on how to acquire the necessary build dependency.
30768    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30769    MISSING_DEPENDENCY=cups
30770    PKGHANDLER_COMMAND=
30771
30772    case $PKGHANDLER in
30773	apt-get)
30774                apt_help     $MISSING_DEPENDENCY ;;
30775    yum)
30776                yum_help     $MISSING_DEPENDENCY ;;
30777	port)
30778                port_help    $MISSING_DEPENDENCY ;;
30779	pkgutil)
30780                pkgutil_help $MISSING_DEPENDENCY ;;
30781	pkgadd)
30782                pkgadd_help  $MISSING_DEPENDENCY ;;
30783    * )
30784      break ;;
30785    esac
30786
30787    if test "x$PKGHANDLER_COMMAND" != x; then
30788        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30789    fi
30790
30791	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30792	fi
30793fi
30794
30795
30796
30797
30798
30799
30800###############################################################################
30801#
30802# The ubiquitous freetype2 library is used to render fonts.
30803#
30804
30805# Check whether --with-freetype was given.
30806if test "${with_freetype+set}" = set; then :
30807  withval=$with_freetype;
30808fi
30809
30810
30811# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30812USING_SYSTEM_FT_LIB=false
30813
30814if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30815	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30816		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30817$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30818	fi
30819	FREETYPE2_CFLAGS=
30820	FREETYPE2_LIBS=
30821        FREETYPE2_LIB_PATH=
30822else
30823	FREETYPE2_FOUND=no
30824
30825	if test "x$with_freetype" != x; then
30826
30827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30828
30829  # Input might be given as Windows format, start by converting to
30830  # unix format.
30831  path="$with_freetype"
30832  new_path=`$CYGPATH -u "$path"`
30833
30834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30837  # "foo.exe" is OK but "foo" is an error.
30838  #
30839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30840  # It is also a way to make sure we got the proper file name for the real test later on.
30841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30842  if test "x$test_shortpath" = x; then
30843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30844$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30845    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30846  fi
30847
30848  # Call helper function which possibly converts this using DOS-style short mode.
30849  # If so, the updated path is stored in $new_path.
30850
30851  input_path="$new_path"
30852  # Check if we need to convert this using DOS-style short mode. If the path
30853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30854  # take no chances and rewrite it.
30855  # Note: m4 eats our [], so we need to use [ and ] instead.
30856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30857  if test "x$has_forbidden_chars" != x; then
30858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30862      # Going to short mode and back again did indeed matter. Since short mode is
30863      # case insensitive, let's make it lowercase to improve readability.
30864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30865      # Now convert it back to Unix-stile (cygpath)
30866      input_path=`$CYGPATH -u "$shortmode_path"`
30867      new_path="$input_path"
30868    fi
30869  fi
30870
30871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30872  if test "x$test_cygdrive_prefix" = x; then
30873    # As a simple fix, exclude /usr/bin since it's not a real path.
30874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30876      # a path prefixed by /cygdrive for fixpath to work.
30877      new_path="$CYGWIN_ROOT_PATH$input_path"
30878    fi
30879  fi
30880
30881
30882  if test "x$path" != "x$new_path"; then
30883    with_freetype="$new_path"
30884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30885$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30886  fi
30887
30888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30889
30890  path="$with_freetype"
30891  has_colon=`$ECHO $path | $GREP ^.:`
30892  new_path="$path"
30893  if test "x$has_colon" = x; then
30894    # Not in mixed or Windows style, start by that.
30895    new_path=`cmd //c echo $path`
30896  fi
30897
30898
30899  input_path="$new_path"
30900  # Check if we need to convert this using DOS-style short mode. If the path
30901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30902  # take no chances and rewrite it.
30903  # Note: m4 eats our [], so we need to use [ and ] instead.
30904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30905  if test "x$has_forbidden_chars" != x; then
30906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30908  fi
30909
30910
30911  windows_path="$new_path"
30912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30913    unix_path=`$CYGPATH -u "$windows_path"`
30914    new_path="$unix_path"
30915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30917    new_path="$unix_path"
30918  fi
30919
30920  if test "x$path" != "x$new_path"; then
30921    with_freetype="$new_path"
30922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30923$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30924  fi
30925
30926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30928
30929  else
30930    # We're on a posix platform. Hooray! :)
30931    path="$with_freetype"
30932    has_space=`$ECHO "$path" | $GREP " "`
30933    if test "x$has_space" != x; then
30934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30935$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30936      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30937    fi
30938
30939    # Use eval to expand a potential ~
30940    eval path="$path"
30941    if test ! -f "$path" && test ! -d "$path"; then
30942      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30943    fi
30944
30945    with_freetype="`cd "$path"; $THEPWDCMD -L`"
30946  fi
30947
30948	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30949            FREETYPE2_LIB_PATH="$with_freetype/lib"
30950            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30951                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30952                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30953            fi
30954            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30955                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30956            fi
30957	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30958            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30959                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30960            fi
30961 	    FREETYPE2_FOUND=yes
30962   	    if test "x$FREETYPE2_FOUND" = xyes; then
30963	        # Verify that the directories exist
30964                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30965		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30966		fi
30967	        # List the contents of the lib.
30968		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30969                if test "x$FREETYPELIB" = x; then
30970		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30971		fi
30972	        # Check one h-file
30973                if ! test -s "$with_freetype/include/ft2build.h"; then
30974		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30975		fi
30976            fi
30977        fi
30978	if test "x$FREETYPE2_FOUND" = xno; then
30979
30980
30981    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30982        # Source the builddeps file again, to make sure it uses the latest variables!
30983        . $builddepsfile
30984        # Look for a target and build machine specific resource!
30985        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30986        if test "x$resource" = x; then
30987            # Ok, lets instead look for a target specific resource
30988            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30989        fi
30990        if test "x$resource" = x; then
30991            # Ok, lets instead look for a build specific resource
30992            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30993        fi
30994        if test "x$resource" = x; then
30995            # Ok, lets instead look for a generic resource
30996            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30997            resource=${builddep_freetype2}
30998        fi
30999        if test "x$resource" != x; then
31000            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31001$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31002	    # If the resource in the builddeps.conf file is an existing directory,
31003	    # for example /java/linux/cups
31004	    if test -d ${resource}; then
31005	       depdir=${resource}
31006	    else
31007
31008# freetype2 is for example mymodule
31009# $resource is for example libs/general/libmymod_1_2_3.zip
31010# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31011# $with_builddeps_dir is for example /localhome/builddeps
31012# depdir is the name of the variable into which we store the depdir, eg MYMOD
31013# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31014# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31015    filename=`basename $resource`
31016    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31017    filebase=${filename%%.*}
31018    extension=${filename#*.}
31019    installdir=$with_builddeps_dir/$filebase
31020    if test ! -f $installdir/$filename.unpacked; then
31021        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31022$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31023        if test ! -d $installdir; then
31024            mkdir -p $installdir
31025        fi
31026        if test ! -d $installdir; then
31027            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31028        fi
31029        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31030        touch $tmpfile
31031        if test ! -f $tmpfile; then
31032            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31033        fi
31034
31035    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31036    # $tmpfile is the local file name for the downloaded file.
31037    VALID_TOOL=no
31038    if test "x$BDEPS_FTP" = xwget; then
31039       VALID_TOOL=yes
31040       wget -O $tmpfile $with_builddeps_server/$resource
31041    fi
31042    if test "x$BDEPS_FTP" = xlftp; then
31043       VALID_TOOL=yes
31044       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31045    fi
31046    if test "x$BDEPS_FTP" = xftp; then
31047        VALID_TOOL=yes
31048        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31049        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31050        FTPUSERPWD=${FTPSERVER%%@*}
31051        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31052            FTPUSER=${userpwd%%:*}
31053            FTPPWD=${userpwd#*@}
31054            FTPSERVER=${FTPSERVER#*@}
31055        else
31056            FTPUSER=ftp
31057            FTPPWD=ftp
31058        fi
31059        # the "pass" command does not work on some
31060        # ftp clients (read ftp.exe) but if it works,
31061        # passive mode is better!
31062        (\
31063            echo "user $FTPUSER $FTPPWD"        ;\
31064            echo "pass"                         ;\
31065            echo "bin"                          ;\
31066            echo "get $FTPPATH $tmpfile"              ;\
31067        ) | ftp -in $FTPSERVER
31068    fi
31069    if test "x$VALID_TOOL" != xyes; then
31070       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31071    fi
31072
31073        mv $tmpfile $installdir/$filename
31074        if test ! -s $installdir/$filename; then
31075            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31076        fi
31077        case "$extension" in
31078            zip)  echo "Unzipping $installdir/$filename..."
31079               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31080            ;;
31081            tar.gz) echo "Untaring $installdir/$filename..."
31082               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31083            ;;
31084            tgz) echo "Untaring $installdir/$filename..."
31085               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31086            ;;
31087            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31088            ;;
31089        esac
31090    fi
31091    if test -f $installdir/$filename.unpacked; then
31092        depdir=$installdir
31093    fi
31094
31095	    fi
31096            # Source the builddeps file again, because in the previous command, the depdir
31097            # was updated to point at the current build dependency install directory.
31098            . $builddepsfile
31099            # Now extract variables from the builddeps.conf files.
31100            theroot=${builddep_freetype2_ROOT}
31101            thecflags=${builddep_freetype2_CFLAGS}
31102            thelibs=${builddep_freetype2_LIBS}
31103            if test "x$depdir" = x; then
31104                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31105            fi
31106            FREETYPE2=$depdir
31107            if test "x$theroot" != x; then
31108               FREETYPE2="$theroot"
31109            fi
31110            if test "x$thecflags" != x; then
31111               FREETYPE2_CFLAGS="$thecflags"
31112            fi
31113            if test "x$thelibs" != x; then
31114               FREETYPE2_LIBS="$thelibs"
31115            fi
31116            FREETYPE2_FOUND=yes
31117            else FREETYPE2_FOUND=no
31118
31119        fi
31120        else FREETYPE2_FOUND=no
31121
31122    fi
31123
31124            USING_SYSTEM_FT_LIB=true
31125	fi
31126	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31127            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31128
31129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31130
31131  # Input might be given as Windows format, start by converting to
31132  # unix format.
31133  path="$FREETYPELOCATION"
31134  new_path=`$CYGPATH -u "$path"`
31135
31136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31139  # "foo.exe" is OK but "foo" is an error.
31140  #
31141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31142  # It is also a way to make sure we got the proper file name for the real test later on.
31143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31144  if test "x$test_shortpath" = x; then
31145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31146$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31147    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31148  fi
31149
31150  # Call helper function which possibly converts this using DOS-style short mode.
31151  # If so, the updated path is stored in $new_path.
31152
31153  input_path="$new_path"
31154  # Check if we need to convert this using DOS-style short mode. If the path
31155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31156  # take no chances and rewrite it.
31157  # Note: m4 eats our [], so we need to use [ and ] instead.
31158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31159  if test "x$has_forbidden_chars" != x; then
31160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31164      # Going to short mode and back again did indeed matter. Since short mode is
31165      # case insensitive, let's make it lowercase to improve readability.
31166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31167      # Now convert it back to Unix-stile (cygpath)
31168      input_path=`$CYGPATH -u "$shortmode_path"`
31169      new_path="$input_path"
31170    fi
31171  fi
31172
31173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31174  if test "x$test_cygdrive_prefix" = x; then
31175    # As a simple fix, exclude /usr/bin since it's not a real path.
31176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31178      # a path prefixed by /cygdrive for fixpath to work.
31179      new_path="$CYGWIN_ROOT_PATH$input_path"
31180    fi
31181  fi
31182
31183
31184  if test "x$path" != "x$new_path"; then
31185    FREETYPELOCATION="$new_path"
31186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31187$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31188  fi
31189
31190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31191
31192  path="$FREETYPELOCATION"
31193  has_colon=`$ECHO $path | $GREP ^.:`
31194  new_path="$path"
31195  if test "x$has_colon" = x; then
31196    # Not in mixed or Windows style, start by that.
31197    new_path=`cmd //c echo $path`
31198  fi
31199
31200
31201  input_path="$new_path"
31202  # Check if we need to convert this using DOS-style short mode. If the path
31203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31204  # take no chances and rewrite it.
31205  # Note: m4 eats our [], so we need to use [ and ] instead.
31206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31207  if test "x$has_forbidden_chars" != x; then
31208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31210  fi
31211
31212
31213  windows_path="$new_path"
31214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31215    unix_path=`$CYGPATH -u "$windows_path"`
31216    new_path="$unix_path"
31217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31219    new_path="$unix_path"
31220  fi
31221
31222  if test "x$path" != "x$new_path"; then
31223    FREETYPELOCATION="$new_path"
31224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31225$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31226  fi
31227
31228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31230
31231  else
31232    # We're on a posix platform. Hooray! :)
31233    path="$FREETYPELOCATION"
31234    has_space=`$ECHO "$path" | $GREP " "`
31235    if test "x$has_space" != x; then
31236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31237$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31238      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31239    fi
31240
31241    # Use eval to expand a potential ~
31242    eval path="$path"
31243    if test ! -f "$path" && test ! -d "$path"; then
31244      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31245    fi
31246
31247    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31248  fi
31249
31250	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31251$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31252	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31253	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31254	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31255 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31256                if ! test -s "$FREETYPE2_LIBS"; then
31257		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31258		fi
31259                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31260		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31261		fi
31262                USING_SYSTEM_FT_LIB=true
31263                FREETYPE2_FOUND=yes
31264	    fi
31265	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31266$as_echo "$FREETYPE2_FOUND" >&6; }
31267        fi
31268	if test "x$FREETYPE2_FOUND" = xno; then
31269
31270pkg_failed=no
31271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31272$as_echo_n "checking for FREETYPE2... " >&6; }
31273
31274if test -n "$FREETYPE2_CFLAGS"; then
31275    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31276 elif test -n "$PKG_CONFIG"; then
31277    if test -n "$PKG_CONFIG" && \
31278    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31279  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31280  ac_status=$?
31281  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31282  test $ac_status = 0; }; then
31283  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31284else
31285  pkg_failed=yes
31286fi
31287 else
31288    pkg_failed=untried
31289fi
31290if test -n "$FREETYPE2_LIBS"; then
31291    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31292 elif test -n "$PKG_CONFIG"; then
31293    if test -n "$PKG_CONFIG" && \
31294    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31295  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31296  ac_status=$?
31297  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31298  test $ac_status = 0; }; then
31299  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31300else
31301  pkg_failed=yes
31302fi
31303 else
31304    pkg_failed=untried
31305fi
31306
31307
31308
31309if test $pkg_failed = yes; then
31310
31311if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31312        _pkg_short_errors_supported=yes
31313else
31314        _pkg_short_errors_supported=no
31315fi
31316        if test $_pkg_short_errors_supported = yes; then
31317	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31318        else
31319	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31320        fi
31321	# Put the nasty error message in config.log where it belongs
31322	echo "$FREETYPE2_PKG_ERRORS" >&5
31323
31324	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31325$as_echo "no" >&6; }
31326                FREETYPE2_FOUND=no
31327elif test $pkg_failed = untried; then
31328	FREETYPE2_FOUND=no
31329else
31330	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31331	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31333$as_echo "yes" >&6; }
31334	FREETYPE2_FOUND=yes
31335fi
31336            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31337            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31338            USING_SYSTEM_FT_LIB=true
31339            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31340            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31341              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31342            fi
31343	fi
31344	if test "x$FREETYPE2_FOUND" = xno; then
31345	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31346$as_echo_n "checking for freetype in some standard locations... " >&6; }
31347
31348	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31349	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31350	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31351	    fi
31352	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31353	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31354	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31355	    fi
31356
31357	    PREV_CXXCFLAGS="$CXXFLAGS"
31358	    PREV_LDFLAGS="$LDFLAGS"
31359	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31360	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31361	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31362/* end confdefs.h.  */
31363#include<ft2build.h>
31364	                    #include FT_FREETYPE_H
31365	                   int main() { return 0; }
31366
31367_ACEOF
31368if ac_fn_cxx_try_link "$LINENO"; then :
31369
31370	                      # Yes, the default cflags and libs did the trick.
31371	                      FREETYPE2_FOUND=yes
31372	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31373	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31374
31375else
31376
31377	                      FREETYPE2_FOUND=no
31378
31379fi
31380rm -f core conftest.err conftest.$ac_objext \
31381    conftest$ac_exeext conftest.$ac_ext
31382            CXXCFLAGS="$PREV_CXXFLAGS"
31383	    LDFLAGS="$PREV_LDFLAGS"
31384	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31385$as_echo "$FREETYPE2_FOUND" >&6; }
31386            USING_SYSTEM_FT_LIB=true
31387	fi
31388	if test "x$FREETYPE2_FOUND" = xno; then
31389
31390    # Print a helpful message on how to acquire the necessary build dependency.
31391    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31392    MISSING_DEPENDENCY=freetype2
31393    PKGHANDLER_COMMAND=
31394
31395    case $PKGHANDLER in
31396	apt-get)
31397                apt_help     $MISSING_DEPENDENCY ;;
31398    yum)
31399                yum_help     $MISSING_DEPENDENCY ;;
31400	port)
31401                port_help    $MISSING_DEPENDENCY ;;
31402	pkgutil)
31403                pkgutil_help $MISSING_DEPENDENCY ;;
31404	pkgadd)
31405                pkgadd_help  $MISSING_DEPENDENCY ;;
31406    * )
31407      break ;;
31408    esac
31409
31410    if test "x$PKGHANDLER_COMMAND" != x; then
31411        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31412    fi
31413
31414		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31415	fi
31416
31417        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31418            # AC_CHECK_LIB does not support use of cl.exe
31419            PREV_LDFLAGS="$LDFLAGS"
31420            LDFLAGS="$FREETYPE2_LIBS"
31421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31422$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31423if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31424  $as_echo_n "(cached) " >&6
31425else
31426  ac_check_lib_save_LIBS=$LIBS
31427LIBS="-lfreetype  $LIBS"
31428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31429/* end confdefs.h.  */
31430
31431/* Override any GCC internal prototype to avoid an error.
31432   Use char because int might match the return type of a GCC
31433   builtin and then its argument prototype would still apply.  */
31434#ifdef __cplusplus
31435extern "C"
31436#endif
31437char FT_Init_FreeType ();
31438int
31439main ()
31440{
31441return FT_Init_FreeType ();
31442  ;
31443  return 0;
31444}
31445_ACEOF
31446if ac_fn_cxx_try_link "$LINENO"; then :
31447  ac_cv_lib_freetype_FT_Init_FreeType=yes
31448else
31449  ac_cv_lib_freetype_FT_Init_FreeType=no
31450fi
31451rm -f core conftest.err conftest.$ac_objext \
31452    conftest$ac_exeext conftest.$ac_ext
31453LIBS=$ac_check_lib_save_LIBS
31454fi
31455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31456$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31457if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31458  FREETYPE2_FOUND=true
31459else
31460  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31461fi
31462
31463            LDFLAGS="$PREV_LDFLAGS"
31464        fi
31465fi
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475###############################################################################
31476#
31477# Check for alsa headers and libraries. Used on Linux/GNU systems.
31478#
31479
31480# Check whether --with-alsa was given.
31481if test "${with_alsa+set}" = set; then :
31482  withval=$with_alsa;
31483fi
31484
31485
31486# Check whether --with-alsa-include was given.
31487if test "${with_alsa_include+set}" = set; then :
31488  withval=$with_alsa_include;
31489fi
31490
31491
31492# Check whether --with-alsa-lib was given.
31493if test "${with_alsa_lib+set}" = set; then :
31494  withval=$with_alsa_lib;
31495fi
31496
31497
31498if test "x$ALSA_NOT_NEEDED" = xyes; then
31499	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31500		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31501$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31502	fi
31503	ALSA_CFLAGS=
31504	ALSA_LIBS=
31505else
31506	ALSA_FOUND=no
31507
31508	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31509	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31510	fi
31511
31512	if test "x${with_alsa}" != x; then
31513	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31514	    ALSA_CFLAGS="-I${with_alsa}/include"
31515	    ALSA_FOUND=yes
31516	fi
31517	if test "x${with_alsa_include}" != x; then
31518	    ALSA_CFLAGS="-I${with_alsa_include}"
31519	    ALSA_FOUND=yes
31520	fi
31521	if test "x${with_alsa_lib}" != x; then
31522	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31523	    ALSA_FOUND=yes
31524	fi
31525	if test "x$ALSA_FOUND" = xno; then
31526
31527
31528    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31529        # Source the builddeps file again, to make sure it uses the latest variables!
31530        . $builddepsfile
31531        # Look for a target and build machine specific resource!
31532        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31533        if test "x$resource" = x; then
31534            # Ok, lets instead look for a target specific resource
31535            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31536        fi
31537        if test "x$resource" = x; then
31538            # Ok, lets instead look for a build specific resource
31539            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31540        fi
31541        if test "x$resource" = x; then
31542            # Ok, lets instead look for a generic resource
31543            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31544            resource=${builddep_alsa}
31545        fi
31546        if test "x$resource" != x; then
31547            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31548$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31549	    # If the resource in the builddeps.conf file is an existing directory,
31550	    # for example /java/linux/cups
31551	    if test -d ${resource}; then
31552	       depdir=${resource}
31553	    else
31554
31555# alsa is for example mymodule
31556# $resource is for example libs/general/libmymod_1_2_3.zip
31557# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31558# $with_builddeps_dir is for example /localhome/builddeps
31559# depdir is the name of the variable into which we store the depdir, eg MYMOD
31560# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31561# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31562    filename=`basename $resource`
31563    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31564    filebase=${filename%%.*}
31565    extension=${filename#*.}
31566    installdir=$with_builddeps_dir/$filebase
31567    if test ! -f $installdir/$filename.unpacked; then
31568        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31569$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31570        if test ! -d $installdir; then
31571            mkdir -p $installdir
31572        fi
31573        if test ! -d $installdir; then
31574            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31575        fi
31576        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31577        touch $tmpfile
31578        if test ! -f $tmpfile; then
31579            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31580        fi
31581
31582    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31583    # $tmpfile is the local file name for the downloaded file.
31584    VALID_TOOL=no
31585    if test "x$BDEPS_FTP" = xwget; then
31586       VALID_TOOL=yes
31587       wget -O $tmpfile $with_builddeps_server/$resource
31588    fi
31589    if test "x$BDEPS_FTP" = xlftp; then
31590       VALID_TOOL=yes
31591       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31592    fi
31593    if test "x$BDEPS_FTP" = xftp; then
31594        VALID_TOOL=yes
31595        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31596        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31597        FTPUSERPWD=${FTPSERVER%%@*}
31598        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31599            FTPUSER=${userpwd%%:*}
31600            FTPPWD=${userpwd#*@}
31601            FTPSERVER=${FTPSERVER#*@}
31602        else
31603            FTPUSER=ftp
31604            FTPPWD=ftp
31605        fi
31606        # the "pass" command does not work on some
31607        # ftp clients (read ftp.exe) but if it works,
31608        # passive mode is better!
31609        (\
31610            echo "user $FTPUSER $FTPPWD"        ;\
31611            echo "pass"                         ;\
31612            echo "bin"                          ;\
31613            echo "get $FTPPATH $tmpfile"              ;\
31614        ) | ftp -in $FTPSERVER
31615    fi
31616    if test "x$VALID_TOOL" != xyes; then
31617       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31618    fi
31619
31620        mv $tmpfile $installdir/$filename
31621        if test ! -s $installdir/$filename; then
31622            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31623        fi
31624        case "$extension" in
31625            zip)  echo "Unzipping $installdir/$filename..."
31626               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31627            ;;
31628            tar.gz) echo "Untaring $installdir/$filename..."
31629               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31630            ;;
31631            tgz) echo "Untaring $installdir/$filename..."
31632               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31633            ;;
31634            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31635            ;;
31636        esac
31637    fi
31638    if test -f $installdir/$filename.unpacked; then
31639        depdir=$installdir
31640    fi
31641
31642	    fi
31643            # Source the builddeps file again, because in the previous command, the depdir
31644            # was updated to point at the current build dependency install directory.
31645            . $builddepsfile
31646            # Now extract variables from the builddeps.conf files.
31647            theroot=${builddep_alsa_ROOT}
31648            thecflags=${builddep_alsa_CFLAGS}
31649            thelibs=${builddep_alsa_LIBS}
31650            if test "x$depdir" = x; then
31651                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31652            fi
31653            ALSA=$depdir
31654            if test "x$theroot" != x; then
31655               ALSA="$theroot"
31656            fi
31657            if test "x$thecflags" != x; then
31658               ALSA_CFLAGS="$thecflags"
31659            fi
31660            if test "x$thelibs" != x; then
31661               ALSA_LIBS="$thelibs"
31662            fi
31663            ALSA_FOUND=yes
31664            else ALSA_FOUND=no
31665
31666        fi
31667        else ALSA_FOUND=no
31668
31669    fi
31670
31671	fi
31672	if test "x$ALSA_FOUND" = xno; then
31673
31674pkg_failed=no
31675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31676$as_echo_n "checking for ALSA... " >&6; }
31677
31678if test -n "$ALSA_CFLAGS"; then
31679    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31680 elif test -n "$PKG_CONFIG"; then
31681    if test -n "$PKG_CONFIG" && \
31682    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31683  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31684  ac_status=$?
31685  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31686  test $ac_status = 0; }; then
31687  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31688else
31689  pkg_failed=yes
31690fi
31691 else
31692    pkg_failed=untried
31693fi
31694if test -n "$ALSA_LIBS"; then
31695    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31696 elif test -n "$PKG_CONFIG"; then
31697    if test -n "$PKG_CONFIG" && \
31698    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31699  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31700  ac_status=$?
31701  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31702  test $ac_status = 0; }; then
31703  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31704else
31705  pkg_failed=yes
31706fi
31707 else
31708    pkg_failed=untried
31709fi
31710
31711
31712
31713if test $pkg_failed = yes; then
31714
31715if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31716        _pkg_short_errors_supported=yes
31717else
31718        _pkg_short_errors_supported=no
31719fi
31720        if test $_pkg_short_errors_supported = yes; then
31721	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31722        else
31723	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31724        fi
31725	# Put the nasty error message in config.log where it belongs
31726	echo "$ALSA_PKG_ERRORS" >&5
31727
31728	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31729$as_echo "no" >&6; }
31730                ALSA_FOUND=no
31731elif test $pkg_failed = untried; then
31732	ALSA_FOUND=no
31733else
31734	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31735	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31737$as_echo "yes" >&6; }
31738	ALSA_FOUND=yes
31739fi
31740	fi
31741	if test "x$ALSA_FOUND" = xno; then
31742	    for ac_header in alsa/asoundlib.h
31743do :
31744  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31745if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31746  cat >>confdefs.h <<_ACEOF
31747#define HAVE_ALSA_ASOUNDLIB_H 1
31748_ACEOF
31749 ALSA_FOUND=yes
31750	                      ALSA_CFLAGS=-Iignoreme
31751	                      ALSA_LIBS=-lasound
31752	                      DEFAULT_ALSA=yes
31753else
31754  ALSA_FOUND=no
31755fi
31756
31757done
31758
31759	fi
31760	if test "x$ALSA_FOUND" = xno; then
31761
31762    # Print a helpful message on how to acquire the necessary build dependency.
31763    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31764    MISSING_DEPENDENCY=alsa
31765    PKGHANDLER_COMMAND=
31766
31767    case $PKGHANDLER in
31768	apt-get)
31769                apt_help     $MISSING_DEPENDENCY ;;
31770    yum)
31771                yum_help     $MISSING_DEPENDENCY ;;
31772	port)
31773                port_help    $MISSING_DEPENDENCY ;;
31774	pkgutil)
31775                pkgutil_help $MISSING_DEPENDENCY ;;
31776	pkgadd)
31777                pkgadd_help  $MISSING_DEPENDENCY ;;
31778    * )
31779      break ;;
31780    esac
31781
31782    if test "x$PKGHANDLER_COMMAND" != x; then
31783        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31784    fi
31785
31786	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31787	fi
31788fi
31789
31790
31791
31792
31793
31794
31795
31796###############################################################################
31797#
31798# Check for the jpeg library
31799#
31800
31801USE_EXTERNAL_LIBJPEG=true
31802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31803$as_echo_n "checking for main in -ljpeg... " >&6; }
31804if ${ac_cv_lib_jpeg_main+:} false; then :
31805  $as_echo_n "(cached) " >&6
31806else
31807  ac_check_lib_save_LIBS=$LIBS
31808LIBS="-ljpeg  $LIBS"
31809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31810/* end confdefs.h.  */
31811
31812
31813int
31814main ()
31815{
31816return main ();
31817  ;
31818  return 0;
31819}
31820_ACEOF
31821if ac_fn_cxx_try_link "$LINENO"; then :
31822  ac_cv_lib_jpeg_main=yes
31823else
31824  ac_cv_lib_jpeg_main=no
31825fi
31826rm -f core conftest.err conftest.$ac_objext \
31827    conftest$ac_exeext conftest.$ac_ext
31828LIBS=$ac_check_lib_save_LIBS
31829fi
31830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31831$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31832if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31833  cat >>confdefs.h <<_ACEOF
31834#define HAVE_LIBJPEG 1
31835_ACEOF
31836
31837  LIBS="-ljpeg $LIBS"
31838
31839else
31840   USE_EXTERNAL_LIBJPEG=false
31841               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31842$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31843
31844fi
31845
31846
31847
31848###############################################################################
31849#
31850# Check for the gif library
31851#
31852
31853
31854# Check whether --with-giflib was given.
31855if test "${with_giflib+set}" = set; then :
31856  withval=$with_giflib;
31857fi
31858
31859
31860
31861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31862$as_echo_n "checking for which giflib to use... " >&6; }
31863
31864# default is bundled
31865DEFAULT_GIFLIB=bundled
31866
31867#
31868# if user didn't specify, use DEFAULT_GIFLIB
31869#
31870if test "x${with_giflib}" = "x"; then
31871    with_giflib=${DEFAULT_GIFLIB}
31872fi
31873
31874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31875$as_echo "${with_giflib}" >&6; }
31876
31877if test "x${with_giflib}" = "xbundled"; then
31878    USE_EXTERNAL_LIBGIF=false
31879elif test "x${with_giflib}" = "xsystem"; then
31880    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31881if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31882
31883else
31884   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31885fi
31886
31887
31888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31889$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31890if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
31891  $as_echo_n "(cached) " >&6
31892else
31893  ac_check_lib_save_LIBS=$LIBS
31894LIBS="-lgif  $LIBS"
31895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31896/* end confdefs.h.  */
31897
31898/* Override any GCC internal prototype to avoid an error.
31899   Use char because int might match the return type of a GCC
31900   builtin and then its argument prototype would still apply.  */
31901#ifdef __cplusplus
31902extern "C"
31903#endif
31904char DGifGetCode ();
31905int
31906main ()
31907{
31908return DGifGetCode ();
31909  ;
31910  return 0;
31911}
31912_ACEOF
31913if ac_fn_cxx_try_link "$LINENO"; then :
31914  ac_cv_lib_gif_DGifGetCode=yes
31915else
31916  ac_cv_lib_gif_DGifGetCode=no
31917fi
31918rm -f core conftest.err conftest.$ac_objext \
31919    conftest$ac_exeext conftest.$ac_ext
31920LIBS=$ac_check_lib_save_LIBS
31921fi
31922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31923$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31924if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
31925  cat >>confdefs.h <<_ACEOF
31926#define HAVE_LIBGIF 1
31927_ACEOF
31928
31929  LIBS="-lgif $LIBS"
31930
31931else
31932   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31933fi
31934
31935
31936    USE_EXTERNAL_LIBGIF=true
31937else
31938    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31939fi
31940
31941
31942###############################################################################
31943#
31944# Check for the zlib library
31945#
31946
31947
31948# Check whether --with-zlib was given.
31949if test "${with_zlib+set}" = set; then :
31950  withval=$with_zlib;
31951fi
31952
31953
31954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31955$as_echo_n "checking for compress in -lz... " >&6; }
31956if ${ac_cv_lib_z_compress+:} false; then :
31957  $as_echo_n "(cached) " >&6
31958else
31959  ac_check_lib_save_LIBS=$LIBS
31960LIBS="-lz  $LIBS"
31961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31962/* end confdefs.h.  */
31963
31964/* Override any GCC internal prototype to avoid an error.
31965   Use char because int might match the return type of a GCC
31966   builtin and then its argument prototype would still apply.  */
31967#ifdef __cplusplus
31968extern "C"
31969#endif
31970char compress ();
31971int
31972main ()
31973{
31974return compress ();
31975  ;
31976  return 0;
31977}
31978_ACEOF
31979if ac_fn_cxx_try_link "$LINENO"; then :
31980  ac_cv_lib_z_compress=yes
31981else
31982  ac_cv_lib_z_compress=no
31983fi
31984rm -f core conftest.err conftest.$ac_objext \
31985    conftest$ac_exeext conftest.$ac_ext
31986LIBS=$ac_check_lib_save_LIBS
31987fi
31988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31989$as_echo "$ac_cv_lib_z_compress" >&6; }
31990if test "x$ac_cv_lib_z_compress" = xyes; then :
31991   ZLIB_FOUND=yes
31992else
31993   ZLIB_FOUND=no
31994fi
31995
31996
31997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31998$as_echo_n "checking for which zlib to use... " >&6; }
31999
32000DEFAULT_ZLIB=bundled
32001if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32002#
32003# On macosx default is system...on others default is
32004#
32005    DEFAULT_ZLIB=system
32006fi
32007
32008if test "x${ZLIB_FOUND}" != "xyes"; then
32009#
32010# If we don't find any system...set default to bundled
32011#
32012    DEFAULT_ZLIB=bundled
32013fi
32014
32015#
32016# If user didn't specify, use DEFAULT_ZLIB
32017#
32018if test "x${with_zlib}" = "x"; then
32019    with_zlib=${DEFAULT_ZLIB}
32020fi
32021
32022if test "x${with_zlib}" = "xbundled"; then
32023    USE_EXTERNAL_LIBZ=false
32024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32025$as_echo "bundled" >&6; }
32026elif test "x${with_zlib}" = "xsystem"; then
32027    if test "x${ZLIB_FOUND}" = "xyes"; then
32028        USE_EXTERNAL_LIBZ=true
32029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32030$as_echo "system" >&6; }
32031    else
32032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32033$as_echo "system not found" >&6; }
32034        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32035    fi
32036else
32037    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32038fi
32039
32040
32041
32042###############################################################################
32043LIBZIP_CAN_USE_MMAP=true
32044
32045
32046
32047###############################################################################
32048#
32049# Check if altzone exists in time.h
32050#
32051
32052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32053/* end confdefs.h.  */
32054#include <time.h>
32055int
32056main ()
32057{
32058return (int)altzone;
32059  ;
32060  return 0;
32061}
32062_ACEOF
32063if ac_fn_cxx_try_link "$LINENO"; then :
32064  has_altzone=yes
32065else
32066  has_altzone=no
32067fi
32068rm -f core conftest.err conftest.$ac_objext \
32069    conftest$ac_exeext conftest.$ac_ext
32070if test "x$has_altzone" = xyes; then
32071
32072$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32073
32074fi
32075
32076###############################################################################
32077#
32078# Check the maths library
32079#
32080
32081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32082$as_echo_n "checking for cos in -lm... " >&6; }
32083if ${ac_cv_lib_m_cos+:} false; then :
32084  $as_echo_n "(cached) " >&6
32085else
32086  ac_check_lib_save_LIBS=$LIBS
32087LIBS="-lm  $LIBS"
32088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32089/* end confdefs.h.  */
32090
32091/* Override any GCC internal prototype to avoid an error.
32092   Use char because int might match the return type of a GCC
32093   builtin and then its argument prototype would still apply.  */
32094#ifdef __cplusplus
32095extern "C"
32096#endif
32097char cos ();
32098int
32099main ()
32100{
32101return cos ();
32102  ;
32103  return 0;
32104}
32105_ACEOF
32106if ac_fn_cxx_try_link "$LINENO"; then :
32107  ac_cv_lib_m_cos=yes
32108else
32109  ac_cv_lib_m_cos=no
32110fi
32111rm -f core conftest.err conftest.$ac_objext \
32112    conftest$ac_exeext conftest.$ac_ext
32113LIBS=$ac_check_lib_save_LIBS
32114fi
32115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32116$as_echo "$ac_cv_lib_m_cos" >&6; }
32117if test "x$ac_cv_lib_m_cos" = xyes; then :
32118  cat >>confdefs.h <<_ACEOF
32119#define HAVE_LIBM 1
32120_ACEOF
32121
32122  LIBS="-lm $LIBS"
32123
32124else
32125
32126                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32127$as_echo "$as_me: Maths library was not found" >&6;}
32128
32129fi
32130
32131
32132
32133###############################################################################
32134#
32135# Check for libdl.so
32136
32137save_LIBS="$LIBS"
32138LIBS=""
32139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32140$as_echo_n "checking for dlopen in -ldl... " >&6; }
32141if ${ac_cv_lib_dl_dlopen+:} false; then :
32142  $as_echo_n "(cached) " >&6
32143else
32144  ac_check_lib_save_LIBS=$LIBS
32145LIBS="-ldl  $LIBS"
32146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32147/* end confdefs.h.  */
32148
32149/* Override any GCC internal prototype to avoid an error.
32150   Use char because int might match the return type of a GCC
32151   builtin and then its argument prototype would still apply.  */
32152#ifdef __cplusplus
32153extern "C"
32154#endif
32155char dlopen ();
32156int
32157main ()
32158{
32159return dlopen ();
32160  ;
32161  return 0;
32162}
32163_ACEOF
32164if ac_fn_cxx_try_link "$LINENO"; then :
32165  ac_cv_lib_dl_dlopen=yes
32166else
32167  ac_cv_lib_dl_dlopen=no
32168fi
32169rm -f core conftest.err conftest.$ac_objext \
32170    conftest$ac_exeext conftest.$ac_ext
32171LIBS=$ac_check_lib_save_LIBS
32172fi
32173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32174$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32175if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32176  cat >>confdefs.h <<_ACEOF
32177#define HAVE_LIBDL 1
32178_ACEOF
32179
32180  LIBS="-ldl $LIBS"
32181
32182fi
32183
32184LIBDL="$LIBS"
32185
32186LIBS="$save_LIBS"
32187
32188
32189
32190###############################################################################
32191#
32192# statically link libstdc++ before C++ ABI is stablized on Linux unless
32193# dynamic build is configured on command line.
32194#
32195
32196# Check whether --with-stdc++lib was given.
32197if test "${with_stdc__lib+set}" = set; then :
32198  withval=$with_stdc__lib;
32199    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32200        && test "x$with_stdc__lib" != xdefault; then
32201      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32202    fi
32203
32204else
32205  with_stdc__lib=default
32206
32207fi
32208
32209
32210if test "x$OPENJDK_TARGET_OS" = xlinux; then
32211    # Test if -lstdc++ works.
32212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32213$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32214    ac_ext=cpp
32215ac_cpp='$CXXCPP $CPPFLAGS'
32216ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32217ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32218ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32219
32220    OLD_CXXFLAGS="$CXXFLAGS"
32221    CXXFLAGS="$CXXFLAGS -lstdc++"
32222    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32223/* end confdefs.h.  */
32224
32225int
32226main ()
32227{
32228return 0;
32229  ;
32230  return 0;
32231}
32232_ACEOF
32233if ac_fn_cxx_try_link "$LINENO"; then :
32234  has_dynamic_libstdcxx=yes
32235else
32236  has_dynamic_libstdcxx=no
32237fi
32238rm -f core conftest.err conftest.$ac_objext \
32239    conftest$ac_exeext conftest.$ac_ext
32240    CXXFLAGS="$OLD_CXXFLAGS"
32241    ac_ext=cpp
32242ac_cpp='$CXXCPP $CPPFLAGS'
32243ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32244ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32245ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32246
32247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32248$as_echo "$has_dynamic_libstdcxx" >&6; }
32249
32250    # Test if stdc++ can be linked statically.
32251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32252$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32253    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32254    ac_ext=cpp
32255ac_cpp='$CXXCPP $CPPFLAGS'
32256ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32257ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32258ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32259
32260    OLD_LIBS="$LIBS"
32261    OLD_CXX="$CXX"
32262    LIBS="$STATIC_STDCXX_FLAGS"
32263    CXX="$CC"
32264    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32265/* end confdefs.h.  */
32266
32267int
32268main ()
32269{
32270return 0;
32271  ;
32272  return 0;
32273}
32274_ACEOF
32275if ac_fn_cxx_try_link "$LINENO"; then :
32276  has_static_libstdcxx=yes
32277else
32278  has_static_libstdcxx=no
32279fi
32280rm -f core conftest.err conftest.$ac_objext \
32281    conftest$ac_exeext conftest.$ac_ext
32282    LIBS="$OLD_LIBS"
32283    CXX="$OLD_CXX"
32284    ac_ext=cpp
32285ac_cpp='$CXXCPP $CPPFLAGS'
32286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32289
32290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32291$as_echo "$has_static_libstdcxx" >&6; }
32292
32293    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32294        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32295    fi
32296
32297    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32298        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32299    fi
32300
32301    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32302        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32303    fi
32304
32305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32306$as_echo_n "checking how to link with libstdc++... " >&6; }
32307    # If dynamic was requested, it's available since it would fail above otherwise.
32308    # If dynamic wasn't requested, go with static unless it isn't available.
32309    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32310        LIBCXX="$LIBCXX -lstdc++"
32311        LDCXX="$CXX"
32312        STATIC_CXX_SETTING="STATIC_CXX=false"
32313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32314$as_echo "dynamic" >&6; }
32315    else
32316        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32317        LDCXX="$CC"
32318        STATIC_CXX_SETTING="STATIC_CXX=true"
32319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32320$as_echo "static" >&6; }
32321    fi
32322fi
32323
32324
32325if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32326    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32327
32328pkg_failed=no
32329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32330$as_echo_n "checking for LIBFFI... " >&6; }
32331
32332if test -n "$LIBFFI_CFLAGS"; then
32333    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32334 elif test -n "$PKG_CONFIG"; then
32335    if test -n "$PKG_CONFIG" && \
32336    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32337  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32338  ac_status=$?
32339  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32340  test $ac_status = 0; }; then
32341  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32342else
32343  pkg_failed=yes
32344fi
32345 else
32346    pkg_failed=untried
32347fi
32348if test -n "$LIBFFI_LIBS"; then
32349    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32350 elif test -n "$PKG_CONFIG"; then
32351    if test -n "$PKG_CONFIG" && \
32352    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32353  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32354  ac_status=$?
32355  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32356  test $ac_status = 0; }; then
32357  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32358else
32359  pkg_failed=yes
32360fi
32361 else
32362    pkg_failed=untried
32363fi
32364
32365
32366
32367if test $pkg_failed = yes; then
32368
32369if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32370        _pkg_short_errors_supported=yes
32371else
32372        _pkg_short_errors_supported=no
32373fi
32374        if test $_pkg_short_errors_supported = yes; then
32375	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32376        else
32377	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32378        fi
32379	# Put the nasty error message in config.log where it belongs
32380	echo "$LIBFFI_PKG_ERRORS" >&5
32381
32382	as_fn_error $? "Package requirements (libffi) were not met:
32383
32384$LIBFFI_PKG_ERRORS
32385
32386Consider adjusting the PKG_CONFIG_PATH environment variable if you
32387installed software in a non-standard prefix.
32388
32389Alternatively, you may set the environment variables LIBFFI_CFLAGS
32390and LIBFFI_LIBS to avoid the need to call pkg-config.
32391See the pkg-config man page for more details.
32392" "$LINENO" 5
32393elif test $pkg_failed = untried; then
32394	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32395$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32396as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32397is in your PATH or set the PKG_CONFIG environment variable to the full
32398path to pkg-config.
32399
32400Alternatively, you may set the environment variables LIBFFI_CFLAGS
32401and LIBFFI_LIBS to avoid the need to call pkg-config.
32402See the pkg-config man page for more details.
32403
32404To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32405See \`config.log' for more details" "$LINENO" 5; }
32406else
32407	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32408	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32410$as_echo "yes" >&6; }
32411	:
32412fi
32413
32414fi
32415
32416if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32417    # Extract the first word of "llvm-config", so it can be a program name with args.
32418set dummy llvm-config; ac_word=$2
32419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32420$as_echo_n "checking for $ac_word... " >&6; }
32421if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32422  $as_echo_n "(cached) " >&6
32423else
32424  if test -n "$LLVM_CONFIG"; then
32425  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32426else
32427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32428for as_dir in $PATH
32429do
32430  IFS=$as_save_IFS
32431  test -z "$as_dir" && as_dir=.
32432    for ac_exec_ext in '' $ac_executable_extensions; do
32433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32434    ac_cv_prog_LLVM_CONFIG="llvm-config"
32435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32436    break 2
32437  fi
32438done
32439  done
32440IFS=$as_save_IFS
32441
32442fi
32443fi
32444LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32445if test -n "$LLVM_CONFIG"; then
32446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32447$as_echo "$LLVM_CONFIG" >&6; }
32448else
32449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32450$as_echo "no" >&6; }
32451fi
32452
32453
32454
32455    if test "x$LLVM_CONFIG" != xllvm-config; then
32456        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32457    fi
32458
32459    llvm_components="jit mcjit engine nativecodegen native"
32460    unset LLVM_CFLAGS
32461    for flag in $("$LLVM_CONFIG" --cxxflags); do
32462      if echo "${flag}" | grep -q '^-[ID]'; then
32463        if test "${flag}" != "-D_DEBUG" ; then
32464          if test "${LLVM_CFLAGS}" != "" ; then
32465            LLVM_CFLAGS="${LLVM_CFLAGS} "
32466          fi
32467          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32468        fi
32469      fi
32470    done
32471    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32472    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32473
32474    unset LLVM_LDFLAGS
32475    for flag in $("${LLVM_CONFIG}" --ldflags); do
32476      if echo "${flag}" | grep -q '^-L'; then
32477        if test "${LLVM_LDFLAGS}" != ""; then
32478          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32479        fi
32480        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32481      fi
32482    done
32483
32484    unset LLVM_LIBS
32485    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32486      if echo "${flag}" | grep -q '^-l'; then
32487        if test "${LLVM_LIBS}" != ""; then
32488          LLVM_LIBS="${LLVM_LIBS} "
32489        fi
32490        LLVM_LIBS="${LLVM_LIBS}${flag}"
32491      fi
32492    done
32493
32494
32495
32496
32497fi
32498
32499# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32500if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32501    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32502fi
32503
32504# TODO better (platform agnostic) test
32505if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32506    LIBCXX="-lstdc++"
32507fi
32508
32509
32510
32511
32512
32513# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32514
32515# When using cygwin or msys, we need a wrapper binary that renames
32516# /cygdrive/c/ arguments into c:/ arguments and peeks into
32517# @files and rewrites these too! This wrapper binary is
32518# called fixpath.
32519FIXPATH=
32520if test "x$OPENJDK_BUILD_OS" = xwindows; then
32521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32522$as_echo_n "checking if fixpath can be created... " >&6; }
32523    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32524    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32525    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32526      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32527      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32528      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32529      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32530    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32531      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32532      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32533
32534      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32535      # @ was chosen as separator to minimize risk of other tools messing around with it
32536      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32537      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32538
32539      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32540    fi
32541    rm -f $OUTPUT_ROOT/fixpath*
32542    cd $OUTPUT_ROOT
32543    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32544    cd $CURDIR
32545
32546    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32548$as_echo "no" >&6; }
32549        cat $OUTPUT_ROOT/fixpath1.log
32550        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32551    fi
32552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32553$as_echo "yes" >&6; }
32554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32555$as_echo_n "checking if fixpath.exe works... " >&6; }
32556    cd $OUTPUT_ROOT
32557    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32558    cd $CURDIR
32559    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32561$as_echo "no" >&6; }
32562        cat $OUTPUT_ROOT/fixpath2.log
32563        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32564    fi
32565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32566$as_echo "yes" >&6; }
32567    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32568fi
32569
32570
32571
32572
32573###############################################################################
32574#
32575# We need to do some final tweaking, when everything else is done.
32576#
32577###############################################################################
32578
32579
32580HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32581
32582
32583# The name of the Service Agent jar.
32584SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32585if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32586  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32587fi
32588
32589
32590
32591
32592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32593$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32594
32595if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32596    ENABLE_INTREE_EC=yes
32597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32598$as_echo "yes" >&6; }
32599else
32600    ENABLE_INTREE_EC=no
32601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32602$as_echo "no" >&6; }
32603fi
32604
32605
32606
32607
32608###############################################################################
32609#
32610# Configure parts of the build that only affect the build performance,
32611# not the result.
32612#
32613###############################################################################
32614
32615
32616  # How many cores do we have on this build system?
32617
32618# Check whether --with-num-cores was given.
32619if test "${with_num_cores+set}" = set; then :
32620  withval=$with_num_cores;
32621fi
32622
32623  if test "x$with_num_cores" = x; then
32624    # The number of cores were not specified, try to probe them.
32625
32626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32627$as_echo_n "checking for number of cores... " >&6; }
32628    NUM_CORES=1
32629    FOUND_CORES=no
32630
32631    if test -f /proc/cpuinfo; then
32632        # Looks like a Linux (or cygwin) system
32633        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32634        FOUND_CORES=yes
32635    elif test -x /usr/sbin/psrinfo; then
32636        # Looks like a Solaris system
32637        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32638        FOUND_CORES=yes
32639    elif test -x /usr/sbin/system_profiler; then
32640        # Looks like a MacOSX system
32641        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32642        FOUND_CORES=yes
32643    elif test -n "$NUMBER_OF_PROCESSORS"; then
32644        # On windows, look in the env
32645        NUM_CORES=$NUMBER_OF_PROCESSORS
32646        FOUND_CORES=yes
32647    fi
32648
32649    if test "x$FOUND_CORES" = xyes; then
32650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32651$as_echo "$NUM_CORES" >&6; }
32652    else
32653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32654$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32656$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32657    fi
32658
32659
32660  else
32661    NUM_CORES=$with_num_cores
32662  fi
32663
32664
32665
32666  # How much memory do we have on this build system?
32667
32668# Check whether --with-memory-size was given.
32669if test "${with_memory_size+set}" = set; then :
32670  withval=$with_memory_size;
32671fi
32672
32673  if test "x$with_memory_size" = x; then
32674    # The memory size was not specified, try to probe it.
32675
32676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32677$as_echo_n "checking for memory size... " >&6; }
32678    # Default to 1024 MB
32679    MEMORY_SIZE=1024
32680    FOUND_MEM=no
32681
32682    if test -f /proc/meminfo; then
32683        # Looks like a Linux (or cygwin) system
32684        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32685        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32686        FOUND_MEM=yes
32687    elif test -x /usr/sbin/prtconf; then
32688        # Looks like a Solaris system
32689        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32690        FOUND_MEM=yes
32691    elif test -x /usr/sbin/system_profiler; then
32692        # Looks like a MacOSX system
32693        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32694        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32695        FOUND_MEM=yes
32696    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32697        # Windows, but without cygwin
32698        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32699        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32700        FOUND_MEM=yes
32701    fi
32702
32703    if test "x$FOUND_MEM" = xyes; then
32704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32705$as_echo "$MEMORY_SIZE MB" >&6; }
32706    else
32707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32708$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32710$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32711    fi
32712
32713  else
32714    MEMORY_SIZE=$with_memory_size
32715  fi
32716
32717
32718
32719  # Provide a decent default number of parallel jobs for make depending on
32720  # number of cores, amount of memory and machine architecture.
32721
32722# Check whether --with-jobs was given.
32723if test "${with_jobs+set}" = set; then :
32724  withval=$with_jobs;
32725fi
32726
32727  if test "x$with_jobs" = x; then
32728    # Number of jobs was not specified, calculate.
32729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32730$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32731    # Approximate memory in GB, rounding up a bit.
32732    memory_gb=`expr $MEMORY_SIZE / 1100`
32733    # Pick the lowest of memory in gb and number of cores.
32734    if test "$memory_gb" -lt "$NUM_CORES"; then
32735      JOBS="$memory_gb"
32736    else
32737      JOBS="$NUM_CORES"
32738      # On bigger machines, leave some room for other processes to run
32739      if test "$JOBS" -gt "4"; then
32740        JOBS=`expr $JOBS '*' 90 / 100`
32741      fi
32742    fi
32743    # Cap number of jobs to 16
32744    if test "$JOBS" -gt "16"; then
32745      JOBS=16
32746    fi
32747    if test "$JOBS" -eq "0"; then
32748      JOBS=1
32749    fi
32750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32751$as_echo "$JOBS" >&6; }
32752  else
32753    JOBS=$with_jobs
32754  fi
32755
32756
32757
32758# Setup smart javac (after cores and memory have been setup)
32759
32760
32761# Check whether --with-sjavac-server-java was given.
32762if test "${with_sjavac_server_java+set}" = set; then :
32763  withval=$with_sjavac_server_java;
32764fi
32765
32766
32767if test "x$with_sjavac_server_java" != x; then
32768    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32769    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32770    if test "x$FOUND_VERSION" = x; then
32771        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32772    fi
32773else
32774    SJAVAC_SERVER_JAVA=""
32775    # Hotspot specific options.
32776
32777    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32778    $ECHO "Command: $JAVA -verbosegc -version" >&5
32779    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32780    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32781    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32782    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32783        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32784	JVM_ARG_OK=true
32785    else
32786	$ECHO "Arg failed:" >&5
32787	$ECHO "$OUTPUT" >&5
32788	JVM_ARG_OK=false
32789    fi
32790
32791    # JRockit specific options.
32792
32793    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32794    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32795    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32796    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32797    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32798    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32799        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32800	JVM_ARG_OK=true
32801    else
32802	$ECHO "Arg failed:" >&5
32803	$ECHO "$OUTPUT" >&5
32804	JVM_ARG_OK=false
32805    fi
32806
32807    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32808fi
32809
32810
32811if test "$MEMORY_SIZE" -gt "2500"; then
32812
32813    $ECHO "Check if jvm arg is ok: -d64" >&5
32814    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32815    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32816    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32817    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32818    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32819        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32820	JVM_ARG_OK=true
32821    else
32822	$ECHO "Arg failed:" >&5
32823	$ECHO "$OUTPUT" >&5
32824	JVM_ARG_OK=false
32825    fi
32826
32827    if test "$JVM_ARG_OK" = true; then
32828        JVM_64BIT=true
32829	JVM_ARG_OK=false
32830    fi
32831    fi
32832
32833if test "$JVM_64BIT" = true; then
32834    if test "$MEMORY_SIZE" -gt "17000"; then
32835
32836    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32837    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32838    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32839    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32840    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32841    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32842        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32843	JVM_ARG_OK=true
32844    else
32845	$ECHO "Arg failed:" >&5
32846	$ECHO "$OUTPUT" >&5
32847	JVM_ARG_OK=false
32848    fi
32849
32850    fi
32851    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32852
32853    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32854    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32855    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32856    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32857    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32858    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32859        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32860	JVM_ARG_OK=true
32861    else
32862	$ECHO "Arg failed:" >&5
32863	$ECHO "$OUTPUT" >&5
32864	JVM_ARG_OK=false
32865    fi
32866
32867    fi
32868    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32869
32870    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32871    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32872    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32873    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32874    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32875    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32876        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32877	JVM_ARG_OK=true
32878    else
32879	$ECHO "Arg failed:" >&5
32880	$ECHO "$OUTPUT" >&5
32881	JVM_ARG_OK=false
32882    fi
32883
32884    fi
32885    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32886
32887    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32888    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32889    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32890    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32891    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32892    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32893        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32894	JVM_ARG_OK=true
32895    else
32896	$ECHO "Arg failed:" >&5
32897	$ECHO "$OUTPUT" >&5
32898	JVM_ARG_OK=false
32899    fi
32900
32901    fi
32902fi
32903if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32904
32905    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32906    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32907    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32908    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32909    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32910    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32911        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
32912	JVM_ARG_OK=true
32913    else
32914	$ECHO "Arg failed:" >&5
32915	$ECHO "$OUTPUT" >&5
32916	JVM_ARG_OK=false
32917    fi
32918
32919fi
32920if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
32921
32922    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
32923    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
32924    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
32925    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32926    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32927    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32928        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32929	JVM_ARG_OK=true
32930    else
32931	$ECHO "Arg failed:" >&5
32932	$ECHO "$OUTPUT" >&5
32933	JVM_ARG_OK=false
32934    fi
32935
32936fi
32937if test "$JVM_ARG_OK" = false; then
32938
32939    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
32940    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
32941    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
32942    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32943    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32944    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32945        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32946	JVM_ARG_OK=true
32947    else
32948	$ECHO "Arg failed:" >&5
32949	$ECHO "$OUTPUT" >&5
32950	JVM_ARG_OK=false
32951    fi
32952
32953fi
32954
32955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32956$as_echo_n "checking whether to use sjavac... " >&6; }
32957# Check whether --enable-sjavac was given.
32958if test "${enable_sjavac+set}" = set; then :
32959  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32960else
32961  ENABLE_SJAVAC='no'
32962fi
32963
32964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32965$as_echo "$ENABLE_SJAVAC" >&6; }
32966
32967
32968if test "x$ENABLE_SJAVAC" = xyes; then
32969    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32970else
32971    SJAVAC_SERVER_DIR=
32972fi
32973
32974
32975
32976
32977# Can the C/C++ compiler use precompiled headers?
32978
32979
32980###############################################################################
32981#
32982# Can the C/C++ compiler use precompiled headers?
32983#
32984# Check whether --enable-precompiled-headers was given.
32985if test "${enable_precompiled_headers+set}" = set; then :
32986  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32987else
32988  ENABLE_PRECOMPH=yes
32989fi
32990
32991
32992USE_PRECOMPILED_HEADER=1
32993if test "x$ENABLE_PRECOMPH" = xno; then
32994    USE_PRECOMPILED_HEADER=0
32995fi
32996
32997if test "x$ENABLE_PRECOMPH" = xyes; then
32998    # Check that the compiler actually supports precomp headers.
32999    if test "x$GCC" = xyes; then
33000         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33001$as_echo_n "checking that precompiled headers work... " >&6; }
33002         echo "int alfa();" > conftest.h
33003         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33004         if test ! -f conftest.hpp.gch; then
33005             USE_PRECOMPILED_HEADER=0
33006             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33007$as_echo "no" >&6; }
33008         else
33009             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33010$as_echo "yes" >&6; }
33011         fi
33012         rm -f conftest.h conftest.hpp.gch
33013    fi
33014fi
33015
33016
33017
33018
33019# Setup use of ccache, if available
33020
33021    # Check whether --enable-ccache was given.
33022if test "${enable_ccache+set}" = set; then :
33023  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33024else
33025  ENABLE_CCACHE=yes
33026fi
33027
33028    if test "x$ENABLE_CCACHE" = xyes; then
33029        OLD_PATH="$PATH"
33030        if test "x$TOOLS_DIR" != x; then
33031          PATH=$TOOLS_DIR:$PATH
33032        fi
33033        # Extract the first word of "ccache", so it can be a program name with args.
33034set dummy ccache; ac_word=$2
33035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33036$as_echo_n "checking for $ac_word... " >&6; }
33037if ${ac_cv_path_CCACHE+:} false; then :
33038  $as_echo_n "(cached) " >&6
33039else
33040  case $CCACHE in
33041  [\\/]* | ?:[\\/]*)
33042  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33043  ;;
33044  *)
33045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33046for as_dir in $PATH
33047do
33048  IFS=$as_save_IFS
33049  test -z "$as_dir" && as_dir=.
33050    for ac_exec_ext in '' $ac_executable_extensions; do
33051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33052    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33054    break 2
33055  fi
33056done
33057  done
33058IFS=$as_save_IFS
33059
33060  ;;
33061esac
33062fi
33063CCACHE=$ac_cv_path_CCACHE
33064if test -n "$CCACHE"; then
33065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33066$as_echo "$CCACHE" >&6; }
33067else
33068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33069$as_echo "no" >&6; }
33070fi
33071
33072
33073        PATH="$OLD_PATH"
33074    else
33075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33076$as_echo_n "checking for ccache... " >&6; }
33077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33078$as_echo "explicitly disabled" >&6; }
33079        CCACHE=
33080    fi
33081
33082
33083
33084# Check whether --with-ccache-dir was given.
33085if test "${with_ccache_dir+set}" = set; then :
33086  withval=$with_ccache_dir;
33087fi
33088
33089
33090    if test "x$with_ccache_dir" != x; then
33091        # When using a non home ccache directory, assume the use is to share ccache files
33092        # with other users. Thus change the umask.
33093        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33094    fi
33095    CCACHE_FOUND=""
33096    if test "x$CCACHE" != x; then
33097
33098    if test "x$CCACHE" != x; then
33099        CCACHE_FOUND="true"
33100        # Only use ccache if it is 3.1.4 or later, which supports
33101        # precompiled headers.
33102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33103$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33104        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33105        if test "x$HAS_GOOD_CCACHE" = x; then
33106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33107$as_echo "no, disabling ccache" >&6; }
33108            CCACHE=
33109        else
33110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33111$as_echo "yes" >&6; }
33112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33113$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33114            PUSHED_FLAGS="$CXXFLAGS"
33115            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33116            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33117/* end confdefs.h.  */
33118
33119int
33120main ()
33121{
33122
33123  ;
33124  return 0;
33125}
33126_ACEOF
33127if ac_fn_cxx_try_compile "$LINENO"; then :
33128  CC_KNOWS_CCACHE_TRICK=yes
33129else
33130  CC_KNOWS_CCACHE_TRICK=no
33131fi
33132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33133            CXXFLAGS="$PUSHED_FLAGS"
33134            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33135                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33136$as_echo "yes" >&6; }
33137            else
33138                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33139$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33140                CCACHE=
33141            fi
33142        fi
33143    fi
33144
33145    if test "x$CCACHE" != x; then
33146        CCACHE_SLOPPINESS=time_macros
33147        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33148        CCACHE_FLAGS=-fpch-preprocess
33149
33150        if test "x$SET_CCACHE_DIR" != x; then
33151            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33152	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33153        fi
33154    fi
33155
33156    fi
33157
33158
33159###############################################################################
33160#
33161# And now the finish...
33162#
33163###############################################################################
33164
33165# Check for some common pitfalls
33166
33167  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33168    file_to_test="$SRC_ROOT/LICENSE"
33169    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33170      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
33171    fi
33172  fi
33173
33174
33175
33176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33177$as_echo_n "checking if build directory is on local disk... " >&6; }
33178
33179	# df -l lists only local disks; if the given directory is not found then
33180	# a non-zero exit code is given
33181  if test "x$DF" = x; then
33182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33183      # msys does not have df; use Windows "net use" instead.
33184      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33185      if test "x$IS_NETWORK_DISK" = x; then
33186        OUTPUT_DIR_IS_LOCAL="yes"
33187      else
33188        OUTPUT_DIR_IS_LOCAL="no"
33189      fi
33190    else
33191      # No df here, say it's local
33192      OUTPUT_DIR_IS_LOCAL="yes"
33193    fi
33194  else
33195    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33196      OUTPUT_DIR_IS_LOCAL="yes"
33197    else
33198      OUTPUT_DIR_IS_LOCAL="no"
33199    fi
33200  fi
33201
33202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33203$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33204
33205
33206
33207# Check if the user has any old-style ALT_ variables set.
33208FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33209
33210# Before generating output files, test if they exist. If they do, this is a reconfigure.
33211# Since we can't properly handle the dependencies for this, warn the user about the situation
33212if test -e $OUTPUT_ROOT/spec.gmk; then
33213  IS_RECONFIGURE=yes
33214else
33215  IS_RECONFIGURE=no
33216fi
33217
33218if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33219  HIDE_PERFORMANCE_HINTS=yes
33220else
33221  HIDE_PERFORMANCE_HINTS=no
33222  # Hide it the next time around...
33223  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33224fi
33225
33226
33227
33228# At the end, call the custom hook. (Dummy macro if no custom sources available)
33229
33230
33231# We're messing a bit with internal autoconf variables to put the config.status
33232# in the output directory instead of the current directory.
33233CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33234
33235# Create the actual output files. Now the main work of configure is done.
33236cat >confcache <<\_ACEOF
33237# This file is a shell script that caches the results of configure
33238# tests run on this system so they can be shared between configure
33239# scripts and configure runs, see configure's option --config-cache.
33240# It is not useful on other systems.  If it contains results you don't
33241# want to keep, you may remove or edit it.
33242#
33243# config.status only pays attention to the cache file if you give it
33244# the --recheck option to rerun configure.
33245#
33246# `ac_cv_env_foo' variables (set or unset) will be overridden when
33247# loading this file, other *unset* `ac_cv_foo' will be assigned the
33248# following values.
33249
33250_ACEOF
33251
33252# The following way of writing the cache mishandles newlines in values,
33253# but we know of no workaround that is simple, portable, and efficient.
33254# So, we kill variables containing newlines.
33255# Ultrix sh set writes to stderr and can't be redirected directly,
33256# and sets the high bit in the cache file unless we assign to the vars.
33257(
33258  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33259    eval ac_val=\$$ac_var
33260    case $ac_val in #(
33261    *${as_nl}*)
33262      case $ac_var in #(
33263      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33264$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33265      esac
33266      case $ac_var in #(
33267      _ | IFS | as_nl) ;; #(
33268      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33269      *) { eval $ac_var=; unset $ac_var;} ;;
33270      esac ;;
33271    esac
33272  done
33273
33274  (set) 2>&1 |
33275    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33276    *${as_nl}ac_space=\ *)
33277      # `set' does not quote correctly, so add quotes: double-quote
33278      # substitution turns \\\\ into \\, and sed turns \\ into \.
33279      sed -n \
33280	"s/'/'\\\\''/g;
33281	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33282      ;; #(
33283    *)
33284      # `set' quotes correctly as required by POSIX, so do not add quotes.
33285      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33286      ;;
33287    esac |
33288    sort
33289) |
33290  sed '
33291     /^ac_cv_env_/b end
33292     t clear
33293     :clear
33294     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33295     t end
33296     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33297     :end' >>confcache
33298if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33299  if test -w "$cache_file"; then
33300    if test "x$cache_file" != "x/dev/null"; then
33301      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33302$as_echo "$as_me: updating cache $cache_file" >&6;}
33303      if test ! -f "$cache_file" || test -h "$cache_file"; then
33304	cat confcache >"$cache_file"
33305      else
33306        case $cache_file in #(
33307        */* | ?:*)
33308	  mv -f confcache "$cache_file"$$ &&
33309	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33310        *)
33311	  mv -f confcache "$cache_file" ;;
33312	esac
33313      fi
33314    fi
33315  else
33316    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33317$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33318  fi
33319fi
33320rm -f confcache
33321
33322test "x$prefix" = xNONE && prefix=$ac_default_prefix
33323# Let make expand exec_prefix.
33324test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33325
33326DEFS=-DHAVE_CONFIG_H
33327
33328ac_libobjs=
33329ac_ltlibobjs=
33330U=
33331for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33332  # 1. Remove the extension, and $U if already installed.
33333  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33334  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33335  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33336  #    will be set to the directory where LIBOBJS objects are built.
33337  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33338  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33339done
33340LIBOBJS=$ac_libobjs
33341
33342LTLIBOBJS=$ac_ltlibobjs
33343
33344
33345
33346: "${CONFIG_STATUS=./config.status}"
33347ac_write_fail=0
33348ac_clean_files_save=$ac_clean_files
33349ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33350{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33351$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33352as_write_fail=0
33353cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33354#! $SHELL
33355# Generated by $as_me.
33356# Run this file to recreate the current configuration.
33357# Compiler output produced by configure, useful for debugging
33358# configure, is in config.log if it exists.
33359
33360debug=false
33361ac_cs_recheck=false
33362ac_cs_silent=false
33363
33364SHELL=\${CONFIG_SHELL-$SHELL}
33365export SHELL
33366_ASEOF
33367cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33368## -------------------- ##
33369## M4sh Initialization. ##
33370## -------------------- ##
33371
33372# Be more Bourne compatible
33373DUALCASE=1; export DUALCASE # for MKS sh
33374if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33375  emulate sh
33376  NULLCMD=:
33377  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33378  # is contrary to our usage.  Disable this feature.
33379  alias -g '${1+"$@"}'='"$@"'
33380  setopt NO_GLOB_SUBST
33381else
33382  case `(set -o) 2>/dev/null` in #(
33383  *posix*) :
33384    set -o posix ;; #(
33385  *) :
33386     ;;
33387esac
33388fi
33389
33390
33391as_nl='
33392'
33393export as_nl
33394# Printing a long string crashes Solaris 7 /usr/bin/printf.
33395as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33396as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33397as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33398# Prefer a ksh shell builtin over an external printf program on Solaris,
33399# but without wasting forks for bash or zsh.
33400if test -z "$BASH_VERSION$ZSH_VERSION" \
33401    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33402  as_echo='print -r --'
33403  as_echo_n='print -rn --'
33404elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33405  as_echo='printf %s\n'
33406  as_echo_n='printf %s'
33407else
33408  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33409    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33410    as_echo_n='/usr/ucb/echo -n'
33411  else
33412    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33413    as_echo_n_body='eval
33414      arg=$1;
33415      case $arg in #(
33416      *"$as_nl"*)
33417	expr "X$arg" : "X\\(.*\\)$as_nl";
33418	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33419      esac;
33420      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33421    '
33422    export as_echo_n_body
33423    as_echo_n='sh -c $as_echo_n_body as_echo'
33424  fi
33425  export as_echo_body
33426  as_echo='sh -c $as_echo_body as_echo'
33427fi
33428
33429# The user is always right.
33430if test "${PATH_SEPARATOR+set}" != set; then
33431  PATH_SEPARATOR=:
33432  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33433    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33434      PATH_SEPARATOR=';'
33435  }
33436fi
33437
33438
33439# IFS
33440# We need space, tab and new line, in precisely that order.  Quoting is
33441# there to prevent editors from complaining about space-tab.
33442# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33443# splitting by setting IFS to empty value.)
33444IFS=" ""	$as_nl"
33445
33446# Find who we are.  Look in the path if we contain no directory separator.
33447as_myself=
33448case $0 in #((
33449  *[\\/]* ) as_myself=$0 ;;
33450  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33451for as_dir in $PATH
33452do
33453  IFS=$as_save_IFS
33454  test -z "$as_dir" && as_dir=.
33455    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33456  done
33457IFS=$as_save_IFS
33458
33459     ;;
33460esac
33461# We did not find ourselves, most probably we were run as `sh COMMAND'
33462# in which case we are not to be found in the path.
33463if test "x$as_myself" = x; then
33464  as_myself=$0
33465fi
33466if test ! -f "$as_myself"; then
33467  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33468  exit 1
33469fi
33470
33471# Unset variables that we do not need and which cause bugs (e.g. in
33472# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33473# suppresses any "Segmentation fault" message there.  '((' could
33474# trigger a bug in pdksh 5.2.14.
33475for as_var in BASH_ENV ENV MAIL MAILPATH
33476do eval test x\${$as_var+set} = xset \
33477  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33478done
33479PS1='$ '
33480PS2='> '
33481PS4='+ '
33482
33483# NLS nuisances.
33484LC_ALL=C
33485export LC_ALL
33486LANGUAGE=C
33487export LANGUAGE
33488
33489# CDPATH.
33490(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33491
33492
33493# as_fn_error STATUS ERROR [LINENO LOG_FD]
33494# ----------------------------------------
33495# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33496# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33497# script with STATUS, using 1 if that was 0.
33498as_fn_error ()
33499{
33500  as_status=$1; test $as_status -eq 0 && as_status=1
33501  if test "$4"; then
33502    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33503    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33504  fi
33505  $as_echo "$as_me: error: $2" >&2
33506  as_fn_exit $as_status
33507} # as_fn_error
33508
33509
33510# as_fn_set_status STATUS
33511# -----------------------
33512# Set $? to STATUS, without forking.
33513as_fn_set_status ()
33514{
33515  return $1
33516} # as_fn_set_status
33517
33518# as_fn_exit STATUS
33519# -----------------
33520# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33521as_fn_exit ()
33522{
33523  set +e
33524  as_fn_set_status $1
33525  exit $1
33526} # as_fn_exit
33527
33528# as_fn_unset VAR
33529# ---------------
33530# Portably unset VAR.
33531as_fn_unset ()
33532{
33533  { eval $1=; unset $1;}
33534}
33535as_unset=as_fn_unset
33536# as_fn_append VAR VALUE
33537# ----------------------
33538# Append the text in VALUE to the end of the definition contained in VAR. Take
33539# advantage of any shell optimizations that allow amortized linear growth over
33540# repeated appends, instead of the typical quadratic growth present in naive
33541# implementations.
33542if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33543  eval 'as_fn_append ()
33544  {
33545    eval $1+=\$2
33546  }'
33547else
33548  as_fn_append ()
33549  {
33550    eval $1=\$$1\$2
33551  }
33552fi # as_fn_append
33553
33554# as_fn_arith ARG...
33555# ------------------
33556# Perform arithmetic evaluation on the ARGs, and store the result in the
33557# global $as_val. Take advantage of shells that can avoid forks. The arguments
33558# must be portable across $(()) and expr.
33559if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33560  eval 'as_fn_arith ()
33561  {
33562    as_val=$(( $* ))
33563  }'
33564else
33565  as_fn_arith ()
33566  {
33567    as_val=`expr "$@" || test $? -eq 1`
33568  }
33569fi # as_fn_arith
33570
33571
33572if expr a : '\(a\)' >/dev/null 2>&1 &&
33573   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33574  as_expr=expr
33575else
33576  as_expr=false
33577fi
33578
33579if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33580  as_basename=basename
33581else
33582  as_basename=false
33583fi
33584
33585if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33586  as_dirname=dirname
33587else
33588  as_dirname=false
33589fi
33590
33591as_me=`$as_basename -- "$0" ||
33592$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33593	 X"$0" : 'X\(//\)$' \| \
33594	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33595$as_echo X/"$0" |
33596    sed '/^.*\/\([^/][^/]*\)\/*$/{
33597	    s//\1/
33598	    q
33599	  }
33600	  /^X\/\(\/\/\)$/{
33601	    s//\1/
33602	    q
33603	  }
33604	  /^X\/\(\/\).*/{
33605	    s//\1/
33606	    q
33607	  }
33608	  s/.*/./; q'`
33609
33610# Avoid depending upon Character Ranges.
33611as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33612as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33613as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33614as_cr_digits='0123456789'
33615as_cr_alnum=$as_cr_Letters$as_cr_digits
33616
33617ECHO_C= ECHO_N= ECHO_T=
33618case `echo -n x` in #(((((
33619-n*)
33620  case `echo 'xy\c'` in
33621  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33622  xy)  ECHO_C='\c';;
33623  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33624       ECHO_T='	';;
33625  esac;;
33626*)
33627  ECHO_N='-n';;
33628esac
33629
33630rm -f conf$$ conf$$.exe conf$$.file
33631if test -d conf$$.dir; then
33632  rm -f conf$$.dir/conf$$.file
33633else
33634  rm -f conf$$.dir
33635  mkdir conf$$.dir 2>/dev/null
33636fi
33637if (echo >conf$$.file) 2>/dev/null; then
33638  if ln -s conf$$.file conf$$ 2>/dev/null; then
33639    as_ln_s='ln -s'
33640    # ... but there are two gotchas:
33641    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33642    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33643    # In both cases, we have to default to `cp -pR'.
33644    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33645      as_ln_s='cp -pR'
33646  elif ln conf$$.file conf$$ 2>/dev/null; then
33647    as_ln_s=ln
33648  else
33649    as_ln_s='cp -pR'
33650  fi
33651else
33652  as_ln_s='cp -pR'
33653fi
33654rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33655rmdir conf$$.dir 2>/dev/null
33656
33657
33658# as_fn_mkdir_p
33659# -------------
33660# Create "$as_dir" as a directory, including parents if necessary.
33661as_fn_mkdir_p ()
33662{
33663
33664  case $as_dir in #(
33665  -*) as_dir=./$as_dir;;
33666  esac
33667  test -d "$as_dir" || eval $as_mkdir_p || {
33668    as_dirs=
33669    while :; do
33670      case $as_dir in #(
33671      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33672      *) as_qdir=$as_dir;;
33673      esac
33674      as_dirs="'$as_qdir' $as_dirs"
33675      as_dir=`$as_dirname -- "$as_dir" ||
33676$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33677	 X"$as_dir" : 'X\(//\)[^/]' \| \
33678	 X"$as_dir" : 'X\(//\)$' \| \
33679	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33680$as_echo X"$as_dir" |
33681    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33682	    s//\1/
33683	    q
33684	  }
33685	  /^X\(\/\/\)[^/].*/{
33686	    s//\1/
33687	    q
33688	  }
33689	  /^X\(\/\/\)$/{
33690	    s//\1/
33691	    q
33692	  }
33693	  /^X\(\/\).*/{
33694	    s//\1/
33695	    q
33696	  }
33697	  s/.*/./; q'`
33698      test -d "$as_dir" && break
33699    done
33700    test -z "$as_dirs" || eval "mkdir $as_dirs"
33701  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33702
33703
33704} # as_fn_mkdir_p
33705if mkdir -p . 2>/dev/null; then
33706  as_mkdir_p='mkdir -p "$as_dir"'
33707else
33708  test -d ./-p && rmdir ./-p
33709  as_mkdir_p=false
33710fi
33711
33712
33713# as_fn_executable_p FILE
33714# -----------------------
33715# Test if FILE is an executable regular file.
33716as_fn_executable_p ()
33717{
33718  test -f "$1" && test -x "$1"
33719} # as_fn_executable_p
33720as_test_x='test -x'
33721as_executable_p=as_fn_executable_p
33722
33723# Sed expression to map a string onto a valid CPP name.
33724as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33725
33726# Sed expression to map a string onto a valid variable name.
33727as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33728
33729
33730exec 6>&1
33731## ----------------------------------- ##
33732## Main body of $CONFIG_STATUS script. ##
33733## ----------------------------------- ##
33734_ASEOF
33735test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33736
33737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33738# Save the log message, to keep $0 and so on meaningful, and to
33739# report actual input values of CONFIG_FILES etc. instead of their
33740# values after options handling.
33741ac_log="
33742This file was extended by OpenJDK $as_me jdk8, which was
33743generated by GNU Autoconf 2.69.  Invocation command line was
33744
33745  CONFIG_FILES    = $CONFIG_FILES
33746  CONFIG_HEADERS  = $CONFIG_HEADERS
33747  CONFIG_LINKS    = $CONFIG_LINKS
33748  CONFIG_COMMANDS = $CONFIG_COMMANDS
33749  $ $0 $@
33750
33751on `(hostname || uname -n) 2>/dev/null | sed 1q`
33752"
33753
33754_ACEOF
33755
33756case $ac_config_files in *"
33757"*) set x $ac_config_files; shift; ac_config_files=$*;;
33758esac
33759
33760case $ac_config_headers in *"
33761"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33762esac
33763
33764
33765cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33766# Files that config.status was made for.
33767config_files="$ac_config_files"
33768config_headers="$ac_config_headers"
33769
33770_ACEOF
33771
33772cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33773ac_cs_usage="\
33774\`$as_me' instantiates files and other configuration actions
33775from templates according to the current configuration.  Unless the files
33776and actions are specified as TAGs, all are instantiated by default.
33777
33778Usage: $0 [OPTION]... [TAG]...
33779
33780  -h, --help       print this help, then exit
33781  -V, --version    print version number and configuration settings, then exit
33782      --config     print configuration, then exit
33783  -q, --quiet, --silent
33784                   do not print progress messages
33785  -d, --debug      don't remove temporary files
33786      --recheck    update $as_me by reconfiguring in the same conditions
33787      --file=FILE[:TEMPLATE]
33788                   instantiate the configuration file FILE
33789      --header=FILE[:TEMPLATE]
33790                   instantiate the configuration header FILE
33791
33792Configuration files:
33793$config_files
33794
33795Configuration headers:
33796$config_headers
33797
33798Report bugs to <build-dev@openjdk.java.net>.
33799OpenJDK home page: <http://openjdk.java.net>."
33800
33801_ACEOF
33802cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33803ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33804ac_cs_version="\\
33805OpenJDK config.status jdk8
33806configured by $0, generated by GNU Autoconf 2.69,
33807  with options \\"\$ac_cs_config\\"
33808
33809Copyright (C) 2012 Free Software Foundation, Inc.
33810This config.status script is free software; the Free Software Foundation
33811gives unlimited permission to copy, distribute and modify it."
33812
33813ac_pwd='$ac_pwd'
33814srcdir='$srcdir'
33815AWK='$AWK'
33816test -n "\$AWK" || AWK=awk
33817_ACEOF
33818
33819cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33820# The default lists apply if the user does not specify any file.
33821ac_need_defaults=:
33822while test $# != 0
33823do
33824  case $1 in
33825  --*=?*)
33826    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33827    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33828    ac_shift=:
33829    ;;
33830  --*=)
33831    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33832    ac_optarg=
33833    ac_shift=:
33834    ;;
33835  *)
33836    ac_option=$1
33837    ac_optarg=$2
33838    ac_shift=shift
33839    ;;
33840  esac
33841
33842  case $ac_option in
33843  # Handling of the options.
33844  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33845    ac_cs_recheck=: ;;
33846  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33847    $as_echo "$ac_cs_version"; exit ;;
33848  --config | --confi | --conf | --con | --co | --c )
33849    $as_echo "$ac_cs_config"; exit ;;
33850  --debug | --debu | --deb | --de | --d | -d )
33851    debug=: ;;
33852  --file | --fil | --fi | --f )
33853    $ac_shift
33854    case $ac_optarg in
33855    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33856    '') as_fn_error $? "missing file argument" ;;
33857    esac
33858    as_fn_append CONFIG_FILES " '$ac_optarg'"
33859    ac_need_defaults=false;;
33860  --header | --heade | --head | --hea )
33861    $ac_shift
33862    case $ac_optarg in
33863    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33864    esac
33865    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33866    ac_need_defaults=false;;
33867  --he | --h)
33868    # Conflict between --help and --header
33869    as_fn_error $? "ambiguous option: \`$1'
33870Try \`$0 --help' for more information.";;
33871  --help | --hel | -h )
33872    $as_echo "$ac_cs_usage"; exit ;;
33873  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33874  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33875    ac_cs_silent=: ;;
33876
33877  # This is an error.
33878  -*) as_fn_error $? "unrecognized option: \`$1'
33879Try \`$0 --help' for more information." ;;
33880
33881  *) as_fn_append ac_config_targets " $1"
33882     ac_need_defaults=false ;;
33883
33884  esac
33885  shift
33886done
33887
33888ac_configure_extra_args=
33889
33890if $ac_cs_silent; then
33891  exec 6>/dev/null
33892  ac_configure_extra_args="$ac_configure_extra_args --silent"
33893fi
33894
33895_ACEOF
33896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33897if \$ac_cs_recheck; then
33898  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33899  shift
33900  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33901  CONFIG_SHELL='$SHELL'
33902  export CONFIG_SHELL
33903  exec "\$@"
33904fi
33905
33906_ACEOF
33907cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33908exec 5>>config.log
33909{
33910  echo
33911  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33912## Running $as_me. ##
33913_ASBOX
33914  $as_echo "$ac_log"
33915} >&5
33916
33917_ACEOF
33918cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33919_ACEOF
33920
33921cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33922
33923# Handling of arguments.
33924for ac_config_target in $ac_config_targets
33925do
33926  case $ac_config_target in
33927    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33928    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33929    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33930    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33931    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33932    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33933    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33934
33935  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33936  esac
33937done
33938
33939
33940# If the user did not use the arguments to specify the items to instantiate,
33941# then the envvar interface is used.  Set only those that are not.
33942# We use the long form for the default assignment because of an extremely
33943# bizarre bug on SunOS 4.1.3.
33944if $ac_need_defaults; then
33945  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33946  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33947fi
33948
33949# Have a temporary directory for convenience.  Make it in the build tree
33950# simply because there is no reason against having it here, and in addition,
33951# creating and moving files from /tmp can sometimes cause problems.
33952# Hook for its removal unless debugging.
33953# Note that there is a small window in which the directory will not be cleaned:
33954# after its creation but before its name has been assigned to `$tmp'.
33955$debug ||
33956{
33957  tmp= ac_tmp=
33958  trap 'exit_status=$?
33959  : "${ac_tmp:=$tmp}"
33960  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33961' 0
33962  trap 'as_fn_exit 1' 1 2 13 15
33963}
33964# Create a (secure) tmp directory for tmp files.
33965
33966{
33967  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33968  test -d "$tmp"
33969}  ||
33970{
33971  tmp=./conf$$-$RANDOM
33972  (umask 077 && mkdir "$tmp")
33973} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33974ac_tmp=$tmp
33975
33976# Set up the scripts for CONFIG_FILES section.
33977# No need to generate them if there are no CONFIG_FILES.
33978# This happens for instance with `./config.status config.h'.
33979if test -n "$CONFIG_FILES"; then
33980
33981
33982ac_cr=`echo X | tr X '\015'`
33983# On cygwin, bash can eat \r inside `` if the user requested igncr.
33984# But we know of no other shell where ac_cr would be empty at this
33985# point, so we can use a bashism as a fallback.
33986if test "x$ac_cr" = x; then
33987  eval ac_cr=\$\'\\r\'
33988fi
33989ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33990if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33991  ac_cs_awk_cr='\\r'
33992else
33993  ac_cs_awk_cr=$ac_cr
33994fi
33995
33996echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33997_ACEOF
33998
33999
34000{
34001  echo "cat >conf$$subs.awk <<_ACEOF" &&
34002  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34003  echo "_ACEOF"
34004} >conf$$subs.sh ||
34005  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34006ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34007ac_delim='%!_!# '
34008for ac_last_try in false false false false false :; do
34009  . ./conf$$subs.sh ||
34010    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34011
34012  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34013  if test $ac_delim_n = $ac_delim_num; then
34014    break
34015  elif $ac_last_try; then
34016    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34017  else
34018    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34019  fi
34020done
34021rm -f conf$$subs.sh
34022
34023cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34024cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34025_ACEOF
34026sed -n '
34027h
34028s/^/S["/; s/!.*/"]=/
34029p
34030g
34031s/^[^!]*!//
34032:repl
34033t repl
34034s/'"$ac_delim"'$//
34035t delim
34036:nl
34037h
34038s/\(.\{148\}\)..*/\1/
34039t more1
34040s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34041p
34042n
34043b repl
34044:more1
34045s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34046p
34047g
34048s/.\{148\}//
34049t nl
34050:delim
34051h
34052s/\(.\{148\}\)..*/\1/
34053t more2
34054s/["\\]/\\&/g; s/^/"/; s/$/"/
34055p
34056b
34057:more2
34058s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34059p
34060g
34061s/.\{148\}//
34062t delim
34063' <conf$$subs.awk | sed '
34064/^[^""]/{
34065  N
34066  s/\n//
34067}
34068' >>$CONFIG_STATUS || ac_write_fail=1
34069rm -f conf$$subs.awk
34070cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34071_ACAWK
34072cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34073  for (key in S) S_is_set[key] = 1
34074  FS = ""
34075
34076}
34077{
34078  line = $ 0
34079  nfields = split(line, field, "@")
34080  substed = 0
34081  len = length(field[1])
34082  for (i = 2; i < nfields; i++) {
34083    key = field[i]
34084    keylen = length(key)
34085    if (S_is_set[key]) {
34086      value = S[key]
34087      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34088      len += length(value) + length(field[++i])
34089      substed = 1
34090    } else
34091      len += 1 + keylen
34092  }
34093
34094  print line
34095}
34096
34097_ACAWK
34098_ACEOF
34099cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34100if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34101  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34102else
34103  cat
34104fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34105  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34106_ACEOF
34107
34108# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34109# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34110# trailing colons and then remove the whole line if VPATH becomes empty
34111# (actually we leave an empty line to preserve line numbers).
34112if test "x$srcdir" = x.; then
34113  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34114h
34115s///
34116s/^/:/
34117s/[	 ]*$/:/
34118s/:\$(srcdir):/:/g
34119s/:\${srcdir}:/:/g
34120s/:@srcdir@:/:/g
34121s/^:*//
34122s/:*$//
34123x
34124s/\(=[	 ]*\).*/\1/
34125G
34126s/\n//
34127s/^[^=]*=[	 ]*$//
34128}'
34129fi
34130
34131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34132fi # test -n "$CONFIG_FILES"
34133
34134# Set up the scripts for CONFIG_HEADERS section.
34135# No need to generate them if there are no CONFIG_HEADERS.
34136# This happens for instance with `./config.status Makefile'.
34137if test -n "$CONFIG_HEADERS"; then
34138cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34139BEGIN {
34140_ACEOF
34141
34142# Transform confdefs.h into an awk script `defines.awk', embedded as
34143# here-document in config.status, that substitutes the proper values into
34144# config.h.in to produce config.h.
34145
34146# Create a delimiter string that does not exist in confdefs.h, to ease
34147# handling of long lines.
34148ac_delim='%!_!# '
34149for ac_last_try in false false :; do
34150  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34151  if test -z "$ac_tt"; then
34152    break
34153  elif $ac_last_try; then
34154    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34155  else
34156    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34157  fi
34158done
34159
34160# For the awk script, D is an array of macro values keyed by name,
34161# likewise P contains macro parameters if any.  Preserve backslash
34162# newline sequences.
34163
34164ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34165sed -n '
34166s/.\{148\}/&'"$ac_delim"'/g
34167t rset
34168:rset
34169s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34170t def
34171d
34172:def
34173s/\\$//
34174t bsnl
34175s/["\\]/\\&/g
34176s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34177D["\1"]=" \3"/p
34178s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34179d
34180:bsnl
34181s/["\\]/\\&/g
34182s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34183D["\1"]=" \3\\\\\\n"\\/p
34184t cont
34185s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34186t cont
34187d
34188:cont
34189n
34190s/.\{148\}/&'"$ac_delim"'/g
34191t clear
34192:clear
34193s/\\$//
34194t bsnlc
34195s/["\\]/\\&/g; s/^/"/; s/$/"/p
34196d
34197:bsnlc
34198s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34199b cont
34200' <confdefs.h | sed '
34201s/'"$ac_delim"'/"\\\
34202"/g' >>$CONFIG_STATUS || ac_write_fail=1
34203
34204cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34205  for (key in D) D_is_set[key] = 1
34206  FS = ""
34207}
34208/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34209  line = \$ 0
34210  split(line, arg, " ")
34211  if (arg[1] == "#") {
34212    defundef = arg[2]
34213    mac1 = arg[3]
34214  } else {
34215    defundef = substr(arg[1], 2)
34216    mac1 = arg[2]
34217  }
34218  split(mac1, mac2, "(") #)
34219  macro = mac2[1]
34220  prefix = substr(line, 1, index(line, defundef) - 1)
34221  if (D_is_set[macro]) {
34222    # Preserve the white space surrounding the "#".
34223    print prefix "define", macro P[macro] D[macro]
34224    next
34225  } else {
34226    # Replace #undef with comments.  This is necessary, for example,
34227    # in the case of _POSIX_SOURCE, which is predefined and required
34228    # on some systems where configure will not decide to define it.
34229    if (defundef == "undef") {
34230      print "/*", prefix defundef, macro, "*/"
34231      next
34232    }
34233  }
34234}
34235{ print }
34236_ACAWK
34237_ACEOF
34238cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34239  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34240fi # test -n "$CONFIG_HEADERS"
34241
34242
34243eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34244shift
34245for ac_tag
34246do
34247  case $ac_tag in
34248  :[FHLC]) ac_mode=$ac_tag; continue;;
34249  esac
34250  case $ac_mode$ac_tag in
34251  :[FHL]*:*);;
34252  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34253  :[FH]-) ac_tag=-:-;;
34254  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34255  esac
34256  ac_save_IFS=$IFS
34257  IFS=:
34258  set x $ac_tag
34259  IFS=$ac_save_IFS
34260  shift
34261  ac_file=$1
34262  shift
34263
34264  case $ac_mode in
34265  :L) ac_source=$1;;
34266  :[FH])
34267    ac_file_inputs=
34268    for ac_f
34269    do
34270      case $ac_f in
34271      -) ac_f="$ac_tmp/stdin";;
34272      *) # Look for the file first in the build tree, then in the source tree
34273	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34274	 # because $ac_f cannot contain `:'.
34275	 test -f "$ac_f" ||
34276	   case $ac_f in
34277	   [\\/$]*) false;;
34278	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34279	   esac ||
34280	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34281      esac
34282      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34283      as_fn_append ac_file_inputs " '$ac_f'"
34284    done
34285
34286    # Let's still pretend it is `configure' which instantiates (i.e., don't
34287    # use $as_me), people would be surprised to read:
34288    #    /* config.h.  Generated by config.status.  */
34289    configure_input='Generated from '`
34290	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34291	`' by configure.'
34292    if test x"$ac_file" != x-; then
34293      configure_input="$ac_file.  $configure_input"
34294      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34295$as_echo "$as_me: creating $ac_file" >&6;}
34296    fi
34297    # Neutralize special characters interpreted by sed in replacement strings.
34298    case $configure_input in #(
34299    *\&* | *\|* | *\\* )
34300       ac_sed_conf_input=`$as_echo "$configure_input" |
34301       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34302    *) ac_sed_conf_input=$configure_input;;
34303    esac
34304
34305    case $ac_tag in
34306    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34307      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34308    esac
34309    ;;
34310  esac
34311
34312  ac_dir=`$as_dirname -- "$ac_file" ||
34313$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34314	 X"$ac_file" : 'X\(//\)[^/]' \| \
34315	 X"$ac_file" : 'X\(//\)$' \| \
34316	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34317$as_echo X"$ac_file" |
34318    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34319	    s//\1/
34320	    q
34321	  }
34322	  /^X\(\/\/\)[^/].*/{
34323	    s//\1/
34324	    q
34325	  }
34326	  /^X\(\/\/\)$/{
34327	    s//\1/
34328	    q
34329	  }
34330	  /^X\(\/\).*/{
34331	    s//\1/
34332	    q
34333	  }
34334	  s/.*/./; q'`
34335  as_dir="$ac_dir"; as_fn_mkdir_p
34336  ac_builddir=.
34337
34338case "$ac_dir" in
34339.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34340*)
34341  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34342  # A ".." for each directory in $ac_dir_suffix.
34343  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34344  case $ac_top_builddir_sub in
34345  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34346  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34347  esac ;;
34348esac
34349ac_abs_top_builddir=$ac_pwd
34350ac_abs_builddir=$ac_pwd$ac_dir_suffix
34351# for backward compatibility:
34352ac_top_builddir=$ac_top_build_prefix
34353
34354case $srcdir in
34355  .)  # We are building in place.
34356    ac_srcdir=.
34357    ac_top_srcdir=$ac_top_builddir_sub
34358    ac_abs_top_srcdir=$ac_pwd ;;
34359  [\\/]* | ?:[\\/]* )  # Absolute name.
34360    ac_srcdir=$srcdir$ac_dir_suffix;
34361    ac_top_srcdir=$srcdir
34362    ac_abs_top_srcdir=$srcdir ;;
34363  *) # Relative name.
34364    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34365    ac_top_srcdir=$ac_top_build_prefix$srcdir
34366    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34367esac
34368ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34369
34370
34371  case $ac_mode in
34372  :F)
34373  #
34374  # CONFIG_FILE
34375  #
34376
34377_ACEOF
34378
34379cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34380# If the template does not know about datarootdir, expand it.
34381# FIXME: This hack should be removed a few years after 2.60.
34382ac_datarootdir_hack=; ac_datarootdir_seen=
34383ac_sed_dataroot='
34384/datarootdir/ {
34385  p
34386  q
34387}
34388/@datadir@/p
34389/@docdir@/p
34390/@infodir@/p
34391/@localedir@/p
34392/@mandir@/p'
34393case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34394*datarootdir*) ac_datarootdir_seen=yes;;
34395*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34396  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34397$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34398_ACEOF
34399cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34400  ac_datarootdir_hack='
34401  s&@datadir@&$datadir&g
34402  s&@docdir@&$docdir&g
34403  s&@infodir@&$infodir&g
34404  s&@localedir@&$localedir&g
34405  s&@mandir@&$mandir&g
34406  s&\\\${datarootdir}&$datarootdir&g' ;;
34407esac
34408_ACEOF
34409
34410# Neutralize VPATH when `$srcdir' = `.'.
34411# Shell code in configure.ac might set extrasub.
34412# FIXME: do we really want to maintain this feature?
34413cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34414ac_sed_extra="$ac_vpsub
34415$extrasub
34416_ACEOF
34417cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34418:t
34419/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34420s|@configure_input@|$ac_sed_conf_input|;t t
34421s&@top_builddir@&$ac_top_builddir_sub&;t t
34422s&@top_build_prefix@&$ac_top_build_prefix&;t t
34423s&@srcdir@&$ac_srcdir&;t t
34424s&@abs_srcdir@&$ac_abs_srcdir&;t t
34425s&@top_srcdir@&$ac_top_srcdir&;t t
34426s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34427s&@builddir@&$ac_builddir&;t t
34428s&@abs_builddir@&$ac_abs_builddir&;t t
34429s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34430$ac_datarootdir_hack
34431"
34432eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34433  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34434
34435test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34436  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34437  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34438      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34439  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34440which seems to be undefined.  Please make sure it is defined" >&5
34441$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34442which seems to be undefined.  Please make sure it is defined" >&2;}
34443
34444  rm -f "$ac_tmp/stdin"
34445  case $ac_file in
34446  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34447  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34448  esac \
34449  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34450 ;;
34451  :H)
34452  #
34453  # CONFIG_HEADER
34454  #
34455  if test x"$ac_file" != x-; then
34456    {
34457      $as_echo "/* $configure_input  */" \
34458      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34459    } >"$ac_tmp/config.h" \
34460      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34461    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34462      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34463$as_echo "$as_me: $ac_file is unchanged" >&6;}
34464    else
34465      rm -f "$ac_file"
34466      mv "$ac_tmp/config.h" "$ac_file" \
34467	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34468    fi
34469  else
34470    $as_echo "/* $configure_input  */" \
34471      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34472      || as_fn_error $? "could not create -" "$LINENO" 5
34473  fi
34474 ;;
34475
34476
34477  esac
34478
34479done # for ac_tag
34480
34481
34482as_fn_exit 0
34483_ACEOF
34484ac_clean_files=$ac_clean_files_save
34485
34486test $ac_write_fail = 0 ||
34487  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34488
34489
34490# configure is writing to config.log, and then calls config.status.
34491# config.status does its own redirection, appending to config.log.
34492# Unfortunately, on DOS this fails, as config.log is still kept open
34493# by configure, so config.status won't be able to write to it; its
34494# output is simply discarded.  So we exec the FD to /dev/null,
34495# effectively closing config.log, so it can be properly (re)opened and
34496# appended to by config.status.  When coming back to configure, we
34497# need to make the FD available again.
34498if test "$no_create" != yes; then
34499  ac_cs_success=:
34500  ac_config_status_args=
34501  test "$silent" = yes &&
34502    ac_config_status_args="$ac_config_status_args --quiet"
34503  exec 5>/dev/null
34504  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34505  exec 5>>config.log
34506  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34507  # would make configure fail if this is the last instruction.
34508  $ac_cs_success || as_fn_exit 1
34509fi
34510if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34511  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34512$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34513fi
34514
34515
34516# Try to move the config.log file to the output directory.
34517if test -e ./config.log; then
34518  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
34519fi
34520
34521# Make the compare script executable
34522$CHMOD +x $OUTPUT_ROOT/compare.sh
34523
34524# Finally output some useful information to the user
34525
34526# Finally output some useful information to the user
34527
34528if test "x$CCACHE_FOUND" != x; then
34529	if  test "x$HAS_GOOD_CCACHE" = x; then
34530		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34531		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34532	else
34533		CCACHE_STATUS="installed and in use"
34534	fi
34535else
34536	if test "x$GCC" = xyes; then
34537		CCACHE_STATUS="not installed (consider installing)"
34538		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34539	else
34540		CCACHE_STATUS="not available for your system"
34541	fi
34542fi
34543
34544printf "\n"
34545printf "====================================================\n"
34546printf "A new configuration has been successfully created in\n"
34547printf "$OUTPUT_ROOT\n"
34548if test "x$CONFIGURE_COMMAND_LINE" != x; then
34549	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34550else
34551	printf "using default settings.\n"
34552fi
34553
34554printf "\n"
34555printf "Configuration summary:\n"
34556printf "* Debug level:    $DEBUG_LEVEL\n"
34557printf "* JDK variant:    $JDK_VARIANT\n"
34558printf "* JVM variants:   $with_jvm_variants\n"
34559printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34560
34561printf "\n"
34562printf "Tools summary:\n"
34563if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34564  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34565fi
34566printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34567printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34568printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34569
34570printf "\n"
34571printf "Build performance summary:\n"
34572printf "* Cores to use:   $JOBS\n"
34573printf "* Memory limit:   $MEMORY_SIZE MB\n"
34574printf "* ccache status:  $CCACHE_STATUS\n"
34575printf "\n"
34576
34577if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34578	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34579	printf "$CCACHE_HELP_MSG\n"
34580
34581    # Print a helpful message on how to acquire the necessary build dependency.
34582    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34583    MISSING_DEPENDENCY=ccache
34584    PKGHANDLER_COMMAND=
34585
34586    case $PKGHANDLER in
34587	apt-get)
34588                apt_help     $MISSING_DEPENDENCY ;;
34589    yum)
34590                yum_help     $MISSING_DEPENDENCY ;;
34591	port)
34592                port_help    $MISSING_DEPENDENCY ;;
34593	pkgutil)
34594                pkgutil_help $MISSING_DEPENDENCY ;;
34595	pkgadd)
34596                pkgadd_help  $MISSING_DEPENDENCY ;;
34597    * )
34598      break ;;
34599    esac
34600
34601    if test "x$PKGHANDLER_COMMAND" != x; then
34602        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34603    fi
34604
34605	printf "$HELP_MSG\n"
34606	printf "\n"
34607fi
34608
34609if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34610	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34611	printf "will result in longer build times.\n"
34612	printf "\n"
34613fi
34614
34615if test "x$FOUND_ALT_VARIABLES" != "x"; then
34616	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34617	printf "These are not respected, and will be ignored. It is recommended\n"
34618	printf "that you clean your environment. The following variables are set:\n"
34619	printf "$FOUND_ALT_VARIABLES\n"
34620	printf "\n"
34621fi
34622
34623if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34624	printf "WARNING: Your build output directory is not on a local disk.\n"
34625	printf "This will severely degrade build performance!\n"
34626	printf "It is recommended that you create an output directory on a local disk,\n"
34627	printf "and run the configure script again from that directory.\n"
34628	printf "\n"
34629fi
34630
34631if test "x$IS_RECONFIGURE" = "xyes"; then
34632	printf "WARNING: The result of this configuration has overridden an older\n"
34633	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34634	printf "proper build. Failure to do so might result in strange build problems.\n"
34635	printf "\n"
34636fi
34637
34638