generated-configure.sh revision 872:dfbc93f26f38
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
637LIBCXX
638LLVM_LIBS
639LLVM_LDFLAGS
640LLVM_CFLAGS
641LLVM_CONFIG
642LIBFFI_LIBS
643LIBFFI_CFLAGS
644STATIC_CXX_SETTING
645LIBDL
646LIBM
647LIBZIP_CAN_USE_MMAP
648USE_EXTERNAL_LIBZ
649USE_EXTERNAL_LIBGIF
650USE_EXTERNAL_LIBJPEG
651ALSA_LIBS
652ALSA_CFLAGS
653FREETYPE_BUNDLE_LIB_PATH
654FREETYPE_LIBS
655FREETYPE_CFLAGS
656CUPS_CFLAGS
657OPENWIN_HOME
658X_EXTRA_LIBS
659X_LIBS
660X_PRE_LIBS
661X_CFLAGS
662XMKMF
663FIXPATH
664CXXFLAGS_DEBUG_SYMBOLS
665CFLAGS_DEBUG_SYMBOLS
666ZIP_DEBUGINFO_FILES
667ENABLE_DEBUG_SYMBOLS
668COMPILER_SUPPORTS_TARGET_BITS_FLAG
669ZERO_ARCHFLAG
670LDFLAGS_CXX_JDK
671LDFLAGS_JDKEXE_SUFFIX
672LDFLAGS_JDKLIB_SUFFIX
673LDFLAGS_JDKEXE
674LDFLAGS_JDKLIB
675CXXFLAGS_JDKEXE
676CXXFLAGS_JDKLIB
677CFLAGS_JDKEXE
678CFLAGS_JDKLIB
679MACOSX_VERSION_MIN
680PACKAGE_PATH
681LEGACY_EXTRA_LDFLAGS
682LEGACY_EXTRA_CXXFLAGS
683LEGACY_EXTRA_CFLAGS
684CXX_FLAG_DEPS
685C_FLAG_DEPS
686CXX_O_FLAG_NONE
687CXX_O_FLAG_NORM
688CXX_O_FLAG_HI
689CXX_O_FLAG_HIGHEST
690C_O_FLAG_NONE
691C_O_FLAG_NORM
692C_O_FLAG_HI
693C_O_FLAG_HIGHEST
694POST_MCS_CMD
695POST_STRIP_CMD
696SET_EXECUTABLE_ORIGIN
697SET_SHARED_LIBRARY_ORIGIN
698CXX_FLAG_REORDER
699C_FLAG_REORDER
700SET_SHARED_LIBRARY_MAPFILE
701SET_SHARED_LIBRARY_NAME
702SHARED_LIBRARY_FLAGS
703EXE_SUFFIX
704STATIC_LIBRARY_SUFFIX
705SHARED_LIBRARY_SUFFIX
706LIBRARY_PREFIX
707STATIC_LIBRARY
708SHARED_LIBRARY
709OBJ_SUFFIX
710COMPILER_NAME
711JT_HOME
712JTREGEXE
713LIPO
714ac_ct_OBJDUMP
715OBJDUMP
716ac_ct_OBJCOPY
717OBJCOPY
718MCS
719STRIP
720GNM
721NM
722AS
723CXXCPP
724CPP
725COMPILER_TYPE
726RC_FLAGS
727DUMPBIN
728WINAR
729HOTSPOT_RC
730HOTSPOT_MT
731RC
732MT
733WINLD
734HOTSPOT_LD
735HOTSPOT_CXX
736ARFLAGS
737AR
738LDEXECXX
739LDCXX
740LDEXE
741LD
742ac_ct_OBJC
743OBJCFLAGS
744OBJC
745ac_ct_CXX
746CXXFLAGS
747CXX
748ac_ct_PROPER_COMPILER_CXX
749PROPER_COMPILER_CXX
750POTENTIAL_CXX
751TOOLS_DIR_CXX
752OBJEXT
753EXEEXT
754ac_ct_CC
755CPPFLAGS
756LDFLAGS
757CFLAGS
758CC
759ac_ct_PROPER_COMPILER_CC
760PROPER_COMPILER_CC
761POTENTIAL_CC
762TOOLS_DIR_CC
763BUILD_LD
764BUILD_CXX
765BUILD_CC
766MSVCR_DLL
767VS_PATH
768VS_LIB
769VS_INCLUDE
770CYGWIN_LINK
771AR_OUT_OPTION
772LD_OUT_OPTION
773EXE_OUT_OPTION
774CC_OUT_OPTION
775BUILD_HOTSPOT
776HOTSPOT_DIST
777BUILD_OUTPUT
778OVERRIDE_SRC_ROOT
779ADD_SRC_ROOT
780JDK_TOPDIR
781NASHORN_TOPDIR
782HOTSPOT_TOPDIR
783JAXWS_TOPDIR
784JAXP_TOPDIR
785CORBA_TOPDIR
786LANGTOOLS_TOPDIR
787BOOT_JDK_JVMARGS
788JAVAC_FLAGS
789BOOT_JDK_SOURCETARGET
790BOOT_JDK
791BOOT_TOOLSJAR
792BOOT_RTJAR
793JAVA_CHECK
794JAVAC_CHECK
795COOKED_BUILD_NUMBER
796JDK_VERSION
797COPYRIGHT_YEAR
798MACOSX_BUNDLE_ID_BASE
799MACOSX_BUNDLE_NAME_BASE
800COMPANY_NAME
801JDK_RC_PLATFORM_NAME
802PRODUCT_SUFFIX
803PRODUCT_NAME
804LAUNCHER_NAME
805MILESTONE
806JDK_BUILD_NUMBER
807JDK_UPDATE_VERSION
808JDK_MICRO_VERSION
809JDK_MINOR_VERSION
810JDK_MAJOR_VERSION
811USER_RELEASE_SUFFIX
812COMPRESS_JARS
813UNLIMITED_CRYPTO
814CACERTS_FILE
815TEST_IN_BUILD
816BUILD_HEADLESS
817SUPPORT_HEADFUL
818SUPPORT_HEADLESS
819BDEPS_FTP
820BDEPS_UNZIP
821OS_VERSION_MICRO
822OS_VERSION_MINOR
823OS_VERSION_MAJOR
824PKG_CONFIG
825CODESIGN
826XATTR
827DSYMUTIL
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_EXPORT_DIR
873OPENJDK_TARGET_OS_API_DIR
874OPENJDK_TARGET_CPU_JLI_CFLAGS
875OPENJDK_TARGET_CPU_OSARCH
876OPENJDK_TARGET_CPU_ISADIR
877OPENJDK_TARGET_CPU_LIBDIR
878OPENJDK_TARGET_CPU_LEGACY_LIB
879OPENJDK_TARGET_CPU_LEGACY
880REQUIRED_OS_VERSION
881REQUIRED_OS_NAME
882COMPILE_TYPE
883OPENJDK_TARGET_CPU_ENDIAN
884OPENJDK_TARGET_CPU_BITS
885OPENJDK_TARGET_CPU_ARCH
886OPENJDK_TARGET_CPU
887OPENJDK_TARGET_OS_API
888OPENJDK_TARGET_OS
889OPENJDK_BUILD_CPU_ENDIAN
890OPENJDK_BUILD_CPU_BITS
891OPENJDK_BUILD_CPU_ARCH
892OPENJDK_BUILD_CPU
893OPENJDK_BUILD_OS_API
894OPENJDK_BUILD_OS
895OPENJDK_BUILD_AUTOCONF_NAME
896OPENJDK_TARGET_AUTOCONF_NAME
897target_os
898target_vendor
899target_cpu
900target
901host_os
902host_vendor
903host_cpu
904host
905build_os
906build_vendor
907build_cpu
908build
909SETFILE
910DF
911READLINK
912CYGPATH
913NAWK
914SED
915FGREP
916EGREP
917GREP
918AWK
919XARGS
920WHICH
921WC
922UNIQ
923UNAME
924TR
925TOUCH
926TEE
927TAR
928TAIL
929SORT
930SH
931RM
932PRINTF
933MV
934MKTEMP
935MKDIR
936LS
937LN
938HEAD
939FIND
940FILE
941EXPR
942ECHO
943DIRNAME
944DIFF
945DATE
946CUT
947CPIO
948CP
949COMM
950CMP
951CHMOD
952CAT
953BASH
954BASENAME
955DATE_WHEN_CONFIGURED
956CONFIGURE_COMMAND_LINE
957CUSTOM_MAKE_DIR
958target_alias
959host_alias
960build_alias
961LIBS
962ECHO_T
963ECHO_N
964ECHO_C
965DEFS
966mandir
967localedir
968libdir
969psdir
970pdfdir
971dvidir
972htmldir
973infodir
974docdir
975oldincludedir
976includedir
977localstatedir
978sharedstatedir
979sysconfdir
980datadir
981datarootdir
982libexecdir
983sbindir
984bindir
985program_transform_name
986prefix
987exec_prefix
988PACKAGE_URL
989PACKAGE_BUGREPORT
990PACKAGE_STRING
991PACKAGE_VERSION
992PACKAGE_TARNAME
993PACKAGE_NAME
994PATH_SEPARATOR
995SHELL'
996ac_subst_files=''
997ac_user_opts='
998enable_option_checking
999with_custom_make_dir
1000with_target_bits
1001with_sys_root
1002with_tools_dir
1003with_devkit
1004enable_openjdk_only
1005with_jdk_variant
1006with_jvm_variants
1007enable_debug
1008with_debug_level
1009with_conf_name
1010with_builddeps_conf
1011with_builddeps_server
1012with_builddeps_dir
1013with_builddeps_group
1014enable_headful
1015enable_hotspot_test_in_build
1016with_cacerts_file
1017enable_unlimited_crypto
1018with_milestone
1019with_update_version
1020with_user_release_suffix
1021with_build_number
1022with_boot_jdk
1023with_boot_jdk_jvmargs
1024with_add_source_root
1025with_override_source_root
1026with_adds_and_overrides
1027with_override_langtools
1028with_override_corba
1029with_override_jaxp
1030with_override_jaxws
1031with_override_hotspot
1032with_override_nashorn
1033with_override_jdk
1034with_import_hotspot
1035with_msvcr_dll
1036with_dxsdk
1037with_dxsdk_lib
1038with_dxsdk_include
1039with_jtreg
1040with_extra_cflags
1041with_extra_cxxflags
1042with_extra_ldflags
1043enable_debug_symbols
1044enable_zip_debug_info
1045enable_macosx_runtime_support
1046with_x
1047with_cups
1048with_cups_include
1049with_freetype
1050with_freetype_include
1051with_freetype_lib
1052enable_freetype_bundling
1053with_alsa
1054with_alsa_include
1055with_alsa_lib
1056with_giflib
1057with_zlib
1058with_stdc__lib
1059with_num_cores
1060with_memory_size
1061with_jobs
1062with_sjavac_server_java
1063enable_sjavac
1064enable_precompiled_headers
1065enable_ccache
1066with_ccache_dir
1067'
1068      ac_precious_vars='build_alias
1069host_alias
1070target_alias
1071PKG_CONFIG
1072CC
1073CFLAGS
1074LDFLAGS
1075LIBS
1076CPPFLAGS
1077CXX
1078CXXFLAGS
1079CCC
1080OBJC
1081OBJCFLAGS
1082CPP
1083CXXCPP
1084XMKMF
1085FREETYPE_CFLAGS
1086FREETYPE_LIBS
1087ALSA_CFLAGS
1088ALSA_LIBS
1089LIBFFI_CFLAGS
1090LIBFFI_LIBS'
1091
1092
1093# Initialize some variables set by options.
1094ac_init_help=
1095ac_init_version=false
1096ac_unrecognized_opts=
1097ac_unrecognized_sep=
1098# The variables have the same names as the options, with
1099# dashes changed to underlines.
1100cache_file=/dev/null
1101exec_prefix=NONE
1102no_create=
1103no_recursion=
1104prefix=NONE
1105program_prefix=NONE
1106program_suffix=NONE
1107program_transform_name=s,x,x,
1108silent=
1109site=
1110srcdir=
1111verbose=
1112x_includes=NONE
1113x_libraries=NONE
1114
1115# Installation directory options.
1116# These are left unexpanded so users can "make install exec_prefix=/foo"
1117# and all the variables that are supposed to be based on exec_prefix
1118# by default will actually change.
1119# Use braces instead of parens because sh, perl, etc. also accept them.
1120# (The list follows the same order as the GNU Coding Standards.)
1121bindir='${exec_prefix}/bin'
1122sbindir='${exec_prefix}/sbin'
1123libexecdir='${exec_prefix}/libexec'
1124datarootdir='${prefix}/share'
1125datadir='${datarootdir}'
1126sysconfdir='${prefix}/etc'
1127sharedstatedir='${prefix}/com'
1128localstatedir='${prefix}/var'
1129includedir='${prefix}/include'
1130oldincludedir='/usr/include'
1131docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1132infodir='${datarootdir}/info'
1133htmldir='${docdir}'
1134dvidir='${docdir}'
1135pdfdir='${docdir}'
1136psdir='${docdir}'
1137libdir='${exec_prefix}/lib'
1138localedir='${datarootdir}/locale'
1139mandir='${datarootdir}/man'
1140
1141ac_prev=
1142ac_dashdash=
1143for ac_option
1144do
1145  # If the previous option needs an argument, assign it.
1146  if test -n "$ac_prev"; then
1147    eval $ac_prev=\$ac_option
1148    ac_prev=
1149    continue
1150  fi
1151
1152  case $ac_option in
1153  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1154  *=)   ac_optarg= ;;
1155  *)    ac_optarg=yes ;;
1156  esac
1157
1158  # Accept the important Cygnus configure options, so we can diagnose typos.
1159
1160  case $ac_dashdash$ac_option in
1161  --)
1162    ac_dashdash=yes ;;
1163
1164  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1165    ac_prev=bindir ;;
1166  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1167    bindir=$ac_optarg ;;
1168
1169  -build | --build | --buil | --bui | --bu)
1170    ac_prev=build_alias ;;
1171  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1172    build_alias=$ac_optarg ;;
1173
1174  -cache-file | --cache-file | --cache-fil | --cache-fi \
1175  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1176    ac_prev=cache_file ;;
1177  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1178  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1179    cache_file=$ac_optarg ;;
1180
1181  --config-cache | -C)
1182    cache_file=config.cache ;;
1183
1184  -datadir | --datadir | --datadi | --datad)
1185    ac_prev=datadir ;;
1186  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1187    datadir=$ac_optarg ;;
1188
1189  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1190  | --dataroo | --dataro | --datar)
1191    ac_prev=datarootdir ;;
1192  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1193  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1194    datarootdir=$ac_optarg ;;
1195
1196  -disable-* | --disable-*)
1197    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1198    # Reject names that are not valid shell variable names.
1199    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1200      as_fn_error $? "invalid feature name: $ac_useropt"
1201    ac_useropt_orig=$ac_useropt
1202    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203    case $ac_user_opts in
1204      *"
1205"enable_$ac_useropt"
1206"*) ;;
1207      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1208	 ac_unrecognized_sep=', ';;
1209    esac
1210    eval enable_$ac_useropt=no ;;
1211
1212  -docdir | --docdir | --docdi | --doc | --do)
1213    ac_prev=docdir ;;
1214  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1215    docdir=$ac_optarg ;;
1216
1217  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1218    ac_prev=dvidir ;;
1219  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1220    dvidir=$ac_optarg ;;
1221
1222  -enable-* | --enable-*)
1223    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1224    # Reject names that are not valid shell variable names.
1225    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1226      as_fn_error $? "invalid feature name: $ac_useropt"
1227    ac_useropt_orig=$ac_useropt
1228    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229    case $ac_user_opts in
1230      *"
1231"enable_$ac_useropt"
1232"*) ;;
1233      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1234	 ac_unrecognized_sep=', ';;
1235    esac
1236    eval enable_$ac_useropt=\$ac_optarg ;;
1237
1238  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1239  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1240  | --exec | --exe | --ex)
1241    ac_prev=exec_prefix ;;
1242  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1243  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1244  | --exec=* | --exe=* | --ex=*)
1245    exec_prefix=$ac_optarg ;;
1246
1247  -gas | --gas | --ga | --g)
1248    # Obsolete; use --with-gas.
1249    with_gas=yes ;;
1250
1251  -help | --help | --hel | --he | -h)
1252    ac_init_help=long ;;
1253  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1254    ac_init_help=recursive ;;
1255  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1256    ac_init_help=short ;;
1257
1258  -host | --host | --hos | --ho)
1259    ac_prev=host_alias ;;
1260  -host=* | --host=* | --hos=* | --ho=*)
1261    host_alias=$ac_optarg ;;
1262
1263  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1264    ac_prev=htmldir ;;
1265  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1266  | --ht=*)
1267    htmldir=$ac_optarg ;;
1268
1269  -includedir | --includedir | --includedi | --included | --include \
1270  | --includ | --inclu | --incl | --inc)
1271    ac_prev=includedir ;;
1272  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1273  | --includ=* | --inclu=* | --incl=* | --inc=*)
1274    includedir=$ac_optarg ;;
1275
1276  -infodir | --infodir | --infodi | --infod | --info | --inf)
1277    ac_prev=infodir ;;
1278  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1279    infodir=$ac_optarg ;;
1280
1281  -libdir | --libdir | --libdi | --libd)
1282    ac_prev=libdir ;;
1283  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1284    libdir=$ac_optarg ;;
1285
1286  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1287  | --libexe | --libex | --libe)
1288    ac_prev=libexecdir ;;
1289  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1290  | --libexe=* | --libex=* | --libe=*)
1291    libexecdir=$ac_optarg ;;
1292
1293  -localedir | --localedir | --localedi | --localed | --locale)
1294    ac_prev=localedir ;;
1295  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1296    localedir=$ac_optarg ;;
1297
1298  -localstatedir | --localstatedir | --localstatedi | --localstated \
1299  | --localstate | --localstat | --localsta | --localst | --locals)
1300    ac_prev=localstatedir ;;
1301  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1302  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1303    localstatedir=$ac_optarg ;;
1304
1305  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1306    ac_prev=mandir ;;
1307  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1308    mandir=$ac_optarg ;;
1309
1310  -nfp | --nfp | --nf)
1311    # Obsolete; use --without-fp.
1312    with_fp=no ;;
1313
1314  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1315  | --no-cr | --no-c | -n)
1316    no_create=yes ;;
1317
1318  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1319  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1320    no_recursion=yes ;;
1321
1322  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1323  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1324  | --oldin | --oldi | --old | --ol | --o)
1325    ac_prev=oldincludedir ;;
1326  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1327  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1328  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1329    oldincludedir=$ac_optarg ;;
1330
1331  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1332    ac_prev=prefix ;;
1333  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1334    prefix=$ac_optarg ;;
1335
1336  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1337  | --program-pre | --program-pr | --program-p)
1338    ac_prev=program_prefix ;;
1339  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1340  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1341    program_prefix=$ac_optarg ;;
1342
1343  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1344  | --program-suf | --program-su | --program-s)
1345    ac_prev=program_suffix ;;
1346  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1347  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1348    program_suffix=$ac_optarg ;;
1349
1350  -program-transform-name | --program-transform-name \
1351  | --program-transform-nam | --program-transform-na \
1352  | --program-transform-n | --program-transform- \
1353  | --program-transform | --program-transfor \
1354  | --program-transfo | --program-transf \
1355  | --program-trans | --program-tran \
1356  | --progr-tra | --program-tr | --program-t)
1357    ac_prev=program_transform_name ;;
1358  -program-transform-name=* | --program-transform-name=* \
1359  | --program-transform-nam=* | --program-transform-na=* \
1360  | --program-transform-n=* | --program-transform-=* \
1361  | --program-transform=* | --program-transfor=* \
1362  | --program-transfo=* | --program-transf=* \
1363  | --program-trans=* | --program-tran=* \
1364  | --progr-tra=* | --program-tr=* | --program-t=*)
1365    program_transform_name=$ac_optarg ;;
1366
1367  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1368    ac_prev=pdfdir ;;
1369  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1370    pdfdir=$ac_optarg ;;
1371
1372  -psdir | --psdir | --psdi | --psd | --ps)
1373    ac_prev=psdir ;;
1374  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1375    psdir=$ac_optarg ;;
1376
1377  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1378  | -silent | --silent | --silen | --sile | --sil)
1379    silent=yes ;;
1380
1381  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1382    ac_prev=sbindir ;;
1383  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1384  | --sbi=* | --sb=*)
1385    sbindir=$ac_optarg ;;
1386
1387  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1388  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1389  | --sharedst | --shareds | --shared | --share | --shar \
1390  | --sha | --sh)
1391    ac_prev=sharedstatedir ;;
1392  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1393  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1394  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1395  | --sha=* | --sh=*)
1396    sharedstatedir=$ac_optarg ;;
1397
1398  -site | --site | --sit)
1399    ac_prev=site ;;
1400  -site=* | --site=* | --sit=*)
1401    site=$ac_optarg ;;
1402
1403  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1404    ac_prev=srcdir ;;
1405  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1406    srcdir=$ac_optarg ;;
1407
1408  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1409  | --syscon | --sysco | --sysc | --sys | --sy)
1410    ac_prev=sysconfdir ;;
1411  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1412  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1413    sysconfdir=$ac_optarg ;;
1414
1415  -target | --target | --targe | --targ | --tar | --ta | --t)
1416    ac_prev=target_alias ;;
1417  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1418    target_alias=$ac_optarg ;;
1419
1420  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1421    verbose=yes ;;
1422
1423  -version | --version | --versio | --versi | --vers | -V)
1424    ac_init_version=: ;;
1425
1426  -with-* | --with-*)
1427    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1428    # Reject names that are not valid shell variable names.
1429    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1430      as_fn_error $? "invalid package name: $ac_useropt"
1431    ac_useropt_orig=$ac_useropt
1432    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1433    case $ac_user_opts in
1434      *"
1435"with_$ac_useropt"
1436"*) ;;
1437      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1438	 ac_unrecognized_sep=', ';;
1439    esac
1440    eval with_$ac_useropt=\$ac_optarg ;;
1441
1442  -without-* | --without-*)
1443    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1444    # Reject names that are not valid shell variable names.
1445    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1446      as_fn_error $? "invalid package name: $ac_useropt"
1447    ac_useropt_orig=$ac_useropt
1448    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1449    case $ac_user_opts in
1450      *"
1451"with_$ac_useropt"
1452"*) ;;
1453      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1454	 ac_unrecognized_sep=', ';;
1455    esac
1456    eval with_$ac_useropt=no ;;
1457
1458  --x)
1459    # Obsolete; use --with-x.
1460    with_x=yes ;;
1461
1462  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1463  | --x-incl | --x-inc | --x-in | --x-i)
1464    ac_prev=x_includes ;;
1465  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1466  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1467    x_includes=$ac_optarg ;;
1468
1469  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1470  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1471    ac_prev=x_libraries ;;
1472  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1473  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1474    x_libraries=$ac_optarg ;;
1475
1476  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1477Try \`$0 --help' for more information"
1478    ;;
1479
1480  *=*)
1481    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1482    # Reject names that are not valid shell variable names.
1483    case $ac_envvar in #(
1484      '' | [0-9]* | *[!_$as_cr_alnum]* )
1485      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1486    esac
1487    eval $ac_envvar=\$ac_optarg
1488    export $ac_envvar ;;
1489
1490  *)
1491    # FIXME: should be removed in autoconf 3.0.
1492    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1493    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1494      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1495    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1496    ;;
1497
1498  esac
1499done
1500
1501if test -n "$ac_prev"; then
1502  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1503  as_fn_error $? "missing argument to $ac_option"
1504fi
1505
1506if test -n "$ac_unrecognized_opts"; then
1507  case $enable_option_checking in
1508    no) ;;
1509    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1510    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1511  esac
1512fi
1513
1514# Check all directory arguments for consistency.
1515for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1516		datadir sysconfdir sharedstatedir localstatedir includedir \
1517		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1518		libdir localedir mandir
1519do
1520  eval ac_val=\$$ac_var
1521  # Remove trailing slashes.
1522  case $ac_val in
1523    */ )
1524      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1525      eval $ac_var=\$ac_val;;
1526  esac
1527  # Be sure to have absolute directory names.
1528  case $ac_val in
1529    [\\/$]* | ?:[\\/]* )  continue;;
1530    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1531  esac
1532  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1533done
1534
1535# There might be people who depend on the old broken behavior: `$host'
1536# used to hold the argument of --host etc.
1537# FIXME: To remove some day.
1538build=$build_alias
1539host=$host_alias
1540target=$target_alias
1541
1542# FIXME: To remove some day.
1543if test "x$host_alias" != x; then
1544  if test "x$build_alias" = x; then
1545    cross_compiling=maybe
1546  elif test "x$build_alias" != "x$host_alias"; then
1547    cross_compiling=yes
1548  fi
1549fi
1550
1551ac_tool_prefix=
1552test -n "$host_alias" && ac_tool_prefix=$host_alias-
1553
1554test "$silent" = yes && exec 6>/dev/null
1555
1556
1557ac_pwd=`pwd` && test -n "$ac_pwd" &&
1558ac_ls_di=`ls -di .` &&
1559ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1560  as_fn_error $? "working directory cannot be determined"
1561test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1562  as_fn_error $? "pwd does not report name of working directory"
1563
1564
1565# Find the source files, if location was not specified.
1566if test -z "$srcdir"; then
1567  ac_srcdir_defaulted=yes
1568  # Try the directory containing this script, then the parent directory.
1569  ac_confdir=`$as_dirname -- "$as_myself" ||
1570$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1571	 X"$as_myself" : 'X\(//\)[^/]' \| \
1572	 X"$as_myself" : 'X\(//\)$' \| \
1573	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1574$as_echo X"$as_myself" |
1575    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1576	    s//\1/
1577	    q
1578	  }
1579	  /^X\(\/\/\)[^/].*/{
1580	    s//\1/
1581	    q
1582	  }
1583	  /^X\(\/\/\)$/{
1584	    s//\1/
1585	    q
1586	  }
1587	  /^X\(\/\).*/{
1588	    s//\1/
1589	    q
1590	  }
1591	  s/.*/./; q'`
1592  srcdir=$ac_confdir
1593  if test ! -r "$srcdir/$ac_unique_file"; then
1594    srcdir=..
1595  fi
1596else
1597  ac_srcdir_defaulted=no
1598fi
1599if test ! -r "$srcdir/$ac_unique_file"; then
1600  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1601  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1602fi
1603ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1604ac_abs_confdir=`(
1605	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1606	pwd)`
1607# When building in place, set srcdir=.
1608if test "$ac_abs_confdir" = "$ac_pwd"; then
1609  srcdir=.
1610fi
1611# Remove unnecessary trailing slashes from srcdir.
1612# Double slashes in file names in object file debugging info
1613# mess up M-x gdb in Emacs.
1614case $srcdir in
1615*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1616esac
1617for ac_var in $ac_precious_vars; do
1618  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1619  eval ac_env_${ac_var}_value=\$${ac_var}
1620  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1621  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1622done
1623
1624#
1625# Report the --help message.
1626#
1627if test "$ac_init_help" = "long"; then
1628  # Omit some internal or obsolete options to make the list less imposing.
1629  # This message is too long to be a string in the A/UX 3.1 sh.
1630  cat <<_ACEOF
1631\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1632
1633Usage: $0 [OPTION]... [VAR=VALUE]...
1634
1635To assign environment variables (e.g., CC, CFLAGS...), specify them as
1636VAR=VALUE.  See below for descriptions of some of the useful variables.
1637
1638Defaults for the options are specified in brackets.
1639
1640Configuration:
1641  -h, --help              display this help and exit
1642      --help=short        display options specific to this package
1643      --help=recursive    display the short help of all the included packages
1644  -V, --version           display version information and exit
1645  -q, --quiet, --silent   do not print \`checking ...' messages
1646      --cache-file=FILE   cache test results in FILE [disabled]
1647  -C, --config-cache      alias for \`--cache-file=config.cache'
1648  -n, --no-create         do not create output files
1649      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1650
1651Installation directories:
1652  --prefix=PREFIX         install architecture-independent files in PREFIX
1653                          [$ac_default_prefix]
1654  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1655                          [PREFIX]
1656
1657By default, \`make install' will install all the files in
1658\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1659an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1660for instance \`--prefix=\$HOME'.
1661
1662For better control, use the options below.
1663
1664Fine tuning of the installation directories:
1665  --bindir=DIR            user executables [EPREFIX/bin]
1666  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1667  --libexecdir=DIR        program executables [EPREFIX/libexec]
1668  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1669  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1670  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1671  --libdir=DIR            object code libraries [EPREFIX/lib]
1672  --includedir=DIR        C header files [PREFIX/include]
1673  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1674  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1675  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1676  --infodir=DIR           info documentation [DATAROOTDIR/info]
1677  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1678  --mandir=DIR            man documentation [DATAROOTDIR/man]
1679  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1680  --htmldir=DIR           html documentation [DOCDIR]
1681  --dvidir=DIR            dvi documentation [DOCDIR]
1682  --pdfdir=DIR            pdf documentation [DOCDIR]
1683  --psdir=DIR             ps documentation [DOCDIR]
1684_ACEOF
1685
1686  cat <<\_ACEOF
1687
1688X features:
1689  --x-includes=DIR    X include files are in DIR
1690  --x-libraries=DIR   X library files are in DIR
1691
1692System types:
1693  --build=BUILD     configure for building on BUILD [guessed]
1694  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1695  --target=TARGET   configure for building compilers for TARGET [HOST]
1696_ACEOF
1697fi
1698
1699if test -n "$ac_init_help"; then
1700  case $ac_init_help in
1701     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1702   esac
1703  cat <<\_ACEOF
1704
1705Optional Features:
1706  --disable-option-checking  ignore unrecognized --enable/--with options
1707  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1708  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1709  --enable-openjdk-only   suppress building custom source even if present
1710                          [disabled]
1711  --enable-debug          set the debug level to fastdebug (shorthand for
1712                          --with-debug-level=fastdebug) [disabled]
1713  --disable-headful       disable building headful support (graphical UI
1714                          support) [enabled]
1715  --enable-hotspot-test-in-build
1716                          run the Queens test after Hotspot build [disabled]
1717  --enable-unlimited-crypto
1718                          Enable unlimited crypto policy [disabled]
1719  --disable-debug-symbols disable generation of debug symbols [enabled]
1720  --disable-zip-debug-info
1721                          disable zipping of debug-info files [enabled]
1722  --enable-macosx-runtime-support
1723                          Deprecated. Option is kept for backwards
1724                          compatibility and is ignored
1725  --disable-freetype-bundling
1726                          disable bundling of the freetype library with the
1727                          build result [enabled on Windows or when using
1728                          --with-freetype, disabled otherwise]
1729  --enable-sjavac         use sjavac to do fast incremental compiles
1730                          [disabled]
1731  --disable-precompiled-headers
1732                          disable using precompiled headers when compiling C++
1733                          [enabled]
1734  --disable-ccache        disable using ccache to speed up recompilations
1735                          [enabled]
1736
1737Optional Packages:
1738  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1739  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1740  --with-custom-make-dir  use this directory for custom build/make files
1741  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1742                          support it), e.g. --with-target-bits=32 [guessed]
1743  --with-sys-root         pass this sys-root to the compilers and tools (for
1744                          cross-compiling)
1745  --with-tools-dir        search this directory for compilers and tools (for
1746                          cross-compiling)
1747  --with-devkit           use this directory as base for tools-dir and
1748                          sys-root (for cross-compiling)
1749  --with-jdk-variant      JDK variant to build (normal) [normal]
1750  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1751                          client, minimal1, kernel, zero, zeroshark) [server]
1752  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1753                          [release]
1754  --with-conf-name        use this as the name of the configuration [generated
1755                          from important configuration options]
1756  --with-builddeps-conf   use this configuration file for the builddeps
1757  --with-builddeps-server download and use build dependencies from this server
1758                          url
1759  --with-builddeps-dir    store downloaded build dependencies here
1760                          [/localhome/builddeps]
1761  --with-builddeps-group  chgrp the downloaded build dependencies to this
1762                          group
1763  --with-cacerts-file     specify alternative cacerts file
1764  --with-milestone        Set milestone value for build [internal]
1765  --with-update-version   Set update version value for build [b00]
1766  --with-user-release-suffix
1767                          Add a custom string to the version string if build
1768                          number isn't set.[username_builddateb00]
1769  --with-build-number     Set build number value for build [b00]
1770  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1771  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1772                          invocations of the Boot JDK, overriding the default
1773                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1774                          -enableassertions"
1775  --with-add-source-root  for each and every source directory, look in this
1776                          additional source root for the same directory; if it
1777                          exists and have files in it, include it in the build
1778  --with-override-source-root
1779                          for each and every source directory, look in this
1780                          override source root for the same directory; if it
1781                          exists, use that directory instead and ignore the
1782                          directory in the original source root
1783  --with-adds-and-overrides
1784                          use the subdirs 'adds' and 'overrides' in the
1785                          specified directory as add-source-root and
1786                          override-source-root
1787  --with-override-langtools
1788                          use this langtools dir for the build
1789  --with-override-corba   use this corba dir for the build
1790  --with-override-jaxp    use this jaxp dir for the build
1791  --with-override-jaxws   use this jaxws dir for the build
1792  --with-override-hotspot use this hotspot dir for the build
1793  --with-override-nashorn use this nashorn dir for the build
1794  --with-override-jdk     use this jdk dir for the build
1795  --with-import-hotspot   import hotspot binaries from this jdk image or
1796                          hotspot build dist dir instead of building from
1797                          source
1798  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1799                          only) [probed]
1800  --with-dxsdk            Deprecated. Option is kept for backwards
1801                          compatibility and is ignored
1802  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1803                          compatibility and is ignored
1804  --with-dxsdk-include    Deprecated. Option is kept for backwards
1805                          compatibility and is ignored
1806  --with-jtreg            Regression Test Harness [probed]
1807  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1808  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1809  --with-extra-ldflags    extra flags to be used when linking jdk
1810  --with-x                use the X Window System
1811  --with-cups             specify prefix directory for the cups package
1812                          (expecting the headers under PATH/include)
1813  --with-cups-include     specify directory for the cups include files
1814  --with-freetype         specify prefix directory for the freetype package
1815                          (expecting the libraries under PATH/lib and the
1816                          headers under PATH/include)
1817  --with-freetype-include specify directory for the freetype include files
1818  --with-freetype-lib     specify directory for the freetype library
1819  --with-alsa             specify prefix directory for the alsa package
1820                          (expecting the libraries under PATH/lib and the
1821                          headers under PATH/include)
1822  --with-alsa-include     specify directory for the alsa include files
1823  --with-alsa-lib         specify directory for the alsa library
1824  --with-giflib           use giflib from build system or OpenJDK source
1825                          (system, bundled) [bundled]
1826  --with-zlib             use zlib from build system or OpenJDK source
1827                          (system, bundled) [bundled]
1828  --with-stdc++lib=<static>,<dynamic>,<default>
1829                          force linking of the C++ runtime on Linux to either
1830                          static or dynamic, default is static with dynamic as
1831                          fallback
1832  --with-num-cores        number of cores in the build system, e.g.
1833                          --with-num-cores=8 [probed]
1834  --with-memory-size      memory (in MB) available in the build system, e.g.
1835                          --with-memory-size=1024 [probed]
1836  --with-jobs             number of parallel jobs to let make run [calculated
1837                          based on cores and memory]
1838  --with-sjavac-server-java
1839                          use this java binary for running the sjavac
1840                          background server [Boot JDK java]
1841  --with-ccache-dir       where to store ccache files [~/.ccache]
1842
1843Some influential environment variables:
1844  PKG_CONFIG  path to pkg-config utility
1845  CC          C compiler command
1846  CFLAGS      C compiler flags
1847  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1848              nonstandard directory <lib dir>
1849  LIBS        libraries to pass to the linker, e.g. -l<library>
1850  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1851              you have headers in a nonstandard directory <include dir>
1852  CXX         C++ compiler command
1853  CXXFLAGS    C++ compiler flags
1854  OBJC        Objective C compiler command
1855  OBJCFLAGS   Objective C compiler flags
1856  CPP         C preprocessor
1857  CXXCPP      C++ preprocessor
1858  XMKMF       Path to xmkmf, Makefile generator for X Window System
1859  FREETYPE_CFLAGS
1860              C compiler flags for FREETYPE, overriding pkg-config
1861  FREETYPE_LIBS
1862              linker flags for FREETYPE, overriding pkg-config
1863  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1864  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1865  LIBFFI_CFLAGS
1866              C compiler flags for LIBFFI, overriding pkg-config
1867  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1868
1869Use these variables to override the choices made by `configure' or to help
1870it to find libraries and programs with nonstandard names/locations.
1871
1872Report bugs to <build-dev@openjdk.java.net>.
1873OpenJDK home page: <http://openjdk.java.net>.
1874_ACEOF
1875ac_status=$?
1876fi
1877
1878if test "$ac_init_help" = "recursive"; then
1879  # If there are subdirs, report their specific --help.
1880  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1881    test -d "$ac_dir" ||
1882      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1883      continue
1884    ac_builddir=.
1885
1886case "$ac_dir" in
1887.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1888*)
1889  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1890  # A ".." for each directory in $ac_dir_suffix.
1891  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1892  case $ac_top_builddir_sub in
1893  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1894  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1895  esac ;;
1896esac
1897ac_abs_top_builddir=$ac_pwd
1898ac_abs_builddir=$ac_pwd$ac_dir_suffix
1899# for backward compatibility:
1900ac_top_builddir=$ac_top_build_prefix
1901
1902case $srcdir in
1903  .)  # We are building in place.
1904    ac_srcdir=.
1905    ac_top_srcdir=$ac_top_builddir_sub
1906    ac_abs_top_srcdir=$ac_pwd ;;
1907  [\\/]* | ?:[\\/]* )  # Absolute name.
1908    ac_srcdir=$srcdir$ac_dir_suffix;
1909    ac_top_srcdir=$srcdir
1910    ac_abs_top_srcdir=$srcdir ;;
1911  *) # Relative name.
1912    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1913    ac_top_srcdir=$ac_top_build_prefix$srcdir
1914    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1915esac
1916ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1917
1918    cd "$ac_dir" || { ac_status=$?; continue; }
1919    # Check for guested configure.
1920    if test -f "$ac_srcdir/configure.gnu"; then
1921      echo &&
1922      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1923    elif test -f "$ac_srcdir/configure"; then
1924      echo &&
1925      $SHELL "$ac_srcdir/configure" --help=recursive
1926    else
1927      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1928    fi || ac_status=$?
1929    cd "$ac_pwd" || { ac_status=$?; break; }
1930  done
1931fi
1932
1933test -n "$ac_init_help" && exit $ac_status
1934if $ac_init_version; then
1935  cat <<\_ACEOF
1936OpenJDK configure jdk8
1937generated by GNU Autoconf 2.69
1938
1939Copyright (C) 2012 Free Software Foundation, Inc.
1940This configure script is free software; the Free Software Foundation
1941gives unlimited permission to copy, distribute and modify it.
1942_ACEOF
1943  exit
1944fi
1945
1946## ------------------------ ##
1947## Autoconf initialization. ##
1948## ------------------------ ##
1949
1950# ac_fn_c_try_compile LINENO
1951# --------------------------
1952# Try to compile conftest.$ac_ext, and return whether this succeeded.
1953ac_fn_c_try_compile ()
1954{
1955  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956  rm -f conftest.$ac_objext
1957  if { { ac_try="$ac_compile"
1958case "(($ac_try" in
1959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960  *) ac_try_echo=$ac_try;;
1961esac
1962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963$as_echo "$ac_try_echo"; } >&5
1964  (eval "$ac_compile") 2>conftest.err
1965  ac_status=$?
1966  if test -s conftest.err; then
1967    grep -v '^ *+' conftest.err >conftest.er1
1968    cat conftest.er1 >&5
1969    mv -f conftest.er1 conftest.err
1970  fi
1971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972  test $ac_status = 0; } && {
1973	 test -z "$ac_c_werror_flag" ||
1974	 test ! -s conftest.err
1975       } && test -s conftest.$ac_objext; then :
1976  ac_retval=0
1977else
1978  $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
1980
1981	ac_retval=1
1982fi
1983  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1984  as_fn_set_status $ac_retval
1985
1986} # ac_fn_c_try_compile
1987
1988# ac_fn_cxx_try_compile LINENO
1989# ----------------------------
1990# Try to compile conftest.$ac_ext, and return whether this succeeded.
1991ac_fn_cxx_try_compile ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  rm -f conftest.$ac_objext
1995  if { { ac_try="$ac_compile"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_compile") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } && {
2011	 test -z "$ac_cxx_werror_flag" ||
2012	 test ! -s conftest.err
2013       } && test -s conftest.$ac_objext; then :
2014  ac_retval=0
2015else
2016  $as_echo "$as_me: failed program was:" >&5
2017sed 's/^/| /' conftest.$ac_ext >&5
2018
2019	ac_retval=1
2020fi
2021  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2022  as_fn_set_status $ac_retval
2023
2024} # ac_fn_cxx_try_compile
2025
2026# ac_fn_objc_try_compile LINENO
2027# -----------------------------
2028# Try to compile conftest.$ac_ext, and return whether this succeeded.
2029ac_fn_objc_try_compile ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  rm -f conftest.$ac_objext
2033  if { { ac_try="$ac_compile"
2034case "(($ac_try" in
2035  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2036  *) ac_try_echo=$ac_try;;
2037esac
2038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2039$as_echo "$ac_try_echo"; } >&5
2040  (eval "$ac_compile") 2>conftest.err
2041  ac_status=$?
2042  if test -s conftest.err; then
2043    grep -v '^ *+' conftest.err >conftest.er1
2044    cat conftest.er1 >&5
2045    mv -f conftest.er1 conftest.err
2046  fi
2047  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2048  test $ac_status = 0; } && {
2049	 test -z "$ac_objc_werror_flag" ||
2050	 test ! -s conftest.err
2051       } && test -s conftest.$ac_objext; then :
2052  ac_retval=0
2053else
2054  $as_echo "$as_me: failed program was:" >&5
2055sed 's/^/| /' conftest.$ac_ext >&5
2056
2057	ac_retval=1
2058fi
2059  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2060  as_fn_set_status $ac_retval
2061
2062} # ac_fn_objc_try_compile
2063
2064# ac_fn_c_try_cpp LINENO
2065# ----------------------
2066# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2067ac_fn_c_try_cpp ()
2068{
2069  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2070  if { { ac_try="$ac_cpp conftest.$ac_ext"
2071case "(($ac_try" in
2072  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2073  *) ac_try_echo=$ac_try;;
2074esac
2075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2076$as_echo "$ac_try_echo"; } >&5
2077  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2078  ac_status=$?
2079  if test -s conftest.err; then
2080    grep -v '^ *+' conftest.err >conftest.er1
2081    cat conftest.er1 >&5
2082    mv -f conftest.er1 conftest.err
2083  fi
2084  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2085  test $ac_status = 0; } > conftest.i && {
2086	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2087	 test ! -s conftest.err
2088       }; then :
2089  ac_retval=0
2090else
2091  $as_echo "$as_me: failed program was:" >&5
2092sed 's/^/| /' conftest.$ac_ext >&5
2093
2094    ac_retval=1
2095fi
2096  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2097  as_fn_set_status $ac_retval
2098
2099} # ac_fn_c_try_cpp
2100
2101# ac_fn_cxx_try_cpp LINENO
2102# ------------------------
2103# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2104ac_fn_cxx_try_cpp ()
2105{
2106  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107  if { { ac_try="$ac_cpp conftest.$ac_ext"
2108case "(($ac_try" in
2109  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2110  *) ac_try_echo=$ac_try;;
2111esac
2112eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2113$as_echo "$ac_try_echo"; } >&5
2114  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2115  ac_status=$?
2116  if test -s conftest.err; then
2117    grep -v '^ *+' conftest.err >conftest.er1
2118    cat conftest.er1 >&5
2119    mv -f conftest.er1 conftest.err
2120  fi
2121  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2122  test $ac_status = 0; } > conftest.i && {
2123	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2124	 test ! -s conftest.err
2125       }; then :
2126  ac_retval=0
2127else
2128  $as_echo "$as_me: failed program was:" >&5
2129sed 's/^/| /' conftest.$ac_ext >&5
2130
2131    ac_retval=1
2132fi
2133  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2134  as_fn_set_status $ac_retval
2135
2136} # ac_fn_cxx_try_cpp
2137
2138# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2139# ---------------------------------------------------------
2140# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2141# the include files in INCLUDES and setting the cache variable VAR
2142# accordingly.
2143ac_fn_cxx_check_header_mongrel ()
2144{
2145  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2146  if eval \${$3+:} false; then :
2147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2148$as_echo_n "checking for $2... " >&6; }
2149if eval \${$3+:} false; then :
2150  $as_echo_n "(cached) " >&6
2151fi
2152eval ac_res=\$$3
2153	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2154$as_echo "$ac_res" >&6; }
2155else
2156  # Is the header compilable?
2157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2158$as_echo_n "checking $2 usability... " >&6; }
2159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h.  */
2161$4
2162#include <$2>
2163_ACEOF
2164if ac_fn_cxx_try_compile "$LINENO"; then :
2165  ac_header_compiler=yes
2166else
2167  ac_header_compiler=no
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2171$as_echo "$ac_header_compiler" >&6; }
2172
2173# Is the header present?
2174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2175$as_echo_n "checking $2 presence... " >&6; }
2176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h.  */
2178#include <$2>
2179_ACEOF
2180if ac_fn_cxx_try_cpp "$LINENO"; then :
2181  ac_header_preproc=yes
2182else
2183  ac_header_preproc=no
2184fi
2185rm -f conftest.err conftest.i conftest.$ac_ext
2186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2187$as_echo "$ac_header_preproc" >&6; }
2188
2189# So?  What about this header?
2190case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2191  yes:no: )
2192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2193$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2195$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2196    ;;
2197  no:yes:* )
2198    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2199$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2200    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2201$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2202    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2203$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2204    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2205$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2206    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2207$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2208( $as_echo "## ----------------------------------------- ##
2209## Report this to build-dev@openjdk.java.net ##
2210## ----------------------------------------- ##"
2211     ) | sed "s/^/$as_me: WARNING:     /" >&2
2212    ;;
2213esac
2214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2215$as_echo_n "checking for $2... " >&6; }
2216if eval \${$3+:} false; then :
2217  $as_echo_n "(cached) " >&6
2218else
2219  eval "$3=\$ac_header_compiler"
2220fi
2221eval ac_res=\$$3
2222	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2223$as_echo "$ac_res" >&6; }
2224fi
2225  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2226
2227} # ac_fn_cxx_check_header_mongrel
2228
2229# ac_fn_cxx_try_run LINENO
2230# ------------------------
2231# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2232# that executables *can* be run.
2233ac_fn_cxx_try_run ()
2234{
2235  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236  if { { ac_try="$ac_link"
2237case "(($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_link") 2>&5
2244  ac_status=$?
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2247  { { case "(($ac_try" in
2248  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2249  *) ac_try_echo=$ac_try;;
2250esac
2251eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2252$as_echo "$ac_try_echo"; } >&5
2253  (eval "$ac_try") 2>&5
2254  ac_status=$?
2255  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2256  test $ac_status = 0; }; }; then :
2257  ac_retval=0
2258else
2259  $as_echo "$as_me: program exited with status $ac_status" >&5
2260       $as_echo "$as_me: failed program was:" >&5
2261sed 's/^/| /' conftest.$ac_ext >&5
2262
2263       ac_retval=$ac_status
2264fi
2265  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2266  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2267  as_fn_set_status $ac_retval
2268
2269} # ac_fn_cxx_try_run
2270
2271# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2272# ---------------------------------------------------------
2273# Tests whether HEADER exists and can be compiled using the include files in
2274# INCLUDES, setting the cache variable VAR accordingly.
2275ac_fn_cxx_check_header_compile ()
2276{
2277  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2279$as_echo_n "checking for $2... " >&6; }
2280if eval \${$3+:} false; then :
2281  $as_echo_n "(cached) " >&6
2282else
2283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2284/* end confdefs.h.  */
2285$4
2286#include <$2>
2287_ACEOF
2288if ac_fn_cxx_try_compile "$LINENO"; then :
2289  eval "$3=yes"
2290else
2291  eval "$3=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295eval ac_res=\$$3
2296	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
2298  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299
2300} # ac_fn_cxx_check_header_compile
2301
2302# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2303# ----------------------------------------------
2304# Tries to find the compile-time value of EXPR in a program that includes
2305# INCLUDES, setting VAR accordingly. Returns whether the value could be
2306# computed
2307ac_fn_cxx_compute_int ()
2308{
2309  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310  if test "$cross_compiling" = yes; then
2311    # Depending upon the size, compute the lo and hi bounds.
2312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h.  */
2314$4
2315int
2316main ()
2317{
2318static int test_array [1 - 2 * !(($2) >= 0)];
2319test_array [0] = 0;
2320return test_array [0];
2321
2322  ;
2323  return 0;
2324}
2325_ACEOF
2326if ac_fn_cxx_try_compile "$LINENO"; then :
2327  ac_lo=0 ac_mid=0
2328  while :; do
2329    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330/* end confdefs.h.  */
2331$4
2332int
2333main ()
2334{
2335static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2336test_array [0] = 0;
2337return test_array [0];
2338
2339  ;
2340  return 0;
2341}
2342_ACEOF
2343if ac_fn_cxx_try_compile "$LINENO"; then :
2344  ac_hi=$ac_mid; break
2345else
2346  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2347			if test $ac_lo -le $ac_mid; then
2348			  ac_lo= ac_hi=
2349			  break
2350			fi
2351			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354  done
2355else
2356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357/* end confdefs.h.  */
2358$4
2359int
2360main ()
2361{
2362static int test_array [1 - 2 * !(($2) < 0)];
2363test_array [0] = 0;
2364return test_array [0];
2365
2366  ;
2367  return 0;
2368}
2369_ACEOF
2370if ac_fn_cxx_try_compile "$LINENO"; then :
2371  ac_hi=-1 ac_mid=-1
2372  while :; do
2373    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h.  */
2375$4
2376int
2377main ()
2378{
2379static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2380test_array [0] = 0;
2381return test_array [0];
2382
2383  ;
2384  return 0;
2385}
2386_ACEOF
2387if ac_fn_cxx_try_compile "$LINENO"; then :
2388  ac_lo=$ac_mid; break
2389else
2390  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2391			if test $ac_mid -le $ac_hi; then
2392			  ac_lo= ac_hi=
2393			  break
2394			fi
2395			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2396fi
2397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398  done
2399else
2400  ac_lo= ac_hi=
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405# Binary search between lo and hi bounds.
2406while test "x$ac_lo" != "x$ac_hi"; do
2407  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409/* end confdefs.h.  */
2410$4
2411int
2412main ()
2413{
2414static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2415test_array [0] = 0;
2416return test_array [0];
2417
2418  ;
2419  return 0;
2420}
2421_ACEOF
2422if ac_fn_cxx_try_compile "$LINENO"; then :
2423  ac_hi=$ac_mid
2424else
2425  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2426fi
2427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428done
2429case $ac_lo in #((
2430?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2431'') ac_retval=1 ;;
2432esac
2433  else
2434    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2435/* end confdefs.h.  */
2436$4
2437static long int longval () { return $2; }
2438static unsigned long int ulongval () { return $2; }
2439#include <stdio.h>
2440#include <stdlib.h>
2441int
2442main ()
2443{
2444
2445  FILE *f = fopen ("conftest.val", "w");
2446  if (! f)
2447    return 1;
2448  if (($2) < 0)
2449    {
2450      long int i = longval ();
2451      if (i != ($2))
2452	return 1;
2453      fprintf (f, "%ld", i);
2454    }
2455  else
2456    {
2457      unsigned long int i = ulongval ();
2458      if (i != ($2))
2459	return 1;
2460      fprintf (f, "%lu", i);
2461    }
2462  /* Do not output a trailing newline, as this causes \r\n confusion
2463     on some platforms.  */
2464  return ferror (f) || fclose (f) != 0;
2465
2466  ;
2467  return 0;
2468}
2469_ACEOF
2470if ac_fn_cxx_try_run "$LINENO"; then :
2471  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2472else
2473  ac_retval=1
2474fi
2475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2476  conftest.$ac_objext conftest.beam conftest.$ac_ext
2477rm -f conftest.val
2478
2479  fi
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481  as_fn_set_status $ac_retval
2482
2483} # ac_fn_cxx_compute_int
2484
2485# ac_fn_cxx_try_link LINENO
2486# -------------------------
2487# Try to link conftest.$ac_ext, and return whether this succeeded.
2488ac_fn_cxx_try_link ()
2489{
2490  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491  rm -f conftest.$ac_objext conftest$ac_exeext
2492  if { { ac_try="$ac_link"
2493case "(($ac_try" in
2494  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2495  *) ac_try_echo=$ac_try;;
2496esac
2497eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2498$as_echo "$ac_try_echo"; } >&5
2499  (eval "$ac_link") 2>conftest.err
2500  ac_status=$?
2501  if test -s conftest.err; then
2502    grep -v '^ *+' conftest.err >conftest.er1
2503    cat conftest.er1 >&5
2504    mv -f conftest.er1 conftest.err
2505  fi
2506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507  test $ac_status = 0; } && {
2508	 test -z "$ac_cxx_werror_flag" ||
2509	 test ! -s conftest.err
2510       } && test -s conftest$ac_exeext && {
2511	 test "$cross_compiling" = yes ||
2512	 test -x conftest$ac_exeext
2513       }; then :
2514  ac_retval=0
2515else
2516  $as_echo "$as_me: failed program was:" >&5
2517sed 's/^/| /' conftest.$ac_ext >&5
2518
2519	ac_retval=1
2520fi
2521  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2522  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2523  # interfere with the next link command; also delete a directory that is
2524  # left behind by Apple's compiler.  We do this before executing the actions.
2525  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2526  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2527  as_fn_set_status $ac_retval
2528
2529} # ac_fn_cxx_try_link
2530
2531# ac_fn_cxx_check_func LINENO FUNC VAR
2532# ------------------------------------
2533# Tests whether FUNC exists, setting the cache variable VAR accordingly
2534ac_fn_cxx_check_func ()
2535{
2536  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2538$as_echo_n "checking for $2... " >&6; }
2539if eval \${$3+:} false; then :
2540  $as_echo_n "(cached) " >&6
2541else
2542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2543/* end confdefs.h.  */
2544/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2545   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2546#define $2 innocuous_$2
2547
2548/* System header to define __stub macros and hopefully few prototypes,
2549    which can conflict with char $2 (); below.
2550    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2551    <limits.h> exists even on freestanding compilers.  */
2552
2553#ifdef __STDC__
2554# include <limits.h>
2555#else
2556# include <assert.h>
2557#endif
2558
2559#undef $2
2560
2561/* Override any GCC internal prototype to avoid an error.
2562   Use char because int might match the return type of a GCC
2563   builtin and then its argument prototype would still apply.  */
2564#ifdef __cplusplus
2565extern "C"
2566#endif
2567char $2 ();
2568/* The GNU C library defines this for functions which it implements
2569    to always fail with ENOSYS.  Some functions are actually named
2570    something starting with __ and the normal name is an alias.  */
2571#if defined __stub_$2 || defined __stub___$2
2572choke me
2573#endif
2574
2575int
2576main ()
2577{
2578return $2 ();
2579  ;
2580  return 0;
2581}
2582_ACEOF
2583if ac_fn_cxx_try_link "$LINENO"; then :
2584  eval "$3=yes"
2585else
2586  eval "$3=no"
2587fi
2588rm -f core conftest.err conftest.$ac_objext \
2589    conftest$ac_exeext conftest.$ac_ext
2590fi
2591eval ac_res=\$$3
2592	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2593$as_echo "$ac_res" >&6; }
2594  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2595
2596} # ac_fn_cxx_check_func
2597
2598# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2599# -------------------------------------------------------
2600# Tests whether HEADER exists and can be compiled using the include files in
2601# INCLUDES, setting the cache variable VAR accordingly.
2602ac_fn_c_check_header_compile ()
2603{
2604  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2606$as_echo_n "checking for $2... " >&6; }
2607if eval \${$3+:} false; then :
2608  $as_echo_n "(cached) " >&6
2609else
2610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613#include <$2>
2614_ACEOF
2615if ac_fn_c_try_compile "$LINENO"; then :
2616  eval "$3=yes"
2617else
2618  eval "$3=no"
2619fi
2620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621fi
2622eval ac_res=\$$3
2623	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2624$as_echo "$ac_res" >&6; }
2625  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2626
2627} # ac_fn_c_check_header_compile
2628cat >config.log <<_ACEOF
2629This file contains any messages produced by compilers while
2630running configure, to aid debugging if configure makes a mistake.
2631
2632It was created by OpenJDK $as_me jdk8, which was
2633generated by GNU Autoconf 2.69.  Invocation command line was
2634
2635  $ $0 $@
2636
2637_ACEOF
2638exec 5>>config.log
2639{
2640cat <<_ASUNAME
2641## --------- ##
2642## Platform. ##
2643## --------- ##
2644
2645hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2646uname -m = `(uname -m) 2>/dev/null || echo unknown`
2647uname -r = `(uname -r) 2>/dev/null || echo unknown`
2648uname -s = `(uname -s) 2>/dev/null || echo unknown`
2649uname -v = `(uname -v) 2>/dev/null || echo unknown`
2650
2651/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2652/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2653
2654/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2655/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2656/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2657/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2658/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2659/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2660/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2661
2662_ASUNAME
2663
2664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2665for as_dir in $PATH
2666do
2667  IFS=$as_save_IFS
2668  test -z "$as_dir" && as_dir=.
2669    $as_echo "PATH: $as_dir"
2670  done
2671IFS=$as_save_IFS
2672
2673} >&5
2674
2675cat >&5 <<_ACEOF
2676
2677
2678## ----------- ##
2679## Core tests. ##
2680## ----------- ##
2681
2682_ACEOF
2683
2684
2685# Keep a trace of the command line.
2686# Strip out --no-create and --no-recursion so they do not pile up.
2687# Strip out --silent because we don't want to record it for future runs.
2688# Also quote any args containing shell meta-characters.
2689# Make two passes to allow for proper duplicate-argument suppression.
2690ac_configure_args=
2691ac_configure_args0=
2692ac_configure_args1=
2693ac_must_keep_next=false
2694for ac_pass in 1 2
2695do
2696  for ac_arg
2697  do
2698    case $ac_arg in
2699    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2700    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2701    | -silent | --silent | --silen | --sile | --sil)
2702      continue ;;
2703    *\'*)
2704      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2705    esac
2706    case $ac_pass in
2707    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2708    2)
2709      as_fn_append ac_configure_args1 " '$ac_arg'"
2710      if test $ac_must_keep_next = true; then
2711	ac_must_keep_next=false # Got value, back to normal.
2712      else
2713	case $ac_arg in
2714	  *=* | --config-cache | -C | -disable-* | --disable-* \
2715	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2716	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2717	  | -with-* | --with-* | -without-* | --without-* | --x)
2718	    case "$ac_configure_args0 " in
2719	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2720	    esac
2721	    ;;
2722	  -* ) ac_must_keep_next=true ;;
2723	esac
2724      fi
2725      as_fn_append ac_configure_args " '$ac_arg'"
2726      ;;
2727    esac
2728  done
2729done
2730{ ac_configure_args0=; unset ac_configure_args0;}
2731{ ac_configure_args1=; unset ac_configure_args1;}
2732
2733# When interrupted or exit'd, cleanup temporary files, and complete
2734# config.log.  We remove comments because anyway the quotes in there
2735# would cause problems or look ugly.
2736# WARNING: Use '\'' to represent an apostrophe within the trap.
2737# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2738trap 'exit_status=$?
2739  # Save into config.log some information that might help in debugging.
2740  {
2741    echo
2742
2743    $as_echo "## ---------------- ##
2744## Cache variables. ##
2745## ---------------- ##"
2746    echo
2747    # The following way of writing the cache mishandles newlines in values,
2748(
2749  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2750    eval ac_val=\$$ac_var
2751    case $ac_val in #(
2752    *${as_nl}*)
2753      case $ac_var in #(
2754      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2755$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2756      esac
2757      case $ac_var in #(
2758      _ | IFS | as_nl) ;; #(
2759      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2760      *) { eval $ac_var=; unset $ac_var;} ;;
2761      esac ;;
2762    esac
2763  done
2764  (set) 2>&1 |
2765    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2766    *${as_nl}ac_space=\ *)
2767      sed -n \
2768	"s/'\''/'\''\\\\'\'''\''/g;
2769	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2770      ;; #(
2771    *)
2772      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2773      ;;
2774    esac |
2775    sort
2776)
2777    echo
2778
2779    $as_echo "## ----------------- ##
2780## Output variables. ##
2781## ----------------- ##"
2782    echo
2783    for ac_var in $ac_subst_vars
2784    do
2785      eval ac_val=\$$ac_var
2786      case $ac_val in
2787      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2788      esac
2789      $as_echo "$ac_var='\''$ac_val'\''"
2790    done | sort
2791    echo
2792
2793    if test -n "$ac_subst_files"; then
2794      $as_echo "## ------------------- ##
2795## File substitutions. ##
2796## ------------------- ##"
2797      echo
2798      for ac_var in $ac_subst_files
2799      do
2800	eval ac_val=\$$ac_var
2801	case $ac_val in
2802	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2803	esac
2804	$as_echo "$ac_var='\''$ac_val'\''"
2805      done | sort
2806      echo
2807    fi
2808
2809    if test -s confdefs.h; then
2810      $as_echo "## ----------- ##
2811## confdefs.h. ##
2812## ----------- ##"
2813      echo
2814      cat confdefs.h
2815      echo
2816    fi
2817    test "$ac_signal" != 0 &&
2818      $as_echo "$as_me: caught signal $ac_signal"
2819    $as_echo "$as_me: exit $exit_status"
2820  } >&5
2821  rm -f core *.core core.conftest.* &&
2822    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2823    exit $exit_status
2824' 0
2825for ac_signal in 1 2 13 15; do
2826  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2827done
2828ac_signal=0
2829
2830# confdefs.h avoids OS command line length limits that DEFS can exceed.
2831rm -f -r conftest* confdefs.h
2832
2833$as_echo "/* confdefs.h */" > confdefs.h
2834
2835# Predefined preprocessor variables.
2836
2837cat >>confdefs.h <<_ACEOF
2838#define PACKAGE_NAME "$PACKAGE_NAME"
2839_ACEOF
2840
2841cat >>confdefs.h <<_ACEOF
2842#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2843_ACEOF
2844
2845cat >>confdefs.h <<_ACEOF
2846#define PACKAGE_VERSION "$PACKAGE_VERSION"
2847_ACEOF
2848
2849cat >>confdefs.h <<_ACEOF
2850#define PACKAGE_STRING "$PACKAGE_STRING"
2851_ACEOF
2852
2853cat >>confdefs.h <<_ACEOF
2854#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2855_ACEOF
2856
2857cat >>confdefs.h <<_ACEOF
2858#define PACKAGE_URL "$PACKAGE_URL"
2859_ACEOF
2860
2861
2862# Let the site file select an alternate cache file if it wants to.
2863# Prefer an explicitly selected file to automatically selected ones.
2864ac_site_file1=NONE
2865ac_site_file2=NONE
2866if test -n "$CONFIG_SITE"; then
2867  # We do not want a PATH search for config.site.
2868  case $CONFIG_SITE in #((
2869    -*)  ac_site_file1=./$CONFIG_SITE;;
2870    */*) ac_site_file1=$CONFIG_SITE;;
2871    *)   ac_site_file1=./$CONFIG_SITE;;
2872  esac
2873elif test "x$prefix" != xNONE; then
2874  ac_site_file1=$prefix/share/config.site
2875  ac_site_file2=$prefix/etc/config.site
2876else
2877  ac_site_file1=$ac_default_prefix/share/config.site
2878  ac_site_file2=$ac_default_prefix/etc/config.site
2879fi
2880for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2881do
2882  test "x$ac_site_file" = xNONE && continue
2883  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2884    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2885$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2886    sed 's/^/| /' "$ac_site_file" >&5
2887    . "$ac_site_file" \
2888      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2890as_fn_error $? "failed to load site script $ac_site_file
2891See \`config.log' for more details" "$LINENO" 5; }
2892  fi
2893done
2894
2895if test -r "$cache_file"; then
2896  # Some versions of bash will fail to source /dev/null (special files
2897  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2898  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2899    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2900$as_echo "$as_me: loading cache $cache_file" >&6;}
2901    case $cache_file in
2902      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2903      *)                      . "./$cache_file";;
2904    esac
2905  fi
2906else
2907  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2908$as_echo "$as_me: creating cache $cache_file" >&6;}
2909  >$cache_file
2910fi
2911
2912# Check that the precious variables saved in the cache have kept the same
2913# value.
2914ac_cache_corrupted=false
2915for ac_var in $ac_precious_vars; do
2916  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2917  eval ac_new_set=\$ac_env_${ac_var}_set
2918  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2919  eval ac_new_val=\$ac_env_${ac_var}_value
2920  case $ac_old_set,$ac_new_set in
2921    set,)
2922      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2923$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2924      ac_cache_corrupted=: ;;
2925    ,set)
2926      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2927$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2928      ac_cache_corrupted=: ;;
2929    ,);;
2930    *)
2931      if test "x$ac_old_val" != "x$ac_new_val"; then
2932	# differences in whitespace do not lead to failure.
2933	ac_old_val_w=`echo x $ac_old_val`
2934	ac_new_val_w=`echo x $ac_new_val`
2935	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2936	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2937$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2938	  ac_cache_corrupted=:
2939	else
2940	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2941$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2942	  eval $ac_var=\$ac_old_val
2943	fi
2944	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2945$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2946	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2947$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2948      fi;;
2949  esac
2950  # Pass precious variables to config.status.
2951  if test "$ac_new_set" = set; then
2952    case $ac_new_val in
2953    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2954    *) ac_arg=$ac_var=$ac_new_val ;;
2955    esac
2956    case " $ac_configure_args " in
2957      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2958      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2959    esac
2960  fi
2961done
2962if $ac_cache_corrupted; then
2963  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2965  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2966$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2967  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2968fi
2969## -------------------- ##
2970## Main body of script. ##
2971## -------------------- ##
2972
2973ac_ext=c
2974ac_cpp='$CPP $CPPFLAGS'
2975ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2976ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2977ac_compiler_gnu=$ac_cv_c_compiler_gnu
2978
2979
2980
2981ac_aux_dir=
2982for ac_dir in build-aux "$srcdir"/build-aux; do
2983  if test -f "$ac_dir/install-sh"; then
2984    ac_aux_dir=$ac_dir
2985    ac_install_sh="$ac_aux_dir/install-sh -c"
2986    break
2987  elif test -f "$ac_dir/install.sh"; then
2988    ac_aux_dir=$ac_dir
2989    ac_install_sh="$ac_aux_dir/install.sh -c"
2990    break
2991  elif test -f "$ac_dir/shtool"; then
2992    ac_aux_dir=$ac_dir
2993    ac_install_sh="$ac_aux_dir/shtool install -c"
2994    break
2995  fi
2996done
2997if test -z "$ac_aux_dir"; then
2998  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2999fi
3000
3001# These three variables are undocumented and unsupported,
3002# and are intended to be withdrawn in a future Autoconf release.
3003# They can cause serious problems if a builder's source tree is in a directory
3004# whose full name contains unusual characters.
3005ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3006ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3007ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3008
3009
3010# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3011
3012#
3013# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3014# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3015#
3016# This code is free software; you can redistribute it and/or modify it
3017# under the terms of the GNU General Public License version 2 only, as
3018# published by the Free Software Foundation.  Oracle designates this
3019# particular file as subject to the "Classpath" exception as provided
3020# by Oracle in the LICENSE file that accompanied this code.
3021#
3022# This code is distributed in the hope that it will be useful, but WITHOUT
3023# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3024# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3025# version 2 for more details (a copy is included in the LICENSE file that
3026# accompanied this code).
3027#
3028# You should have received a copy of the GNU General Public License version
3029# 2 along with this work; if not, write to the Free Software Foundation,
3030# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3031#
3032# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3033# or visit www.oracle.com if you need additional information or have any
3034# questions.
3035#
3036
3037#
3038# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3039#
3040# This program is free software; you can redistribute it and/or modify
3041# it under the terms of the GNU General Public License as published by
3042# the Free Software Foundation; either version 2 of the License, or
3043# (at your option) any later version.
3044#
3045# This program is distributed in the hope that it will be useful, but
3046# WITHOUT ANY WARRANTY; without even the implied warranty of
3047# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3048# General Public License for more details.
3049#
3050# You should have received a copy of the GNU General Public License
3051# along with this program; if not, write to the Free Software
3052# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3053#
3054# As a special exception to the GNU General Public License, if you
3055# distribute this file as part of a program that contains a
3056# configuration script generated by Autoconf, you may include it under
3057# the same distribution terms that you use for the rest of that program.
3058
3059# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3060# ----------------------------------
3061# PKG_PROG_PKG_CONFIG
3062
3063# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3064#
3065# Check to see whether a particular set of modules exists.  Similar
3066# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3067#
3068#
3069# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3070# this or PKG_CHECK_MODULES is called, or make sure to call
3071# PKG_CHECK_EXISTS manually
3072# --------------------------------------------------------------
3073
3074
3075
3076# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3077# ---------------------------------------------
3078# _PKG_CONFIG
3079
3080# _PKG_SHORT_ERRORS_SUPPORTED
3081# -----------------------------
3082# _PKG_SHORT_ERRORS_SUPPORTED
3083
3084
3085# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3086# [ACTION-IF-NOT-FOUND])
3087#
3088#
3089# Note that if there is a possibility the first call to
3090# PKG_CHECK_MODULES might not happen, you should be sure to include an
3091# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3092#
3093#
3094# --------------------------------------------------------------
3095# PKG_CHECK_MODULES
3096
3097
3098# Include these first...
3099#
3100# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3101# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3102#
3103# This code is free software; you can redistribute it and/or modify it
3104# under the terms of the GNU General Public License version 2 only, as
3105# published by the Free Software Foundation.  Oracle designates this
3106# particular file as subject to the "Classpath" exception as provided
3107# by Oracle in the LICENSE file that accompanied this code.
3108#
3109# This code is distributed in the hope that it will be useful, but WITHOUT
3110# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3111# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3112# version 2 for more details (a copy is included in the LICENSE file that
3113# accompanied this code).
3114#
3115# You should have received a copy of the GNU General Public License version
3116# 2 along with this work; if not, write to the Free Software Foundation,
3117# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3118#
3119# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3120# or visit www.oracle.com if you need additional information or have any
3121# questions.
3122#
3123
3124# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3125# If so, then append $1 to $2 \
3126# Also set JVM_ARG_OK to true/false depending on outcome.
3127
3128
3129# Appends a string to a path variable, only adding the : when needed.
3130
3131
3132# This will make sure the given variable points to a full and proper
3133# 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# $1: The name of the variable to fix
3140
3141
3142# This will make sure the given variable points to a executable
3143# with a full and proper path. This means:
3144# 1) There will be no spaces in the path. On posix platforms,
3145#    spaces in the path will result in an error. On Windows,
3146#    the path will be rewritten using short-style to be space-free.
3147# 2) The path will be absolute, and it will be in unix-style (on
3148#     cygwin).
3149# Any arguments given to the executable is preserved.
3150# If the input variable does not have a directory specification, then
3151# it need to be in the PATH.
3152# $1: The name of the variable to fix
3153
3154
3155
3156
3157# Register a --with argument but mark it as deprecated
3158# $1: The name of the with argument to deprecate, not including --with-
3159
3160
3161# Register a --enable argument but mark it as deprecated
3162# $1: The name of the with argument to deprecate, not including --enable-
3163# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3164
3165
3166
3167
3168# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3169# $1: variable to check
3170# $2: executable name to print in warning (optional)
3171
3172
3173# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3174# Arguments as AC_PATH_PROG:
3175# $1: variable to set
3176# $2: executable name to look for
3177
3178
3179# Setup the most fundamental tools that relies on not much else to set up,
3180# but is used by much of the early bootstrap code.
3181
3182
3183# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3184
3185
3186
3187
3188
3189
3190
3191#%%% Simple tools %%%
3192
3193# Check if we have found a usable version of make
3194# $1: the path to a potential make binary (or empty)
3195# $2: the description on how we found this
3196
3197
3198# Goes looking for a usable version of GNU make.
3199
3200
3201
3202
3203
3204
3205# Check if build directory is on local disk. If not possible to determine,
3206# we prefer to claim it's local.
3207# Argument 1: directory to test
3208# Argument 2: what to do if it is on local disk
3209# Argument 3: what to do otherwise (remote disk or failure)
3210
3211
3212# Check that source files have basic read permissions set. This might
3213# not be the case in cygwin in certain conditions.
3214
3215
3216
3217
3218#
3219# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3220# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3221#
3222# This code is free software; you can redistribute it and/or modify it
3223# under the terms of the GNU General Public License version 2 only, as
3224# published by the Free Software Foundation.  Oracle designates this
3225# particular file as subject to the "Classpath" exception as provided
3226# by Oracle in the LICENSE file that accompanied this code.
3227#
3228# This code is distributed in the hope that it will be useful, but WITHOUT
3229# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3230# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3231# version 2 for more details (a copy is included in the LICENSE file that
3232# accompanied this code).
3233#
3234# You should have received a copy of the GNU General Public License version
3235# 2 along with this work; if not, write to the Free Software Foundation,
3236# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3237#
3238# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3239# or visit www.oracle.com if you need additional information or have any
3240# questions.
3241#
3242
3243
3244
3245
3246
3247# Helper function which possibly converts a path using DOS-style short mode.
3248# If so, the updated path is stored in $new_path.
3249# $1: The path to check
3250
3251
3252# Helper function which possibly converts a path using DOS-style short mode.
3253# If so, the updated path is stored in $new_path.
3254# $1: The path to check
3255
3256
3257# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3258# and could probably be heavily simplified. However, all changes in this
3259# area tend to need lot of testing in different scenarios, and in lack of
3260# proper unit testing, cleaning this up has not been deemed worth the effort
3261# at the moment.
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3272
3273
3274
3275
3276#
3277# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3278# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3279#
3280# This code is free software; you can redistribute it and/or modify it
3281# under the terms of the GNU General Public License version 2 only, as
3282# published by the Free Software Foundation.  Oracle designates this
3283# particular file as subject to the "Classpath" exception as provided
3284# by Oracle in the LICENSE file that accompanied this code.
3285#
3286# This code is distributed in the hope that it will be useful, but WITHOUT
3287# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3288# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3289# version 2 for more details (a copy is included in the LICENSE file that
3290# accompanied this code).
3291#
3292# You should have received a copy of the GNU General Public License version
3293# 2 along with this work; if not, write to the Free Software Foundation,
3294# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3295#
3296# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3297# or visit www.oracle.com if you need additional information or have any
3298# questions.
3299#
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311# ... then the rest
3312#
3313# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3314# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3315#
3316# This code is free software; you can redistribute it and/or modify it
3317# under the terms of the GNU General Public License version 2 only, as
3318# published by the Free Software Foundation.  Oracle designates this
3319# particular file as subject to the "Classpath" exception as provided
3320# by Oracle in the LICENSE file that accompanied this code.
3321#
3322# This code is distributed in the hope that it will be useful, but WITHOUT
3323# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3324# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3325# version 2 for more details (a copy is included in the LICENSE file that
3326# accompanied this code).
3327#
3328# You should have received a copy of the GNU General Public License version
3329# 2 along with this work; if not, write to the Free Software Foundation,
3330# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3331#
3332# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3333# or visit www.oracle.com if you need additional information or have any
3334# questions.
3335#
3336
3337# Execute the check given as argument, and verify the result
3338# If the Boot JDK was previously found, do nothing
3339# $1 A command line (typically autoconf macro) to execute
3340
3341
3342# Test: Is bootjdk explicitely set by command line arguments?
3343
3344
3345# Test: Is bootjdk available from builddeps?
3346
3347
3348# Test: Is $JAVA_HOME set?
3349
3350
3351# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3352
3353
3354# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3355
3356
3357# Look for a jdk in the given path. If there are multiple, try to select the newest.
3358# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3359# $1 = Path to directory containing jdk installations.
3360# $2 = String to append to the found JDK directory to get the proper JDK home
3361
3362
3363# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3364# environmental variable as base for where to look.
3365# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3366
3367
3368# Test: Is there a JDK installed in default, well-known locations?
3369
3370
3371# Check that a command-line tool in the Boot JDK is correct
3372# $1 = name of variable to assign
3373# $2 = name of binary
3374
3375
3376###############################################################################
3377#
3378# We need a Boot JDK to bootstrap the build.
3379#
3380
3381
3382
3383
3384
3385#
3386# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3387# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3388#
3389# This code is free software; you can redistribute it and/or modify it
3390# under the terms of the GNU General Public License version 2 only, as
3391# published by the Free Software Foundation.  Oracle designates this
3392# particular file as subject to the "Classpath" exception as provided
3393# by Oracle in the LICENSE file that accompanied this code.
3394#
3395# This code is distributed in the hope that it will be useful, but WITHOUT
3396# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3397# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3398# version 2 for more details (a copy is included in the LICENSE file that
3399# accompanied this code).
3400#
3401# You should have received a copy of the GNU General Public License version
3402# 2 along with this work; if not, write to the Free Software Foundation,
3403# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3404#
3405# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3406# or visit www.oracle.com if you need additional information or have any
3407# questions.
3408#
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429#
3430# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3431# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3432#
3433# This code is free software; you can redistribute it and/or modify it
3434# under the terms of the GNU General Public License version 2 only, as
3435# published by the Free Software Foundation.  Oracle designates this
3436# particular file as subject to the "Classpath" exception as provided
3437# by Oracle in the LICENSE file that accompanied this code.
3438#
3439# This code is distributed in the hope that it will be useful, but WITHOUT
3440# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3441# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3442# version 2 for more details (a copy is included in the LICENSE file that
3443# accompanied this code).
3444#
3445# You should have received a copy of the GNU General Public License version
3446# 2 along with this work; if not, write to the Free Software Foundation,
3447# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3448#
3449# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3450# or visit www.oracle.com if you need additional information or have any
3451# questions.
3452#
3453
3454
3455
3456
3457
3458cygwin_help() {
3459  case $1 in
3460    unzip)
3461      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3462      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3463      ;;
3464    zip)
3465      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3466      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3467      ;;
3468    make)
3469      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3470      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3471      ;;
3472    freetype)
3473      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3474        HELP_MSG="To install freetype, run:
3475wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3476chmod +x /tmp/freetype-setup.exe
3477/tmp/freetype-setup.exe
3478Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3479After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3480      else
3481        HELP_MSG="You need to build a 64-bit version of freetype.
3482This is not readily available.
3483You can find source code and build instructions on
3484http://www.freetype.org/
3485If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3486      fi
3487      ;;
3488    * )
3489      break ;;
3490  esac
3491}
3492
3493msys_help() {
3494  PKGHANDLER_COMMAND=""
3495}
3496
3497apt_help() {
3498  case $1 in
3499    devkit)
3500      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3501    openjdk)
3502      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3503    alsa)
3504      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3505    cups)
3506      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3507    freetype)
3508      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3509    pulse)
3510      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3511    x11)
3512      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3513    ccache)
3514      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3515    * )
3516      break ;;
3517  esac
3518}
3519
3520yum_help() {
3521  case $1 in
3522    devkit)
3523      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3524    openjdk)
3525      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3526    alsa)
3527      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3528    cups)
3529      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3530    freetype)
3531      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3532    pulse)
3533      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3534    x11)
3535      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3536    ccache)
3537      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3538    * )
3539      break ;;
3540  esac
3541}
3542
3543port_help() {
3544  PKGHANDLER_COMMAND=""
3545}
3546
3547pkgutil_help() {
3548  PKGHANDLER_COMMAND=""
3549}
3550
3551pkgadd_help() {
3552  PKGHANDLER_COMMAND=""
3553}
3554
3555
3556
3557#
3558# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3559# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3560#
3561# This code is free software; you can redistribute it and/or modify it
3562# under the terms of the GNU General Public License version 2 only, as
3563# published by the Free Software Foundation.  Oracle designates this
3564# particular file as subject to the "Classpath" exception as provided
3565# by Oracle in the LICENSE file that accompanied this code.
3566#
3567# This code is distributed in the hope that it will be useful, but WITHOUT
3568# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3569# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3570# version 2 for more details (a copy is included in the LICENSE file that
3571# accompanied this code).
3572#
3573# You should have received a copy of the GNU General Public License version
3574# 2 along with this work; if not, write to the Free Software Foundation,
3575# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3576#
3577# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3578# or visit www.oracle.com if you need additional information or have any
3579# questions.
3580#
3581
3582
3583
3584
3585
3586
3587
3588
3589###############################################################################
3590#
3591# Should we build only OpenJDK even if closed sources are present?
3592#
3593
3594
3595
3596
3597###############################################################################
3598#
3599# Setup version numbers
3600#
3601
3602
3603
3604
3605
3606
3607# Support for customization of the build process. Some build files
3608# will include counterparts from this location, if they exist. This allows
3609# for a degree of customization of the build targets and the rules/recipes
3610# to create them
3611
3612# Check whether --with-custom-make-dir was given.
3613if test "${with_custom_make_dir+set}" = set; then :
3614  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3615fi
3616
3617
3618
3619#
3620# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3622#
3623# This code is free software; you can redistribute it and/or modify it
3624# under the terms of the GNU General Public License version 2 only, as
3625# published by the Free Software Foundation.  Oracle designates this
3626# particular file as subject to the "Classpath" exception as provided
3627# by Oracle in the LICENSE file that accompanied this code.
3628#
3629# This code is distributed in the hope that it will be useful, but WITHOUT
3630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3632# version 2 for more details (a copy is included in the LICENSE file that
3633# accompanied this code).
3634#
3635# You should have received a copy of the GNU General Public License version
3636# 2 along with this work; if not, write to the Free Software Foundation,
3637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3638#
3639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3640# or visit www.oracle.com if you need additional information or have any
3641# questions.
3642#
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660#
3661# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3662# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3663#
3664# This code is free software; you can redistribute it and/or modify it
3665# under the terms of the GNU General Public License version 2 only, as
3666# published by the Free Software Foundation.  Oracle designates this
3667# particular file as subject to the "Classpath" exception as provided
3668# by Oracle in the LICENSE file that accompanied this code.
3669#
3670# This code is distributed in the hope that it will be useful, but WITHOUT
3671# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3672# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3673# version 2 for more details (a copy is included in the LICENSE file that
3674# accompanied this code).
3675#
3676# You should have received a copy of the GNU General Public License version
3677# 2 along with this work; if not, write to the Free Software Foundation,
3678# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3679#
3680# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3681# or visit www.oracle.com if you need additional information or have any
3682# questions.
3683#
3684
3685# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3686# Converts autoconf style CPU name to OpenJDK style, into
3687# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3688
3689
3690# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3691# Converts autoconf style OS name to OpenJDK style, into
3692# VAR_OS and VAR_OS_API.
3693
3694
3695# Expects $host_os $host_cpu $build_os and $build_cpu
3696# and $with_target_bits to have been setup!
3697#
3698# Translate the standard triplet(quadruplet) definition
3699# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3700# OPENJDK_BUILD_OS, etc.
3701
3702
3703# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3704# accordingly. Must be done after setting up build and target system, but before
3705# doing anything else with these values.
3706
3707
3708# Setup the legacy variables, for controlling the old makefiles.
3709#
3710
3711
3712
3713
3714#%%% Build and target systems %%%
3715
3716
3717
3718
3719# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3720# Add -mX to various FLAGS variables.
3721
3722
3723
3724
3725
3726
3727#
3728# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3729# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3730#
3731# This code is free software; you can redistribute it and/or modify it
3732# under the terms of the GNU General Public License version 2 only, as
3733# published by the Free Software Foundation.  Oracle designates this
3734# particular file as subject to the "Classpath" exception as provided
3735# by Oracle in the LICENSE file that accompanied this code.
3736#
3737# This code is distributed in the hope that it will be useful, but WITHOUT
3738# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3739# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3740# version 2 for more details (a copy is included in the LICENSE file that
3741# accompanied this code).
3742#
3743# You should have received a copy of the GNU General Public License version
3744# 2 along with this work; if not, write to the Free Software Foundation,
3745# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3746#
3747# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3748# or visit www.oracle.com if you need additional information or have any
3749# questions.
3750#
3751
3752
3753
3754
3755
3756
3757
3758
3759#
3760# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3761# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3762#
3763# This code is free software; you can redistribute it and/or modify it
3764# under the terms of the GNU General Public License version 2 only, as
3765# published by the Free Software Foundation.  Oracle designates this
3766# particular file as subject to the "Classpath" exception as provided
3767# by Oracle in the LICENSE file that accompanied this code.
3768#
3769# This code is distributed in the hope that it will be useful, but WITHOUT
3770# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3771# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3772# version 2 for more details (a copy is included in the LICENSE file that
3773# accompanied this code).
3774#
3775# You should have received a copy of the GNU General Public License version
3776# 2 along with this work; if not, write to the Free Software Foundation,
3777# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3778#
3779# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3780# or visit www.oracle.com if you need additional information or have any
3781# questions.
3782#
3783
3784# $1 = compiler to test (CC or CXX)
3785# $2 = human readable name of compiler (C or C++)
3786
3787
3788
3789
3790
3791# $1 = compiler to test (CC or CXX)
3792# $2 = human readable name of compiler (C or C++)
3793# $3 = list of compiler names to search for
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3808#                                   [RUN-IF-FALSE])
3809# ------------------------------------------------------------
3810# Check that the c and c++ compilers support an argument
3811
3812
3813
3814
3815# Setup the JTREG paths
3816
3817
3818#
3819# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3820# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3821#
3822# This code is free software; you can redistribute it and/or modify it
3823# under the terms of the GNU General Public License version 2 only, as
3824# published by the Free Software Foundation.  Oracle designates this
3825# particular file as subject to the "Classpath" exception as provided
3826# by Oracle in the LICENSE file that accompanied this code.
3827#
3828# This code is distributed in the hope that it will be useful, but WITHOUT
3829# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3830# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3831# version 2 for more details (a copy is included in the LICENSE file that
3832# accompanied this code).
3833#
3834# You should have received a copy of the GNU General Public License version
3835# 2 along with this work; if not, write to the Free Software Foundation,
3836# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3837#
3838# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3839# or visit www.oracle.com if you need additional information or have any
3840# questions.
3841#
3842
3843
3844
3845
3846
3847
3848
3849# Check if the VS env variables were setup prior to running configure.
3850# If not, then find vcvarsall.bat and run it automatically, and integrate
3851# the set env variables into the spec file.
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862# This line needs to be here, verbatim, after all includes and the dummy hook
3863# definitions. It is replaced with custom functionality when building
3864# custom sources.
3865#CUSTOM_AUTOCONF_INCLUDE
3866
3867# Do not change or remove the following line, it is needed for consistency checks:
3868DATE_WHEN_GENERATED=1382702260
3869
3870###############################################################################
3871#
3872# Initialization / Boot-strapping
3873#
3874# The bootstrapping process needs to solve the "chicken or the egg" problem,
3875# thus it jumps back and forth, each time gaining something needed later on.
3876#
3877###############################################################################
3878
3879# Basic initialization that must happen first of all
3880
3881  # Save the original command line. This is passed to us by the wrapper configure script.
3882
3883  DATE_WHEN_CONFIGURED=`LANG=C date`
3884
3885  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3886$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3887  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3888$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3889
3890
3891
3892  # Start with tools that do not need have cross compilation support
3893  # and can be expected to be found in the default PATH. These tools are
3894  # used by configure. Nor are these tools expected to be found in the
3895  # devkit from the builddeps server either, since they are
3896  # needed to download the devkit.
3897
3898  # First are all the simple required tools.
3899
3900  for ac_prog in basename
3901do
3902  # Extract the first word of "$ac_prog", so it can be a program name with args.
3903set dummy $ac_prog; ac_word=$2
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3905$as_echo_n "checking for $ac_word... " >&6; }
3906if ${ac_cv_path_BASENAME+:} false; then :
3907  $as_echo_n "(cached) " >&6
3908else
3909  case $BASENAME in
3910  [\\/]* | ?:[\\/]*)
3911  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3912  ;;
3913  *)
3914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3915for as_dir in $PATH
3916do
3917  IFS=$as_save_IFS
3918  test -z "$as_dir" && as_dir=.
3919    for ac_exec_ext in '' $ac_executable_extensions; do
3920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3921    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3923    break 2
3924  fi
3925done
3926  done
3927IFS=$as_save_IFS
3928
3929  ;;
3930esac
3931fi
3932BASENAME=$ac_cv_path_BASENAME
3933if test -n "$BASENAME"; then
3934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3935$as_echo "$BASENAME" >&6; }
3936else
3937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938$as_echo "no" >&6; }
3939fi
3940
3941
3942  test -n "$BASENAME" && break
3943done
3944
3945
3946  if test "x$BASENAME" = x; then
3947    if test "xbasename" = x; then
3948      PROG_NAME=basename
3949    else
3950      PROG_NAME=basename
3951    fi
3952    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3953$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3954    as_fn_error $? "Cannot continue" "$LINENO" 5
3955  fi
3956
3957
3958
3959  for ac_prog in bash
3960do
3961  # Extract the first word of "$ac_prog", so it can be a program name with args.
3962set dummy $ac_prog; ac_word=$2
3963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3964$as_echo_n "checking for $ac_word... " >&6; }
3965if ${ac_cv_path_BASH+:} false; then :
3966  $as_echo_n "(cached) " >&6
3967else
3968  case $BASH in
3969  [\\/]* | ?:[\\/]*)
3970  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3971  ;;
3972  *)
3973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3974for as_dir in $PATH
3975do
3976  IFS=$as_save_IFS
3977  test -z "$as_dir" && as_dir=.
3978    for ac_exec_ext in '' $ac_executable_extensions; do
3979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3980    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3982    break 2
3983  fi
3984done
3985  done
3986IFS=$as_save_IFS
3987
3988  ;;
3989esac
3990fi
3991BASH=$ac_cv_path_BASH
3992if test -n "$BASH"; then
3993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3994$as_echo "$BASH" >&6; }
3995else
3996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3997$as_echo "no" >&6; }
3998fi
3999
4000
4001  test -n "$BASH" && break
4002done
4003
4004
4005  if test "x$BASH" = x; then
4006    if test "xbash" = x; then
4007      PROG_NAME=bash
4008    else
4009      PROG_NAME=bash
4010    fi
4011    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4012$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4013    as_fn_error $? "Cannot continue" "$LINENO" 5
4014  fi
4015
4016
4017
4018  for ac_prog in cat
4019do
4020  # Extract the first word of "$ac_prog", so it can be a program name with args.
4021set dummy $ac_prog; ac_word=$2
4022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4023$as_echo_n "checking for $ac_word... " >&6; }
4024if ${ac_cv_path_CAT+:} false; then :
4025  $as_echo_n "(cached) " >&6
4026else
4027  case $CAT in
4028  [\\/]* | ?:[\\/]*)
4029  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4030  ;;
4031  *)
4032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4033for as_dir in $PATH
4034do
4035  IFS=$as_save_IFS
4036  test -z "$as_dir" && as_dir=.
4037    for ac_exec_ext in '' $ac_executable_extensions; do
4038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4039    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4041    break 2
4042  fi
4043done
4044  done
4045IFS=$as_save_IFS
4046
4047  ;;
4048esac
4049fi
4050CAT=$ac_cv_path_CAT
4051if test -n "$CAT"; then
4052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4053$as_echo "$CAT" >&6; }
4054else
4055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4056$as_echo "no" >&6; }
4057fi
4058
4059
4060  test -n "$CAT" && break
4061done
4062
4063
4064  if test "x$CAT" = x; then
4065    if test "xcat" = x; then
4066      PROG_NAME=cat
4067    else
4068      PROG_NAME=cat
4069    fi
4070    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4071$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4072    as_fn_error $? "Cannot continue" "$LINENO" 5
4073  fi
4074
4075
4076
4077  for ac_prog in chmod
4078do
4079  # Extract the first word of "$ac_prog", so it can be a program name with args.
4080set dummy $ac_prog; ac_word=$2
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4082$as_echo_n "checking for $ac_word... " >&6; }
4083if ${ac_cv_path_CHMOD+:} false; then :
4084  $as_echo_n "(cached) " >&6
4085else
4086  case $CHMOD in
4087  [\\/]* | ?:[\\/]*)
4088  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4089  ;;
4090  *)
4091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4092for as_dir in $PATH
4093do
4094  IFS=$as_save_IFS
4095  test -z "$as_dir" && as_dir=.
4096    for ac_exec_ext in '' $ac_executable_extensions; do
4097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4098    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4100    break 2
4101  fi
4102done
4103  done
4104IFS=$as_save_IFS
4105
4106  ;;
4107esac
4108fi
4109CHMOD=$ac_cv_path_CHMOD
4110if test -n "$CHMOD"; then
4111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4112$as_echo "$CHMOD" >&6; }
4113else
4114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4115$as_echo "no" >&6; }
4116fi
4117
4118
4119  test -n "$CHMOD" && break
4120done
4121
4122
4123  if test "x$CHMOD" = x; then
4124    if test "xchmod" = x; then
4125      PROG_NAME=chmod
4126    else
4127      PROG_NAME=chmod
4128    fi
4129    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4130$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4131    as_fn_error $? "Cannot continue" "$LINENO" 5
4132  fi
4133
4134
4135
4136  for ac_prog in cmp
4137do
4138  # Extract the first word of "$ac_prog", so it can be a program name with args.
4139set dummy $ac_prog; ac_word=$2
4140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4141$as_echo_n "checking for $ac_word... " >&6; }
4142if ${ac_cv_path_CMP+:} false; then :
4143  $as_echo_n "(cached) " >&6
4144else
4145  case $CMP in
4146  [\\/]* | ?:[\\/]*)
4147  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4148  ;;
4149  *)
4150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4151for as_dir in $PATH
4152do
4153  IFS=$as_save_IFS
4154  test -z "$as_dir" && as_dir=.
4155    for ac_exec_ext in '' $ac_executable_extensions; do
4156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4157    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4159    break 2
4160  fi
4161done
4162  done
4163IFS=$as_save_IFS
4164
4165  ;;
4166esac
4167fi
4168CMP=$ac_cv_path_CMP
4169if test -n "$CMP"; then
4170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4171$as_echo "$CMP" >&6; }
4172else
4173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4174$as_echo "no" >&6; }
4175fi
4176
4177
4178  test -n "$CMP" && break
4179done
4180
4181
4182  if test "x$CMP" = x; then
4183    if test "xcmp" = x; then
4184      PROG_NAME=cmp
4185    else
4186      PROG_NAME=cmp
4187    fi
4188    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4189$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4190    as_fn_error $? "Cannot continue" "$LINENO" 5
4191  fi
4192
4193
4194
4195  for ac_prog in comm
4196do
4197  # Extract the first word of "$ac_prog", so it can be a program name with args.
4198set dummy $ac_prog; ac_word=$2
4199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4200$as_echo_n "checking for $ac_word... " >&6; }
4201if ${ac_cv_path_COMM+:} false; then :
4202  $as_echo_n "(cached) " >&6
4203else
4204  case $COMM in
4205  [\\/]* | ?:[\\/]*)
4206  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4207  ;;
4208  *)
4209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4210for as_dir in $PATH
4211do
4212  IFS=$as_save_IFS
4213  test -z "$as_dir" && as_dir=.
4214    for ac_exec_ext in '' $ac_executable_extensions; do
4215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4216    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4218    break 2
4219  fi
4220done
4221  done
4222IFS=$as_save_IFS
4223
4224  ;;
4225esac
4226fi
4227COMM=$ac_cv_path_COMM
4228if test -n "$COMM"; then
4229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4230$as_echo "$COMM" >&6; }
4231else
4232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4233$as_echo "no" >&6; }
4234fi
4235
4236
4237  test -n "$COMM" && break
4238done
4239
4240
4241  if test "x$COMM" = x; then
4242    if test "xcomm" = x; then
4243      PROG_NAME=comm
4244    else
4245      PROG_NAME=comm
4246    fi
4247    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4248$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4249    as_fn_error $? "Cannot continue" "$LINENO" 5
4250  fi
4251
4252
4253
4254  for ac_prog in cp
4255do
4256  # Extract the first word of "$ac_prog", so it can be a program name with args.
4257set dummy $ac_prog; ac_word=$2
4258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4259$as_echo_n "checking for $ac_word... " >&6; }
4260if ${ac_cv_path_CP+:} false; then :
4261  $as_echo_n "(cached) " >&6
4262else
4263  case $CP in
4264  [\\/]* | ?:[\\/]*)
4265  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4266  ;;
4267  *)
4268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269for as_dir in $PATH
4270do
4271  IFS=$as_save_IFS
4272  test -z "$as_dir" && as_dir=.
4273    for ac_exec_ext in '' $ac_executable_extensions; do
4274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4275    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4277    break 2
4278  fi
4279done
4280  done
4281IFS=$as_save_IFS
4282
4283  ;;
4284esac
4285fi
4286CP=$ac_cv_path_CP
4287if test -n "$CP"; then
4288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4289$as_echo "$CP" >&6; }
4290else
4291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4292$as_echo "no" >&6; }
4293fi
4294
4295
4296  test -n "$CP" && break
4297done
4298
4299
4300  if test "x$CP" = x; then
4301    if test "xcp" = x; then
4302      PROG_NAME=cp
4303    else
4304      PROG_NAME=cp
4305    fi
4306    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4307$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4308    as_fn_error $? "Cannot continue" "$LINENO" 5
4309  fi
4310
4311
4312
4313  for ac_prog in cpio
4314do
4315  # Extract the first word of "$ac_prog", so it can be a program name with args.
4316set dummy $ac_prog; ac_word=$2
4317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4318$as_echo_n "checking for $ac_word... " >&6; }
4319if ${ac_cv_path_CPIO+:} false; then :
4320  $as_echo_n "(cached) " >&6
4321else
4322  case $CPIO in
4323  [\\/]* | ?:[\\/]*)
4324  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4325  ;;
4326  *)
4327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4328for as_dir in $PATH
4329do
4330  IFS=$as_save_IFS
4331  test -z "$as_dir" && as_dir=.
4332    for ac_exec_ext in '' $ac_executable_extensions; do
4333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4334    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4336    break 2
4337  fi
4338done
4339  done
4340IFS=$as_save_IFS
4341
4342  ;;
4343esac
4344fi
4345CPIO=$ac_cv_path_CPIO
4346if test -n "$CPIO"; then
4347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4348$as_echo "$CPIO" >&6; }
4349else
4350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4351$as_echo "no" >&6; }
4352fi
4353
4354
4355  test -n "$CPIO" && break
4356done
4357
4358
4359  if test "x$CPIO" = x; then
4360    if test "xcpio" = x; then
4361      PROG_NAME=cpio
4362    else
4363      PROG_NAME=cpio
4364    fi
4365    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4366$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4367    as_fn_error $? "Cannot continue" "$LINENO" 5
4368  fi
4369
4370
4371
4372  for ac_prog in cut
4373do
4374  # Extract the first word of "$ac_prog", so it can be a program name with args.
4375set dummy $ac_prog; ac_word=$2
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4377$as_echo_n "checking for $ac_word... " >&6; }
4378if ${ac_cv_path_CUT+:} false; then :
4379  $as_echo_n "(cached) " >&6
4380else
4381  case $CUT in
4382  [\\/]* | ?:[\\/]*)
4383  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4384  ;;
4385  *)
4386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387for as_dir in $PATH
4388do
4389  IFS=$as_save_IFS
4390  test -z "$as_dir" && as_dir=.
4391    for ac_exec_ext in '' $ac_executable_extensions; do
4392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4393    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4395    break 2
4396  fi
4397done
4398  done
4399IFS=$as_save_IFS
4400
4401  ;;
4402esac
4403fi
4404CUT=$ac_cv_path_CUT
4405if test -n "$CUT"; then
4406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4407$as_echo "$CUT" >&6; }
4408else
4409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4410$as_echo "no" >&6; }
4411fi
4412
4413
4414  test -n "$CUT" && break
4415done
4416
4417
4418  if test "x$CUT" = x; then
4419    if test "xcut" = x; then
4420      PROG_NAME=cut
4421    else
4422      PROG_NAME=cut
4423    fi
4424    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4425$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4426    as_fn_error $? "Cannot continue" "$LINENO" 5
4427  fi
4428
4429
4430
4431  for ac_prog in date
4432do
4433  # Extract the first word of "$ac_prog", so it can be a program name with args.
4434set dummy $ac_prog; ac_word=$2
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4436$as_echo_n "checking for $ac_word... " >&6; }
4437if ${ac_cv_path_DATE+:} false; then :
4438  $as_echo_n "(cached) " >&6
4439else
4440  case $DATE in
4441  [\\/]* | ?:[\\/]*)
4442  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4443  ;;
4444  *)
4445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in $PATH
4447do
4448  IFS=$as_save_IFS
4449  test -z "$as_dir" && as_dir=.
4450    for ac_exec_ext in '' $ac_executable_extensions; do
4451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4452    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4454    break 2
4455  fi
4456done
4457  done
4458IFS=$as_save_IFS
4459
4460  ;;
4461esac
4462fi
4463DATE=$ac_cv_path_DATE
4464if test -n "$DATE"; then
4465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4466$as_echo "$DATE" >&6; }
4467else
4468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469$as_echo "no" >&6; }
4470fi
4471
4472
4473  test -n "$DATE" && break
4474done
4475
4476
4477  if test "x$DATE" = x; then
4478    if test "xdate" = x; then
4479      PROG_NAME=date
4480    else
4481      PROG_NAME=date
4482    fi
4483    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4484$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4485    as_fn_error $? "Cannot continue" "$LINENO" 5
4486  fi
4487
4488
4489
4490  for ac_prog in gdiff diff
4491do
4492  # Extract the first word of "$ac_prog", so it can be a program name with args.
4493set dummy $ac_prog; ac_word=$2
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4495$as_echo_n "checking for $ac_word... " >&6; }
4496if ${ac_cv_path_DIFF+:} false; then :
4497  $as_echo_n "(cached) " >&6
4498else
4499  case $DIFF in
4500  [\\/]* | ?:[\\/]*)
4501  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4502  ;;
4503  *)
4504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4505for as_dir in $PATH
4506do
4507  IFS=$as_save_IFS
4508  test -z "$as_dir" && as_dir=.
4509    for ac_exec_ext in '' $ac_executable_extensions; do
4510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4511    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4513    break 2
4514  fi
4515done
4516  done
4517IFS=$as_save_IFS
4518
4519  ;;
4520esac
4521fi
4522DIFF=$ac_cv_path_DIFF
4523if test -n "$DIFF"; then
4524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4525$as_echo "$DIFF" >&6; }
4526else
4527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4528$as_echo "no" >&6; }
4529fi
4530
4531
4532  test -n "$DIFF" && break
4533done
4534
4535
4536  if test "x$DIFF" = x; then
4537    if test "xgdiff diff" = x; then
4538      PROG_NAME=diff
4539    else
4540      PROG_NAME=gdiff diff
4541    fi
4542    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4543$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4544    as_fn_error $? "Cannot continue" "$LINENO" 5
4545  fi
4546
4547
4548
4549  for ac_prog in dirname
4550do
4551  # Extract the first word of "$ac_prog", so it can be a program name with args.
4552set dummy $ac_prog; ac_word=$2
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4554$as_echo_n "checking for $ac_word... " >&6; }
4555if ${ac_cv_path_DIRNAME+:} false; then :
4556  $as_echo_n "(cached) " >&6
4557else
4558  case $DIRNAME in
4559  [\\/]* | ?:[\\/]*)
4560  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4561  ;;
4562  *)
4563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4564for as_dir in $PATH
4565do
4566  IFS=$as_save_IFS
4567  test -z "$as_dir" && as_dir=.
4568    for ac_exec_ext in '' $ac_executable_extensions; do
4569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4570    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4572    break 2
4573  fi
4574done
4575  done
4576IFS=$as_save_IFS
4577
4578  ;;
4579esac
4580fi
4581DIRNAME=$ac_cv_path_DIRNAME
4582if test -n "$DIRNAME"; then
4583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4584$as_echo "$DIRNAME" >&6; }
4585else
4586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4587$as_echo "no" >&6; }
4588fi
4589
4590
4591  test -n "$DIRNAME" && break
4592done
4593
4594
4595  if test "x$DIRNAME" = x; then
4596    if test "xdirname" = x; then
4597      PROG_NAME=dirname
4598    else
4599      PROG_NAME=dirname
4600    fi
4601    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4602$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4603    as_fn_error $? "Cannot continue" "$LINENO" 5
4604  fi
4605
4606
4607
4608  for ac_prog in echo
4609do
4610  # Extract the first word of "$ac_prog", so it can be a program name with args.
4611set dummy $ac_prog; ac_word=$2
4612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4613$as_echo_n "checking for $ac_word... " >&6; }
4614if ${ac_cv_path_ECHO+:} false; then :
4615  $as_echo_n "(cached) " >&6
4616else
4617  case $ECHO in
4618  [\\/]* | ?:[\\/]*)
4619  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4620  ;;
4621  *)
4622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4623for as_dir in $PATH
4624do
4625  IFS=$as_save_IFS
4626  test -z "$as_dir" && as_dir=.
4627    for ac_exec_ext in '' $ac_executable_extensions; do
4628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4629    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4631    break 2
4632  fi
4633done
4634  done
4635IFS=$as_save_IFS
4636
4637  ;;
4638esac
4639fi
4640ECHO=$ac_cv_path_ECHO
4641if test -n "$ECHO"; then
4642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4643$as_echo "$ECHO" >&6; }
4644else
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4646$as_echo "no" >&6; }
4647fi
4648
4649
4650  test -n "$ECHO" && break
4651done
4652
4653
4654  if test "x$ECHO" = x; then
4655    if test "xecho" = x; then
4656      PROG_NAME=echo
4657    else
4658      PROG_NAME=echo
4659    fi
4660    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4661$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4662    as_fn_error $? "Cannot continue" "$LINENO" 5
4663  fi
4664
4665
4666
4667  for ac_prog in expr
4668do
4669  # Extract the first word of "$ac_prog", so it can be a program name with args.
4670set dummy $ac_prog; ac_word=$2
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672$as_echo_n "checking for $ac_word... " >&6; }
4673if ${ac_cv_path_EXPR+:} false; then :
4674  $as_echo_n "(cached) " >&6
4675else
4676  case $EXPR in
4677  [\\/]* | ?:[\\/]*)
4678  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4679  ;;
4680  *)
4681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682for as_dir in $PATH
4683do
4684  IFS=$as_save_IFS
4685  test -z "$as_dir" && as_dir=.
4686    for ac_exec_ext in '' $ac_executable_extensions; do
4687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4688    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690    break 2
4691  fi
4692done
4693  done
4694IFS=$as_save_IFS
4695
4696  ;;
4697esac
4698fi
4699EXPR=$ac_cv_path_EXPR
4700if test -n "$EXPR"; then
4701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4702$as_echo "$EXPR" >&6; }
4703else
4704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705$as_echo "no" >&6; }
4706fi
4707
4708
4709  test -n "$EXPR" && break
4710done
4711
4712
4713  if test "x$EXPR" = x; then
4714    if test "xexpr" = x; then
4715      PROG_NAME=expr
4716    else
4717      PROG_NAME=expr
4718    fi
4719    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4720$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4721    as_fn_error $? "Cannot continue" "$LINENO" 5
4722  fi
4723
4724
4725
4726  for ac_prog in file
4727do
4728  # Extract the first word of "$ac_prog", so it can be a program name with args.
4729set dummy $ac_prog; ac_word=$2
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
4732if ${ac_cv_path_FILE+:} false; then :
4733  $as_echo_n "(cached) " >&6
4734else
4735  case $FILE in
4736  [\\/]* | ?:[\\/]*)
4737  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4738  ;;
4739  *)
4740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743  IFS=$as_save_IFS
4744  test -z "$as_dir" && as_dir=.
4745    for ac_exec_ext in '' $ac_executable_extensions; do
4746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4747    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4749    break 2
4750  fi
4751done
4752  done
4753IFS=$as_save_IFS
4754
4755  ;;
4756esac
4757fi
4758FILE=$ac_cv_path_FILE
4759if test -n "$FILE"; then
4760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4761$as_echo "$FILE" >&6; }
4762else
4763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
4765fi
4766
4767
4768  test -n "$FILE" && break
4769done
4770
4771
4772  if test "x$FILE" = x; then
4773    if test "xfile" = x; then
4774      PROG_NAME=file
4775    else
4776      PROG_NAME=file
4777    fi
4778    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4779$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4780    as_fn_error $? "Cannot continue" "$LINENO" 5
4781  fi
4782
4783
4784
4785  for ac_prog in find
4786do
4787  # Extract the first word of "$ac_prog", so it can be a program name with args.
4788set dummy $ac_prog; ac_word=$2
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790$as_echo_n "checking for $ac_word... " >&6; }
4791if ${ac_cv_path_FIND+:} false; then :
4792  $as_echo_n "(cached) " >&6
4793else
4794  case $FIND in
4795  [\\/]* | ?:[\\/]*)
4796  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4797  ;;
4798  *)
4799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4800for as_dir in $PATH
4801do
4802  IFS=$as_save_IFS
4803  test -z "$as_dir" && as_dir=.
4804    for ac_exec_ext in '' $ac_executable_extensions; do
4805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4806    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4808    break 2
4809  fi
4810done
4811  done
4812IFS=$as_save_IFS
4813
4814  ;;
4815esac
4816fi
4817FIND=$ac_cv_path_FIND
4818if test -n "$FIND"; then
4819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4820$as_echo "$FIND" >&6; }
4821else
4822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4823$as_echo "no" >&6; }
4824fi
4825
4826
4827  test -n "$FIND" && break
4828done
4829
4830
4831  if test "x$FIND" = x; then
4832    if test "xfind" = x; then
4833      PROG_NAME=find
4834    else
4835      PROG_NAME=find
4836    fi
4837    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4838$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4839    as_fn_error $? "Cannot continue" "$LINENO" 5
4840  fi
4841
4842
4843
4844  for ac_prog in head
4845do
4846  # Extract the first word of "$ac_prog", so it can be a program name with args.
4847set dummy $ac_prog; ac_word=$2
4848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4849$as_echo_n "checking for $ac_word... " >&6; }
4850if ${ac_cv_path_HEAD+:} false; then :
4851  $as_echo_n "(cached) " >&6
4852else
4853  case $HEAD in
4854  [\\/]* | ?:[\\/]*)
4855  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4856  ;;
4857  *)
4858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4859for as_dir in $PATH
4860do
4861  IFS=$as_save_IFS
4862  test -z "$as_dir" && as_dir=.
4863    for ac_exec_ext in '' $ac_executable_extensions; do
4864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4865    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4867    break 2
4868  fi
4869done
4870  done
4871IFS=$as_save_IFS
4872
4873  ;;
4874esac
4875fi
4876HEAD=$ac_cv_path_HEAD
4877if test -n "$HEAD"; then
4878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4879$as_echo "$HEAD" >&6; }
4880else
4881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4882$as_echo "no" >&6; }
4883fi
4884
4885
4886  test -n "$HEAD" && break
4887done
4888
4889
4890  if test "x$HEAD" = x; then
4891    if test "xhead" = x; then
4892      PROG_NAME=head
4893    else
4894      PROG_NAME=head
4895    fi
4896    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4897$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4898    as_fn_error $? "Cannot continue" "$LINENO" 5
4899  fi
4900
4901
4902
4903  for ac_prog in ln
4904do
4905  # Extract the first word of "$ac_prog", so it can be a program name with args.
4906set dummy $ac_prog; ac_word=$2
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4908$as_echo_n "checking for $ac_word... " >&6; }
4909if ${ac_cv_path_LN+:} false; then :
4910  $as_echo_n "(cached) " >&6
4911else
4912  case $LN in
4913  [\\/]* | ?:[\\/]*)
4914  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4915  ;;
4916  *)
4917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918for as_dir in $PATH
4919do
4920  IFS=$as_save_IFS
4921  test -z "$as_dir" && as_dir=.
4922    for ac_exec_ext in '' $ac_executable_extensions; do
4923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4924    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926    break 2
4927  fi
4928done
4929  done
4930IFS=$as_save_IFS
4931
4932  ;;
4933esac
4934fi
4935LN=$ac_cv_path_LN
4936if test -n "$LN"; then
4937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4938$as_echo "$LN" >&6; }
4939else
4940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
4942fi
4943
4944
4945  test -n "$LN" && break
4946done
4947
4948
4949  if test "x$LN" = x; then
4950    if test "xln" = x; then
4951      PROG_NAME=ln
4952    else
4953      PROG_NAME=ln
4954    fi
4955    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4956$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4957    as_fn_error $? "Cannot continue" "$LINENO" 5
4958  fi
4959
4960
4961
4962  for ac_prog in ls
4963do
4964  # Extract the first word of "$ac_prog", so it can be a program name with args.
4965set dummy $ac_prog; ac_word=$2
4966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4967$as_echo_n "checking for $ac_word... " >&6; }
4968if ${ac_cv_path_LS+:} false; then :
4969  $as_echo_n "(cached) " >&6
4970else
4971  case $LS in
4972  [\\/]* | ?:[\\/]*)
4973  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4974  ;;
4975  *)
4976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977for as_dir in $PATH
4978do
4979  IFS=$as_save_IFS
4980  test -z "$as_dir" && as_dir=.
4981    for ac_exec_ext in '' $ac_executable_extensions; do
4982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985    break 2
4986  fi
4987done
4988  done
4989IFS=$as_save_IFS
4990
4991  ;;
4992esac
4993fi
4994LS=$ac_cv_path_LS
4995if test -n "$LS"; then
4996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4997$as_echo "$LS" >&6; }
4998else
4999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5000$as_echo "no" >&6; }
5001fi
5002
5003
5004  test -n "$LS" && break
5005done
5006
5007
5008  if test "x$LS" = x; then
5009    if test "xls" = x; then
5010      PROG_NAME=ls
5011    else
5012      PROG_NAME=ls
5013    fi
5014    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5015$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5016    as_fn_error $? "Cannot continue" "$LINENO" 5
5017  fi
5018
5019
5020
5021  for ac_prog in mkdir
5022do
5023  # Extract the first word of "$ac_prog", so it can be a program name with args.
5024set dummy $ac_prog; ac_word=$2
5025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
5027if ${ac_cv_path_MKDIR+:} false; then :
5028  $as_echo_n "(cached) " >&6
5029else
5030  case $MKDIR in
5031  [\\/]* | ?:[\\/]*)
5032  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5033  ;;
5034  *)
5035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5036for as_dir in $PATH
5037do
5038  IFS=$as_save_IFS
5039  test -z "$as_dir" && as_dir=.
5040    for ac_exec_ext in '' $ac_executable_extensions; do
5041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5042    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5044    break 2
5045  fi
5046done
5047  done
5048IFS=$as_save_IFS
5049
5050  ;;
5051esac
5052fi
5053MKDIR=$ac_cv_path_MKDIR
5054if test -n "$MKDIR"; then
5055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5056$as_echo "$MKDIR" >&6; }
5057else
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059$as_echo "no" >&6; }
5060fi
5061
5062
5063  test -n "$MKDIR" && break
5064done
5065
5066
5067  if test "x$MKDIR" = x; then
5068    if test "xmkdir" = x; then
5069      PROG_NAME=mkdir
5070    else
5071      PROG_NAME=mkdir
5072    fi
5073    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5074$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5075    as_fn_error $? "Cannot continue" "$LINENO" 5
5076  fi
5077
5078
5079
5080  for ac_prog in mktemp
5081do
5082  # Extract the first word of "$ac_prog", so it can be a program name with args.
5083set dummy $ac_prog; ac_word=$2
5084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5085$as_echo_n "checking for $ac_word... " >&6; }
5086if ${ac_cv_path_MKTEMP+:} false; then :
5087  $as_echo_n "(cached) " >&6
5088else
5089  case $MKTEMP in
5090  [\\/]* | ?:[\\/]*)
5091  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5092  ;;
5093  *)
5094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in $PATH
5096do
5097  IFS=$as_save_IFS
5098  test -z "$as_dir" && as_dir=.
5099    for ac_exec_ext in '' $ac_executable_extensions; do
5100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5101    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5103    break 2
5104  fi
5105done
5106  done
5107IFS=$as_save_IFS
5108
5109  ;;
5110esac
5111fi
5112MKTEMP=$ac_cv_path_MKTEMP
5113if test -n "$MKTEMP"; then
5114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5115$as_echo "$MKTEMP" >&6; }
5116else
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119fi
5120
5121
5122  test -n "$MKTEMP" && break
5123done
5124
5125
5126  if test "x$MKTEMP" = x; then
5127    if test "xmktemp" = x; then
5128      PROG_NAME=mktemp
5129    else
5130      PROG_NAME=mktemp
5131    fi
5132    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5133$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5134    as_fn_error $? "Cannot continue" "$LINENO" 5
5135  fi
5136
5137
5138
5139  for ac_prog in mv
5140do
5141  # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_path_MV+:} false; then :
5146  $as_echo_n "(cached) " >&6
5147else
5148  case $MV in
5149  [\\/]* | ?:[\\/]*)
5150  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5151  ;;
5152  *)
5153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154for as_dir in $PATH
5155do
5156  IFS=$as_save_IFS
5157  test -z "$as_dir" && as_dir=.
5158    for ac_exec_ext in '' $ac_executable_extensions; do
5159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5160    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5162    break 2
5163  fi
5164done
5165  done
5166IFS=$as_save_IFS
5167
5168  ;;
5169esac
5170fi
5171MV=$ac_cv_path_MV
5172if test -n "$MV"; then
5173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5174$as_echo "$MV" >&6; }
5175else
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181  test -n "$MV" && break
5182done
5183
5184
5185  if test "x$MV" = x; then
5186    if test "xmv" = x; then
5187      PROG_NAME=mv
5188    else
5189      PROG_NAME=mv
5190    fi
5191    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5192$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5193    as_fn_error $? "Cannot continue" "$LINENO" 5
5194  fi
5195
5196
5197
5198  for ac_prog in printf
5199do
5200  # Extract the first word of "$ac_prog", so it can be a program name with args.
5201set dummy $ac_prog; ac_word=$2
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5203$as_echo_n "checking for $ac_word... " >&6; }
5204if ${ac_cv_path_PRINTF+:} false; then :
5205  $as_echo_n "(cached) " >&6
5206else
5207  case $PRINTF in
5208  [\\/]* | ?:[\\/]*)
5209  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5210  ;;
5211  *)
5212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215  IFS=$as_save_IFS
5216  test -z "$as_dir" && as_dir=.
5217    for ac_exec_ext in '' $ac_executable_extensions; do
5218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5219    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5221    break 2
5222  fi
5223done
5224  done
5225IFS=$as_save_IFS
5226
5227  ;;
5228esac
5229fi
5230PRINTF=$ac_cv_path_PRINTF
5231if test -n "$PRINTF"; then
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5233$as_echo "$PRINTF" >&6; }
5234else
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
5237fi
5238
5239
5240  test -n "$PRINTF" && break
5241done
5242
5243
5244  if test "x$PRINTF" = x; then
5245    if test "xprintf" = x; then
5246      PROG_NAME=printf
5247    else
5248      PROG_NAME=printf
5249    fi
5250    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5251$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5252    as_fn_error $? "Cannot continue" "$LINENO" 5
5253  fi
5254
5255
5256
5257  for ac_prog in rm
5258do
5259  # Extract the first word of "$ac_prog", so it can be a program name with args.
5260set dummy $ac_prog; ac_word=$2
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262$as_echo_n "checking for $ac_word... " >&6; }
5263if ${ac_cv_path_RM+:} false; then :
5264  $as_echo_n "(cached) " >&6
5265else
5266  case $RM in
5267  [\\/]* | ?:[\\/]*)
5268  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5269  ;;
5270  *)
5271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272for as_dir in $PATH
5273do
5274  IFS=$as_save_IFS
5275  test -z "$as_dir" && as_dir=.
5276    for ac_exec_ext in '' $ac_executable_extensions; do
5277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5278    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280    break 2
5281  fi
5282done
5283  done
5284IFS=$as_save_IFS
5285
5286  ;;
5287esac
5288fi
5289RM=$ac_cv_path_RM
5290if test -n "$RM"; then
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5292$as_echo "$RM" >&6; }
5293else
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295$as_echo "no" >&6; }
5296fi
5297
5298
5299  test -n "$RM" && break
5300done
5301
5302
5303  if test "x$RM" = x; then
5304    if test "xrm" = x; then
5305      PROG_NAME=rm
5306    else
5307      PROG_NAME=rm
5308    fi
5309    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5310$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5311    as_fn_error $? "Cannot continue" "$LINENO" 5
5312  fi
5313
5314
5315
5316  for ac_prog in sh
5317do
5318  # Extract the first word of "$ac_prog", so it can be a program name with args.
5319set dummy $ac_prog; ac_word=$2
5320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5321$as_echo_n "checking for $ac_word... " >&6; }
5322if ${ac_cv_path_SH+:} false; then :
5323  $as_echo_n "(cached) " >&6
5324else
5325  case $SH in
5326  [\\/]* | ?:[\\/]*)
5327  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5328  ;;
5329  *)
5330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331for as_dir in $PATH
5332do
5333  IFS=$as_save_IFS
5334  test -z "$as_dir" && as_dir=.
5335    for ac_exec_ext in '' $ac_executable_extensions; do
5336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5337    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5339    break 2
5340  fi
5341done
5342  done
5343IFS=$as_save_IFS
5344
5345  ;;
5346esac
5347fi
5348SH=$ac_cv_path_SH
5349if test -n "$SH"; then
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5351$as_echo "$SH" >&6; }
5352else
5353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5354$as_echo "no" >&6; }
5355fi
5356
5357
5358  test -n "$SH" && break
5359done
5360
5361
5362  if test "x$SH" = x; then
5363    if test "xsh" = x; then
5364      PROG_NAME=sh
5365    else
5366      PROG_NAME=sh
5367    fi
5368    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5369$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5370    as_fn_error $? "Cannot continue" "$LINENO" 5
5371  fi
5372
5373
5374
5375  for ac_prog in sort
5376do
5377  # Extract the first word of "$ac_prog", so it can be a program name with args.
5378set dummy $ac_prog; ac_word=$2
5379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5380$as_echo_n "checking for $ac_word... " >&6; }
5381if ${ac_cv_path_SORT+:} false; then :
5382  $as_echo_n "(cached) " >&6
5383else
5384  case $SORT in
5385  [\\/]* | ?:[\\/]*)
5386  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5387  ;;
5388  *)
5389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5390for as_dir in $PATH
5391do
5392  IFS=$as_save_IFS
5393  test -z "$as_dir" && as_dir=.
5394    for ac_exec_ext in '' $ac_executable_extensions; do
5395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5396    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5398    break 2
5399  fi
5400done
5401  done
5402IFS=$as_save_IFS
5403
5404  ;;
5405esac
5406fi
5407SORT=$ac_cv_path_SORT
5408if test -n "$SORT"; then
5409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5410$as_echo "$SORT" >&6; }
5411else
5412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5413$as_echo "no" >&6; }
5414fi
5415
5416
5417  test -n "$SORT" && break
5418done
5419
5420
5421  if test "x$SORT" = x; then
5422    if test "xsort" = x; then
5423      PROG_NAME=sort
5424    else
5425      PROG_NAME=sort
5426    fi
5427    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5428$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5429    as_fn_error $? "Cannot continue" "$LINENO" 5
5430  fi
5431
5432
5433
5434  for ac_prog in tail
5435do
5436  # Extract the first word of "$ac_prog", so it can be a program name with args.
5437set dummy $ac_prog; ac_word=$2
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
5440if ${ac_cv_path_TAIL+:} false; then :
5441  $as_echo_n "(cached) " >&6
5442else
5443  case $TAIL in
5444  [\\/]* | ?:[\\/]*)
5445  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5446  ;;
5447  *)
5448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5449for as_dir in $PATH
5450do
5451  IFS=$as_save_IFS
5452  test -z "$as_dir" && as_dir=.
5453    for ac_exec_ext in '' $ac_executable_extensions; do
5454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5455    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5457    break 2
5458  fi
5459done
5460  done
5461IFS=$as_save_IFS
5462
5463  ;;
5464esac
5465fi
5466TAIL=$ac_cv_path_TAIL
5467if test -n "$TAIL"; then
5468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5469$as_echo "$TAIL" >&6; }
5470else
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472$as_echo "no" >&6; }
5473fi
5474
5475
5476  test -n "$TAIL" && break
5477done
5478
5479
5480  if test "x$TAIL" = x; then
5481    if test "xtail" = x; then
5482      PROG_NAME=tail
5483    else
5484      PROG_NAME=tail
5485    fi
5486    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5487$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5488    as_fn_error $? "Cannot continue" "$LINENO" 5
5489  fi
5490
5491
5492
5493  for ac_prog in tar
5494do
5495  # Extract the first word of "$ac_prog", so it can be a program name with args.
5496set dummy $ac_prog; ac_word=$2
5497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5498$as_echo_n "checking for $ac_word... " >&6; }
5499if ${ac_cv_path_TAR+:} false; then :
5500  $as_echo_n "(cached) " >&6
5501else
5502  case $TAR in
5503  [\\/]* | ?:[\\/]*)
5504  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5505  ;;
5506  *)
5507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508for as_dir in $PATH
5509do
5510  IFS=$as_save_IFS
5511  test -z "$as_dir" && as_dir=.
5512    for ac_exec_ext in '' $ac_executable_extensions; do
5513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5514    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5516    break 2
5517  fi
5518done
5519  done
5520IFS=$as_save_IFS
5521
5522  ;;
5523esac
5524fi
5525TAR=$ac_cv_path_TAR
5526if test -n "$TAR"; then
5527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5528$as_echo "$TAR" >&6; }
5529else
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531$as_echo "no" >&6; }
5532fi
5533
5534
5535  test -n "$TAR" && break
5536done
5537
5538
5539  if test "x$TAR" = x; then
5540    if test "xtar" = x; then
5541      PROG_NAME=tar
5542    else
5543      PROG_NAME=tar
5544    fi
5545    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5546$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5547    as_fn_error $? "Cannot continue" "$LINENO" 5
5548  fi
5549
5550
5551
5552  for ac_prog in tee
5553do
5554  # Extract the first word of "$ac_prog", so it can be a program name with args.
5555set dummy $ac_prog; ac_word=$2
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5557$as_echo_n "checking for $ac_word... " >&6; }
5558if ${ac_cv_path_TEE+:} false; then :
5559  $as_echo_n "(cached) " >&6
5560else
5561  case $TEE in
5562  [\\/]* | ?:[\\/]*)
5563  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5564  ;;
5565  *)
5566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5567for as_dir in $PATH
5568do
5569  IFS=$as_save_IFS
5570  test -z "$as_dir" && as_dir=.
5571    for ac_exec_ext in '' $ac_executable_extensions; do
5572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5573    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5575    break 2
5576  fi
5577done
5578  done
5579IFS=$as_save_IFS
5580
5581  ;;
5582esac
5583fi
5584TEE=$ac_cv_path_TEE
5585if test -n "$TEE"; then
5586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5587$as_echo "$TEE" >&6; }
5588else
5589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5590$as_echo "no" >&6; }
5591fi
5592
5593
5594  test -n "$TEE" && break
5595done
5596
5597
5598  if test "x$TEE" = x; then
5599    if test "xtee" = x; then
5600      PROG_NAME=tee
5601    else
5602      PROG_NAME=tee
5603    fi
5604    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5605$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5606    as_fn_error $? "Cannot continue" "$LINENO" 5
5607  fi
5608
5609
5610
5611  for ac_prog in touch
5612do
5613  # Extract the first word of "$ac_prog", so it can be a program name with args.
5614set dummy $ac_prog; ac_word=$2
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5616$as_echo_n "checking for $ac_word... " >&6; }
5617if ${ac_cv_path_TOUCH+:} false; then :
5618  $as_echo_n "(cached) " >&6
5619else
5620  case $TOUCH in
5621  [\\/]* | ?:[\\/]*)
5622  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5623  ;;
5624  *)
5625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5626for as_dir in $PATH
5627do
5628  IFS=$as_save_IFS
5629  test -z "$as_dir" && as_dir=.
5630    for ac_exec_ext in '' $ac_executable_extensions; do
5631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5632    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5634    break 2
5635  fi
5636done
5637  done
5638IFS=$as_save_IFS
5639
5640  ;;
5641esac
5642fi
5643TOUCH=$ac_cv_path_TOUCH
5644if test -n "$TOUCH"; then
5645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5646$as_echo "$TOUCH" >&6; }
5647else
5648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5649$as_echo "no" >&6; }
5650fi
5651
5652
5653  test -n "$TOUCH" && break
5654done
5655
5656
5657  if test "x$TOUCH" = x; then
5658    if test "xtouch" = x; then
5659      PROG_NAME=touch
5660    else
5661      PROG_NAME=touch
5662    fi
5663    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5664$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5665    as_fn_error $? "Cannot continue" "$LINENO" 5
5666  fi
5667
5668
5669
5670  for ac_prog in tr
5671do
5672  # Extract the first word of "$ac_prog", so it can be a program name with args.
5673set dummy $ac_prog; ac_word=$2
5674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5675$as_echo_n "checking for $ac_word... " >&6; }
5676if ${ac_cv_path_TR+:} false; then :
5677  $as_echo_n "(cached) " >&6
5678else
5679  case $TR in
5680  [\\/]* | ?:[\\/]*)
5681  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5682  ;;
5683  *)
5684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5685for as_dir in $PATH
5686do
5687  IFS=$as_save_IFS
5688  test -z "$as_dir" && as_dir=.
5689    for ac_exec_ext in '' $ac_executable_extensions; do
5690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5691    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5693    break 2
5694  fi
5695done
5696  done
5697IFS=$as_save_IFS
5698
5699  ;;
5700esac
5701fi
5702TR=$ac_cv_path_TR
5703if test -n "$TR"; then
5704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5705$as_echo "$TR" >&6; }
5706else
5707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5708$as_echo "no" >&6; }
5709fi
5710
5711
5712  test -n "$TR" && break
5713done
5714
5715
5716  if test "x$TR" = x; then
5717    if test "xtr" = x; then
5718      PROG_NAME=tr
5719    else
5720      PROG_NAME=tr
5721    fi
5722    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5723$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5724    as_fn_error $? "Cannot continue" "$LINENO" 5
5725  fi
5726
5727
5728
5729  for ac_prog in uname
5730do
5731  # Extract the first word of "$ac_prog", so it can be a program name with args.
5732set dummy $ac_prog; ac_word=$2
5733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734$as_echo_n "checking for $ac_word... " >&6; }
5735if ${ac_cv_path_UNAME+:} false; then :
5736  $as_echo_n "(cached) " >&6
5737else
5738  case $UNAME in
5739  [\\/]* | ?:[\\/]*)
5740  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5741  ;;
5742  *)
5743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5744for as_dir in $PATH
5745do
5746  IFS=$as_save_IFS
5747  test -z "$as_dir" && as_dir=.
5748    for ac_exec_ext in '' $ac_executable_extensions; do
5749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5750    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5752    break 2
5753  fi
5754done
5755  done
5756IFS=$as_save_IFS
5757
5758  ;;
5759esac
5760fi
5761UNAME=$ac_cv_path_UNAME
5762if test -n "$UNAME"; then
5763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5764$as_echo "$UNAME" >&6; }
5765else
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
5768fi
5769
5770
5771  test -n "$UNAME" && break
5772done
5773
5774
5775  if test "x$UNAME" = x; then
5776    if test "xuname" = x; then
5777      PROG_NAME=uname
5778    else
5779      PROG_NAME=uname
5780    fi
5781    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5782$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5783    as_fn_error $? "Cannot continue" "$LINENO" 5
5784  fi
5785
5786
5787
5788  for ac_prog in uniq
5789do
5790  # Extract the first word of "$ac_prog", so it can be a program name with args.
5791set dummy $ac_prog; ac_word=$2
5792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
5794if ${ac_cv_path_UNIQ+:} false; then :
5795  $as_echo_n "(cached) " >&6
5796else
5797  case $UNIQ in
5798  [\\/]* | ?:[\\/]*)
5799  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5800  ;;
5801  *)
5802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803for as_dir in $PATH
5804do
5805  IFS=$as_save_IFS
5806  test -z "$as_dir" && as_dir=.
5807    for ac_exec_ext in '' $ac_executable_extensions; do
5808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5809    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5811    break 2
5812  fi
5813done
5814  done
5815IFS=$as_save_IFS
5816
5817  ;;
5818esac
5819fi
5820UNIQ=$ac_cv_path_UNIQ
5821if test -n "$UNIQ"; then
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5823$as_echo "$UNIQ" >&6; }
5824else
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
5827fi
5828
5829
5830  test -n "$UNIQ" && break
5831done
5832
5833
5834  if test "x$UNIQ" = x; then
5835    if test "xuniq" = x; then
5836      PROG_NAME=uniq
5837    else
5838      PROG_NAME=uniq
5839    fi
5840    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5841$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5842    as_fn_error $? "Cannot continue" "$LINENO" 5
5843  fi
5844
5845
5846
5847  for ac_prog in wc
5848do
5849  # Extract the first word of "$ac_prog", so it can be a program name with args.
5850set dummy $ac_prog; ac_word=$2
5851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5852$as_echo_n "checking for $ac_word... " >&6; }
5853if ${ac_cv_path_WC+:} false; then :
5854  $as_echo_n "(cached) " >&6
5855else
5856  case $WC in
5857  [\\/]* | ?:[\\/]*)
5858  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5859  ;;
5860  *)
5861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5862for as_dir in $PATH
5863do
5864  IFS=$as_save_IFS
5865  test -z "$as_dir" && as_dir=.
5866    for ac_exec_ext in '' $ac_executable_extensions; do
5867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5868    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5870    break 2
5871  fi
5872done
5873  done
5874IFS=$as_save_IFS
5875
5876  ;;
5877esac
5878fi
5879WC=$ac_cv_path_WC
5880if test -n "$WC"; then
5881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5882$as_echo "$WC" >&6; }
5883else
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885$as_echo "no" >&6; }
5886fi
5887
5888
5889  test -n "$WC" && break
5890done
5891
5892
5893  if test "x$WC" = x; then
5894    if test "xwc" = x; then
5895      PROG_NAME=wc
5896    else
5897      PROG_NAME=wc
5898    fi
5899    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5900$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5901    as_fn_error $? "Cannot continue" "$LINENO" 5
5902  fi
5903
5904
5905
5906  for ac_prog in which
5907do
5908  # Extract the first word of "$ac_prog", so it can be a program name with args.
5909set dummy $ac_prog; ac_word=$2
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5911$as_echo_n "checking for $ac_word... " >&6; }
5912if ${ac_cv_path_WHICH+:} false; then :
5913  $as_echo_n "(cached) " >&6
5914else
5915  case $WHICH in
5916  [\\/]* | ?:[\\/]*)
5917  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5918  ;;
5919  *)
5920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921for as_dir in $PATH
5922do
5923  IFS=$as_save_IFS
5924  test -z "$as_dir" && as_dir=.
5925    for ac_exec_ext in '' $ac_executable_extensions; do
5926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5927    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929    break 2
5930  fi
5931done
5932  done
5933IFS=$as_save_IFS
5934
5935  ;;
5936esac
5937fi
5938WHICH=$ac_cv_path_WHICH
5939if test -n "$WHICH"; then
5940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5941$as_echo "$WHICH" >&6; }
5942else
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948  test -n "$WHICH" && break
5949done
5950
5951
5952  if test "x$WHICH" = x; then
5953    if test "xwhich" = x; then
5954      PROG_NAME=which
5955    else
5956      PROG_NAME=which
5957    fi
5958    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5959$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5960    as_fn_error $? "Cannot continue" "$LINENO" 5
5961  fi
5962
5963
5964
5965  for ac_prog in xargs
5966do
5967  # Extract the first word of "$ac_prog", so it can be a program name with args.
5968set dummy $ac_prog; ac_word=$2
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970$as_echo_n "checking for $ac_word... " >&6; }
5971if ${ac_cv_path_XARGS+:} false; then :
5972  $as_echo_n "(cached) " >&6
5973else
5974  case $XARGS in
5975  [\\/]* | ?:[\\/]*)
5976  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5977  ;;
5978  *)
5979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH
5981do
5982  IFS=$as_save_IFS
5983  test -z "$as_dir" && as_dir=.
5984    for ac_exec_ext in '' $ac_executable_extensions; do
5985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5986    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5988    break 2
5989  fi
5990done
5991  done
5992IFS=$as_save_IFS
5993
5994  ;;
5995esac
5996fi
5997XARGS=$ac_cv_path_XARGS
5998if test -n "$XARGS"; then
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6000$as_echo "$XARGS" >&6; }
6001else
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
6004fi
6005
6006
6007  test -n "$XARGS" && break
6008done
6009
6010
6011  if test "x$XARGS" = x; then
6012    if test "xxargs" = x; then
6013      PROG_NAME=xargs
6014    else
6015      PROG_NAME=xargs
6016    fi
6017    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6018$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6019    as_fn_error $? "Cannot continue" "$LINENO" 5
6020  fi
6021
6022
6023
6024  # Then required tools that require some special treatment.
6025  for ac_prog in gawk mawk nawk awk
6026do
6027  # Extract the first word of "$ac_prog", so it can be a program name with args.
6028set dummy $ac_prog; ac_word=$2
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6030$as_echo_n "checking for $ac_word... " >&6; }
6031if ${ac_cv_prog_AWK+:} false; then :
6032  $as_echo_n "(cached) " >&6
6033else
6034  if test -n "$AWK"; then
6035  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6036else
6037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6038for as_dir in $PATH
6039do
6040  IFS=$as_save_IFS
6041  test -z "$as_dir" && as_dir=.
6042    for ac_exec_ext in '' $ac_executable_extensions; do
6043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6044    ac_cv_prog_AWK="$ac_prog"
6045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6046    break 2
6047  fi
6048done
6049  done
6050IFS=$as_save_IFS
6051
6052fi
6053fi
6054AWK=$ac_cv_prog_AWK
6055if test -n "$AWK"; then
6056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6057$as_echo "$AWK" >&6; }
6058else
6059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6060$as_echo "no" >&6; }
6061fi
6062
6063
6064  test -n "$AWK" && break
6065done
6066
6067
6068  if test "x$AWK" = x; then
6069    if test "x" = x; then
6070      PROG_NAME=awk
6071    else
6072      PROG_NAME=
6073    fi
6074    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6075$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6076    as_fn_error $? "Cannot continue" "$LINENO" 5
6077  fi
6078
6079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6080$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6081if ${ac_cv_path_GREP+:} false; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084  if test -z "$GREP"; then
6085  ac_path_GREP_found=false
6086  # Loop through the user's path and test for each of PROGNAME-LIST
6087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6088for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6089do
6090  IFS=$as_save_IFS
6091  test -z "$as_dir" && as_dir=.
6092    for ac_prog in grep ggrep; do
6093    for ac_exec_ext in '' $ac_executable_extensions; do
6094      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6095      as_fn_executable_p "$ac_path_GREP" || continue
6096# Check for GNU ac_path_GREP and select it if it is found.
6097  # Check for GNU $ac_path_GREP
6098case `"$ac_path_GREP" --version 2>&1` in
6099*GNU*)
6100  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6101*)
6102  ac_count=0
6103  $as_echo_n 0123456789 >"conftest.in"
6104  while :
6105  do
6106    cat "conftest.in" "conftest.in" >"conftest.tmp"
6107    mv "conftest.tmp" "conftest.in"
6108    cp "conftest.in" "conftest.nl"
6109    $as_echo 'GREP' >> "conftest.nl"
6110    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6111    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6112    as_fn_arith $ac_count + 1 && ac_count=$as_val
6113    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6114      # Best one so far, save it but keep looking for a better one
6115      ac_cv_path_GREP="$ac_path_GREP"
6116      ac_path_GREP_max=$ac_count
6117    fi
6118    # 10*(2^10) chars as input seems more than enough
6119    test $ac_count -gt 10 && break
6120  done
6121  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6122esac
6123
6124      $ac_path_GREP_found && break 3
6125    done
6126  done
6127  done
6128IFS=$as_save_IFS
6129  if test -z "$ac_cv_path_GREP"; then
6130    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6131  fi
6132else
6133  ac_cv_path_GREP=$GREP
6134fi
6135
6136fi
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6138$as_echo "$ac_cv_path_GREP" >&6; }
6139 GREP="$ac_cv_path_GREP"
6140
6141
6142
6143  if test "x$GREP" = x; then
6144    if test "x" = x; then
6145      PROG_NAME=grep
6146    else
6147      PROG_NAME=
6148    fi
6149    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6150$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6151    as_fn_error $? "Cannot continue" "$LINENO" 5
6152  fi
6153
6154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6155$as_echo_n "checking for egrep... " >&6; }
6156if ${ac_cv_path_EGREP+:} false; then :
6157  $as_echo_n "(cached) " >&6
6158else
6159  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6160   then ac_cv_path_EGREP="$GREP -E"
6161   else
6162     if test -z "$EGREP"; then
6163  ac_path_EGREP_found=false
6164  # Loop through the user's path and test for each of PROGNAME-LIST
6165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6167do
6168  IFS=$as_save_IFS
6169  test -z "$as_dir" && as_dir=.
6170    for ac_prog in egrep; do
6171    for ac_exec_ext in '' $ac_executable_extensions; do
6172      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6173      as_fn_executable_p "$ac_path_EGREP" || continue
6174# Check for GNU ac_path_EGREP and select it if it is found.
6175  # Check for GNU $ac_path_EGREP
6176case `"$ac_path_EGREP" --version 2>&1` in
6177*GNU*)
6178  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6179*)
6180  ac_count=0
6181  $as_echo_n 0123456789 >"conftest.in"
6182  while :
6183  do
6184    cat "conftest.in" "conftest.in" >"conftest.tmp"
6185    mv "conftest.tmp" "conftest.in"
6186    cp "conftest.in" "conftest.nl"
6187    $as_echo 'EGREP' >> "conftest.nl"
6188    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6189    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6190    as_fn_arith $ac_count + 1 && ac_count=$as_val
6191    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6192      # Best one so far, save it but keep looking for a better one
6193      ac_cv_path_EGREP="$ac_path_EGREP"
6194      ac_path_EGREP_max=$ac_count
6195    fi
6196    # 10*(2^10) chars as input seems more than enough
6197    test $ac_count -gt 10 && break
6198  done
6199  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6200esac
6201
6202      $ac_path_EGREP_found && break 3
6203    done
6204  done
6205  done
6206IFS=$as_save_IFS
6207  if test -z "$ac_cv_path_EGREP"; then
6208    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6209  fi
6210else
6211  ac_cv_path_EGREP=$EGREP
6212fi
6213
6214   fi
6215fi
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6217$as_echo "$ac_cv_path_EGREP" >&6; }
6218 EGREP="$ac_cv_path_EGREP"
6219
6220
6221
6222  if test "x$EGREP" = x; then
6223    if test "x" = x; then
6224      PROG_NAME=egrep
6225    else
6226      PROG_NAME=
6227    fi
6228    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6229$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6230    as_fn_error $? "Cannot continue" "$LINENO" 5
6231  fi
6232
6233  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6234$as_echo_n "checking for fgrep... " >&6; }
6235if ${ac_cv_path_FGREP+:} false; then :
6236  $as_echo_n "(cached) " >&6
6237else
6238  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6239   then ac_cv_path_FGREP="$GREP -F"
6240   else
6241     if test -z "$FGREP"; then
6242  ac_path_FGREP_found=false
6243  # Loop through the user's path and test for each of PROGNAME-LIST
6244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6245for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6246do
6247  IFS=$as_save_IFS
6248  test -z "$as_dir" && as_dir=.
6249    for ac_prog in fgrep; do
6250    for ac_exec_ext in '' $ac_executable_extensions; do
6251      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6252      as_fn_executable_p "$ac_path_FGREP" || continue
6253# Check for GNU ac_path_FGREP and select it if it is found.
6254  # Check for GNU $ac_path_FGREP
6255case `"$ac_path_FGREP" --version 2>&1` in
6256*GNU*)
6257  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6258*)
6259  ac_count=0
6260  $as_echo_n 0123456789 >"conftest.in"
6261  while :
6262  do
6263    cat "conftest.in" "conftest.in" >"conftest.tmp"
6264    mv "conftest.tmp" "conftest.in"
6265    cp "conftest.in" "conftest.nl"
6266    $as_echo 'FGREP' >> "conftest.nl"
6267    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6268    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6269    as_fn_arith $ac_count + 1 && ac_count=$as_val
6270    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6271      # Best one so far, save it but keep looking for a better one
6272      ac_cv_path_FGREP="$ac_path_FGREP"
6273      ac_path_FGREP_max=$ac_count
6274    fi
6275    # 10*(2^10) chars as input seems more than enough
6276    test $ac_count -gt 10 && break
6277  done
6278  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6279esac
6280
6281      $ac_path_FGREP_found && break 3
6282    done
6283  done
6284  done
6285IFS=$as_save_IFS
6286  if test -z "$ac_cv_path_FGREP"; then
6287    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6288  fi
6289else
6290  ac_cv_path_FGREP=$FGREP
6291fi
6292
6293   fi
6294fi
6295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6296$as_echo "$ac_cv_path_FGREP" >&6; }
6297 FGREP="$ac_cv_path_FGREP"
6298
6299
6300
6301  if test "x$FGREP" = x; then
6302    if test "x" = x; then
6303      PROG_NAME=fgrep
6304    else
6305      PROG_NAME=
6306    fi
6307    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6308$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6309    as_fn_error $? "Cannot continue" "$LINENO" 5
6310  fi
6311
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6313$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6314if ${ac_cv_path_SED+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6318     for ac_i in 1 2 3 4 5 6 7; do
6319       ac_script="$ac_script$as_nl$ac_script"
6320     done
6321     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6322     { ac_script=; unset ac_script;}
6323     if test -z "$SED"; then
6324  ac_path_SED_found=false
6325  # Loop through the user's path and test for each of PROGNAME-LIST
6326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6327for as_dir in $PATH
6328do
6329  IFS=$as_save_IFS
6330  test -z "$as_dir" && as_dir=.
6331    for ac_prog in sed gsed; do
6332    for ac_exec_ext in '' $ac_executable_extensions; do
6333      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6334      as_fn_executable_p "$ac_path_SED" || continue
6335# Check for GNU ac_path_SED and select it if it is found.
6336  # Check for GNU $ac_path_SED
6337case `"$ac_path_SED" --version 2>&1` in
6338*GNU*)
6339  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6340*)
6341  ac_count=0
6342  $as_echo_n 0123456789 >"conftest.in"
6343  while :
6344  do
6345    cat "conftest.in" "conftest.in" >"conftest.tmp"
6346    mv "conftest.tmp" "conftest.in"
6347    cp "conftest.in" "conftest.nl"
6348    $as_echo '' >> "conftest.nl"
6349    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6350    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6351    as_fn_arith $ac_count + 1 && ac_count=$as_val
6352    if test $ac_count -gt ${ac_path_SED_max-0}; then
6353      # Best one so far, save it but keep looking for a better one
6354      ac_cv_path_SED="$ac_path_SED"
6355      ac_path_SED_max=$ac_count
6356    fi
6357    # 10*(2^10) chars as input seems more than enough
6358    test $ac_count -gt 10 && break
6359  done
6360  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6361esac
6362
6363      $ac_path_SED_found && break 3
6364    done
6365  done
6366  done
6367IFS=$as_save_IFS
6368  if test -z "$ac_cv_path_SED"; then
6369    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6370  fi
6371else
6372  ac_cv_path_SED=$SED
6373fi
6374
6375fi
6376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6377$as_echo "$ac_cv_path_SED" >&6; }
6378 SED="$ac_cv_path_SED"
6379  rm -f conftest.sed
6380
6381
6382  if test "x$SED" = x; then
6383    if test "x" = x; then
6384      PROG_NAME=sed
6385    else
6386      PROG_NAME=
6387    fi
6388    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6389$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6390    as_fn_error $? "Cannot continue" "$LINENO" 5
6391  fi
6392
6393
6394  for ac_prog in nawk gawk awk
6395do
6396  # Extract the first word of "$ac_prog", so it can be a program name with args.
6397set dummy $ac_prog; ac_word=$2
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6399$as_echo_n "checking for $ac_word... " >&6; }
6400if ${ac_cv_path_NAWK+:} false; then :
6401  $as_echo_n "(cached) " >&6
6402else
6403  case $NAWK in
6404  [\\/]* | ?:[\\/]*)
6405  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6406  ;;
6407  *)
6408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6409for as_dir in $PATH
6410do
6411  IFS=$as_save_IFS
6412  test -z "$as_dir" && as_dir=.
6413    for ac_exec_ext in '' $ac_executable_extensions; do
6414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6415    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6417    break 2
6418  fi
6419done
6420  done
6421IFS=$as_save_IFS
6422
6423  ;;
6424esac
6425fi
6426NAWK=$ac_cv_path_NAWK
6427if test -n "$NAWK"; then
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6429$as_echo "$NAWK" >&6; }
6430else
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }
6433fi
6434
6435
6436  test -n "$NAWK" && break
6437done
6438
6439
6440  if test "x$NAWK" = x; then
6441    if test "x" = x; then
6442      PROG_NAME=nawk
6443    else
6444      PROG_NAME=
6445    fi
6446    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6447$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6448    as_fn_error $? "Cannot continue" "$LINENO" 5
6449  fi
6450
6451
6452  # Always force rm.
6453  RM="$RM -f"
6454
6455  # pwd behaves differently on various platforms and some don't support the -L flag.
6456  # Always use the bash builtin pwd to get uniform behavior.
6457  THEPWDCMD=pwd
6458
6459  # These are not required on all platforms
6460  # Extract the first word of "cygpath", so it can be a program name with args.
6461set dummy cygpath; ac_word=$2
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6463$as_echo_n "checking for $ac_word... " >&6; }
6464if ${ac_cv_path_CYGPATH+:} false; then :
6465  $as_echo_n "(cached) " >&6
6466else
6467  case $CYGPATH in
6468  [\\/]* | ?:[\\/]*)
6469  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6470  ;;
6471  *)
6472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6473for as_dir in $PATH
6474do
6475  IFS=$as_save_IFS
6476  test -z "$as_dir" && as_dir=.
6477    for ac_exec_ext in '' $ac_executable_extensions; do
6478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6479    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6481    break 2
6482  fi
6483done
6484  done
6485IFS=$as_save_IFS
6486
6487  ;;
6488esac
6489fi
6490CYGPATH=$ac_cv_path_CYGPATH
6491if test -n "$CYGPATH"; then
6492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6493$as_echo "$CYGPATH" >&6; }
6494else
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6496$as_echo "no" >&6; }
6497fi
6498
6499
6500  # Extract the first word of "readlink", so it can be a program name with args.
6501set dummy readlink; ac_word=$2
6502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6503$as_echo_n "checking for $ac_word... " >&6; }
6504if ${ac_cv_path_READLINK+:} false; then :
6505  $as_echo_n "(cached) " >&6
6506else
6507  case $READLINK in
6508  [\\/]* | ?:[\\/]*)
6509  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6510  ;;
6511  *)
6512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6513for as_dir in $PATH
6514do
6515  IFS=$as_save_IFS
6516  test -z "$as_dir" && as_dir=.
6517    for ac_exec_ext in '' $ac_executable_extensions; do
6518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6519    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6521    break 2
6522  fi
6523done
6524  done
6525IFS=$as_save_IFS
6526
6527  ;;
6528esac
6529fi
6530READLINK=$ac_cv_path_READLINK
6531if test -n "$READLINK"; then
6532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6533$as_echo "$READLINK" >&6; }
6534else
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539
6540  # Extract the first word of "df", so it can be a program name with args.
6541set dummy df; ac_word=$2
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6543$as_echo_n "checking for $ac_word... " >&6; }
6544if ${ac_cv_path_DF+:} false; then :
6545  $as_echo_n "(cached) " >&6
6546else
6547  case $DF in
6548  [\\/]* | ?:[\\/]*)
6549  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6550  ;;
6551  *)
6552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in $PATH
6554do
6555  IFS=$as_save_IFS
6556  test -z "$as_dir" && as_dir=.
6557    for ac_exec_ext in '' $ac_executable_extensions; do
6558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6559    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6561    break 2
6562  fi
6563done
6564  done
6565IFS=$as_save_IFS
6566
6567  ;;
6568esac
6569fi
6570DF=$ac_cv_path_DF
6571if test -n "$DF"; then
6572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6573$as_echo "$DF" >&6; }
6574else
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
6579
6580  # Extract the first word of "SetFile", so it can be a program name with args.
6581set dummy SetFile; ac_word=$2
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6583$as_echo_n "checking for $ac_word... " >&6; }
6584if ${ac_cv_path_SETFILE+:} false; then :
6585  $as_echo_n "(cached) " >&6
6586else
6587  case $SETFILE in
6588  [\\/]* | ?:[\\/]*)
6589  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6590  ;;
6591  *)
6592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6593for as_dir in $PATH
6594do
6595  IFS=$as_save_IFS
6596  test -z "$as_dir" && as_dir=.
6597    for ac_exec_ext in '' $ac_executable_extensions; do
6598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6599    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6601    break 2
6602  fi
6603done
6604  done
6605IFS=$as_save_IFS
6606
6607  ;;
6608esac
6609fi
6610SETFILE=$ac_cv_path_SETFILE
6611if test -n "$SETFILE"; then
6612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6613$as_echo "$SETFILE" >&6; }
6614else
6615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6616$as_echo "no" >&6; }
6617fi
6618
6619
6620
6621
6622# Now we can determine OpenJDK build and target platforms. This is required to
6623# have early on.
6624# Make sure we can run config.sub.
6625$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6626  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6627
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6629$as_echo_n "checking build system type... " >&6; }
6630if ${ac_cv_build+:} false; then :
6631  $as_echo_n "(cached) " >&6
6632else
6633  ac_build_alias=$build_alias
6634test "x$ac_build_alias" = x &&
6635  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6636test "x$ac_build_alias" = x &&
6637  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6638ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6639  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6640
6641fi
6642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6643$as_echo "$ac_cv_build" >&6; }
6644case $ac_cv_build in
6645*-*-*) ;;
6646*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6647esac
6648build=$ac_cv_build
6649ac_save_IFS=$IFS; IFS='-'
6650set x $ac_cv_build
6651shift
6652build_cpu=$1
6653build_vendor=$2
6654shift; shift
6655# Remember, the first character of IFS is used to create $*,
6656# except with old shells:
6657build_os=$*
6658IFS=$ac_save_IFS
6659case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6660
6661
6662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6663$as_echo_n "checking host system type... " >&6; }
6664if ${ac_cv_host+:} false; then :
6665  $as_echo_n "(cached) " >&6
6666else
6667  if test "x$host_alias" = x; then
6668  ac_cv_host=$ac_cv_build
6669else
6670  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6671    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6672fi
6673
6674fi
6675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6676$as_echo "$ac_cv_host" >&6; }
6677case $ac_cv_host in
6678*-*-*) ;;
6679*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6680esac
6681host=$ac_cv_host
6682ac_save_IFS=$IFS; IFS='-'
6683set x $ac_cv_host
6684shift
6685host_cpu=$1
6686host_vendor=$2
6687shift; shift
6688# Remember, the first character of IFS is used to create $*,
6689# except with old shells:
6690host_os=$*
6691IFS=$ac_save_IFS
6692case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6693
6694
6695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6696$as_echo_n "checking target system type... " >&6; }
6697if ${ac_cv_target+:} false; then :
6698  $as_echo_n "(cached) " >&6
6699else
6700  if test "x$target_alias" = x; then
6701  ac_cv_target=$ac_cv_host
6702else
6703  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6704    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6705fi
6706
6707fi
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6709$as_echo "$ac_cv_target" >&6; }
6710case $ac_cv_target in
6711*-*-*) ;;
6712*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6713esac
6714target=$ac_cv_target
6715ac_save_IFS=$IFS; IFS='-'
6716set x $ac_cv_target
6717shift
6718target_cpu=$1
6719target_vendor=$2
6720shift; shift
6721# Remember, the first character of IFS is used to create $*,
6722# except with old shells:
6723target_os=$*
6724IFS=$ac_save_IFS
6725case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6726
6727
6728# The aliases save the names the user supplied, while $host etc.
6729# will get canonicalized.
6730test -n "$target_alias" &&
6731  test "$program_prefix$program_suffix$program_transform_name" = \
6732    NONENONEs,x,x, &&
6733  program_prefix=${target_alias}-
6734
6735  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6736  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6737  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6738  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6739  # to use the configure naming style.
6740
6741
6742
6743
6744
6745  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6746  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6747  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6748  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6749  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6750  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6751
6752
6753
6754  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6755
6756  case "$build_os" in
6757    *linux*)
6758      VAR_OS=linux
6759      VAR_OS_API=posix
6760      VAR_OS_ENV=linux
6761      ;;
6762    *solaris*)
6763      VAR_OS=solaris
6764      VAR_OS_API=posix
6765      VAR_OS_ENV=solaris
6766      ;;
6767    *darwin*)
6768      VAR_OS=macosx
6769      VAR_OS_API=posix
6770      VAR_OS_ENV=macosx
6771      ;;
6772    *bsd*)
6773      VAR_OS=bsd
6774      VAR_OS_API=posix
6775      VAR_OS_ENV=bsd
6776      ;;
6777    *cygwin*)
6778      VAR_OS=windows
6779      VAR_OS_API=winapi
6780      VAR_OS_ENV=windows.cygwin
6781      ;;
6782    *mingw*)
6783      VAR_OS=windows
6784      VAR_OS_API=winapi
6785      VAR_OS_ENV=windows.msys
6786      ;;
6787    *)
6788      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6789      ;;
6790  esac
6791
6792
6793  # First argument is the cpu name from the trip/quad
6794  case "$build_cpu" in
6795    x86_64)
6796      VAR_CPU=x86_64
6797      VAR_CPU_ARCH=x86
6798      VAR_CPU_BITS=64
6799      VAR_CPU_ENDIAN=little
6800      ;;
6801    i?86)
6802      VAR_CPU=x86
6803      VAR_CPU_ARCH=x86
6804      VAR_CPU_BITS=32
6805      VAR_CPU_ENDIAN=little
6806      ;;
6807    arm*)
6808      VAR_CPU=arm
6809      VAR_CPU_ARCH=arm
6810      VAR_CPU_BITS=32
6811      VAR_CPU_ENDIAN=little
6812      ;;
6813    powerpc)
6814      VAR_CPU=ppc
6815      VAR_CPU_ARCH=ppc
6816      VAR_CPU_BITS=32
6817      VAR_CPU_ENDIAN=big
6818      ;;
6819    powerpc64)
6820      VAR_CPU=ppc64
6821      VAR_CPU_ARCH=ppc
6822      VAR_CPU_BITS=64
6823      VAR_CPU_ENDIAN=big
6824      ;;
6825    s390)
6826      VAR_CPU=s390
6827      VAR_CPU_ARCH=s390
6828      VAR_CPU_BITS=32
6829      VAR_CPU_ENDIAN=big
6830      ;;
6831    s390x)
6832      VAR_CPU=s390x
6833      VAR_CPU_ARCH=s390
6834      VAR_CPU_BITS=64
6835      VAR_CPU_ENDIAN=big
6836      ;;
6837    sparc)
6838      VAR_CPU=sparc
6839      VAR_CPU_ARCH=sparc
6840      VAR_CPU_BITS=32
6841      VAR_CPU_ENDIAN=big
6842      ;;
6843    sparcv9)
6844      VAR_CPU=sparcv9
6845      VAR_CPU_ARCH=sparc
6846      VAR_CPU_BITS=64
6847      VAR_CPU_ENDIAN=big
6848      ;;
6849    *)
6850      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6851      ;;
6852  esac
6853
6854  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6855  OPENJDK_BUILD_OS="$VAR_OS"
6856  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6857  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6858  OPENJDK_BUILD_CPU="$VAR_CPU"
6859  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6860  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6861  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6862
6863
6864
6865
6866
6867
6868
6869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6870$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6872$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6873
6874  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6875
6876  case "$host_os" in
6877    *linux*)
6878      VAR_OS=linux
6879      VAR_OS_API=posix
6880      VAR_OS_ENV=linux
6881      ;;
6882    *solaris*)
6883      VAR_OS=solaris
6884      VAR_OS_API=posix
6885      VAR_OS_ENV=solaris
6886      ;;
6887    *darwin*)
6888      VAR_OS=macosx
6889      VAR_OS_API=posix
6890      VAR_OS_ENV=macosx
6891      ;;
6892    *bsd*)
6893      VAR_OS=bsd
6894      VAR_OS_API=posix
6895      VAR_OS_ENV=bsd
6896      ;;
6897    *cygwin*)
6898      VAR_OS=windows
6899      VAR_OS_API=winapi
6900      VAR_OS_ENV=windows.cygwin
6901      ;;
6902    *mingw*)
6903      VAR_OS=windows
6904      VAR_OS_API=winapi
6905      VAR_OS_ENV=windows.msys
6906      ;;
6907    *)
6908      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6909      ;;
6910  esac
6911
6912
6913  # First argument is the cpu name from the trip/quad
6914  case "$host_cpu" in
6915    x86_64)
6916      VAR_CPU=x86_64
6917      VAR_CPU_ARCH=x86
6918      VAR_CPU_BITS=64
6919      VAR_CPU_ENDIAN=little
6920      ;;
6921    i?86)
6922      VAR_CPU=x86
6923      VAR_CPU_ARCH=x86
6924      VAR_CPU_BITS=32
6925      VAR_CPU_ENDIAN=little
6926      ;;
6927    arm*)
6928      VAR_CPU=arm
6929      VAR_CPU_ARCH=arm
6930      VAR_CPU_BITS=32
6931      VAR_CPU_ENDIAN=little
6932      ;;
6933    powerpc)
6934      VAR_CPU=ppc
6935      VAR_CPU_ARCH=ppc
6936      VAR_CPU_BITS=32
6937      VAR_CPU_ENDIAN=big
6938      ;;
6939    powerpc64)
6940      VAR_CPU=ppc64
6941      VAR_CPU_ARCH=ppc
6942      VAR_CPU_BITS=64
6943      VAR_CPU_ENDIAN=big
6944      ;;
6945    s390)
6946      VAR_CPU=s390
6947      VAR_CPU_ARCH=s390
6948      VAR_CPU_BITS=32
6949      VAR_CPU_ENDIAN=big
6950      ;;
6951    s390x)
6952      VAR_CPU=s390x
6953      VAR_CPU_ARCH=s390
6954      VAR_CPU_BITS=64
6955      VAR_CPU_ENDIAN=big
6956      ;;
6957    sparc)
6958      VAR_CPU=sparc
6959      VAR_CPU_ARCH=sparc
6960      VAR_CPU_BITS=32
6961      VAR_CPU_ENDIAN=big
6962      ;;
6963    sparcv9)
6964      VAR_CPU=sparcv9
6965      VAR_CPU_ARCH=sparc
6966      VAR_CPU_BITS=64
6967      VAR_CPU_ENDIAN=big
6968      ;;
6969    *)
6970      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6971      ;;
6972  esac
6973
6974  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6975  OPENJDK_TARGET_OS="$VAR_OS"
6976  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6977  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6978  OPENJDK_TARGET_CPU="$VAR_CPU"
6979  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6980  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6981  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6982
6983
6984
6985
6986
6987
6988
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6990$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6992$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6993
6994
6995
6996# Check whether --with-target-bits was given.
6997if test "${with_target_bits+set}" = set; then :
6998  withval=$with_target_bits;
6999fi
7000
7001
7002  # We have three types of compiles:
7003  # native  == normal compilation, target system == build system
7004  # cross   == traditional cross compilation, target system != build system; special toolchain needed
7005  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7006  #
7007  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7008    # We're doing a proper cross-compilation
7009    COMPILE_TYPE="cross"
7010  else
7011    COMPILE_TYPE="native"
7012  fi
7013
7014  if test "x$with_target_bits" != x; then
7015    if test "x$COMPILE_TYPE" = "xcross"; then
7016      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7017    fi
7018
7019    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7020      # A reduced build is requested
7021      COMPILE_TYPE="reduced"
7022      OPENJDK_TARGET_CPU_BITS=32
7023      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7024        OPENJDK_TARGET_CPU=x86
7025      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7026        OPENJDK_TARGET_CPU=sparc
7027      else
7028        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7029      fi
7030    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7031      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
7032    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7033      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7034$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7035    else
7036      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7037    fi
7038  fi
7039
7040
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7042$as_echo_n "checking compilation type... " >&6; }
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7044$as_echo "$COMPILE_TYPE" >&6; }
7045
7046
7047  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7048    REQUIRED_OS_NAME=SunOS
7049    REQUIRED_OS_VERSION=5.10
7050  fi
7051  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7052    REQUIRED_OS_NAME=Linux
7053    REQUIRED_OS_VERSION=2.6
7054  fi
7055  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7056    REQUIRED_OS_NAME=Windows
7057    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7058      REQUIRED_OS_VERSION=5.2
7059    else
7060      REQUIRED_OS_VERSION=5.1
7061    fi
7062  fi
7063  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7064    REQUIRED_OS_NAME=Darwin
7065    REQUIRED_OS_VERSION=11.2
7066  fi
7067
7068
7069
7070
7071
7072  # Also store the legacy naming of the cpu.
7073  # Ie i586 and amd64 instead of x86 and x86_64
7074  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7075  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7076    OPENJDK_TARGET_CPU_LEGACY="i586"
7077  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7078    # On all platforms except MacOSX replace x86_64 with amd64.
7079    OPENJDK_TARGET_CPU_LEGACY="amd64"
7080  fi
7081
7082
7083  # And the second legacy naming of the cpu.
7084  # Ie i386 and amd64 instead of x86 and x86_64.
7085  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7086  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7087    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7088  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7089    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7090  fi
7091
7092
7093  # This is the name of the cpu (but using i386 and amd64 instead of
7094  # x86 and x86_64, respectively), preceeded by a /, to be used when
7095  # locating libraries. On macosx, it's empty, though.
7096  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7097  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7098    OPENJDK_TARGET_CPU_LIBDIR=""
7099  fi
7100
7101
7102  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7103  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7104  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7105  OPENJDK_TARGET_CPU_ISADIR=""
7106  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7107    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7108      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7109    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7110      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7111    fi
7112  fi
7113
7114
7115  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7116  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7117  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7118    # On linux only, we replace x86 with i386.
7119    OPENJDK_TARGET_CPU_OSARCH="i386"
7120  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7121    # On all platforms except macosx, we replace x86_64 with amd64.
7122    OPENJDK_TARGET_CPU_OSARCH="amd64"
7123  fi
7124
7125
7126  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7127  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7128    OPENJDK_TARGET_CPU_JLI="i386"
7129  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7130    # On all platforms except macosx, we replace x86_64 with amd64.
7131    OPENJDK_TARGET_CPU_JLI="amd64"
7132  fi
7133  # Now setup the -D flags for building libjli.
7134  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7135  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7136    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7137      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7138    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7139      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7140    fi
7141  fi
7142
7143
7144  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7145  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7146    OPENJDK_TARGET_OS_API_DIR="solaris"
7147  fi
7148  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7149    OPENJDK_TARGET_OS_API_DIR="windows"
7150  fi
7151
7152
7153  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7154      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7155  else
7156      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7157  fi
7158
7159
7160  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7161    A_LP64="LP64:="
7162    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7163    # unpack200.exe
7164    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7165      ADD_LP64="-D_LP64=1"
7166    fi
7167  fi
7168  LP64=$A_LP64
7169
7170
7171  if test "x$COMPILE_TYPE" = "xcross"; then
7172    # FIXME: ... or should this include reduced builds..?
7173    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7174  else
7175    DEFINE_CROSS_COMPILE_ARCH=""
7176  fi
7177
7178
7179  # ZERO_ARCHDEF is used to enable architecture-specific code
7180  case "${OPENJDK_TARGET_CPU}" in
7181    ppc*)    ZERO_ARCHDEF=PPC   ;;
7182    s390*)   ZERO_ARCHDEF=S390  ;;
7183    sparc*)  ZERO_ARCHDEF=SPARC ;;
7184    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7185    x86)     ZERO_ARCHDEF=IA32  ;;
7186    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7187  esac
7188
7189
7190
7191
7192# Continue setting up basic stuff. Most remaining code require fundamental tools.
7193
7194  # Locate the directory of this script.
7195  SCRIPT="$0"
7196  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7197
7198  # Where is the source? It is located two levels above the configure script.
7199  CURDIR="$PWD"
7200  cd "$AUTOCONF_DIR/../.."
7201  SRC_ROOT="`$THEPWDCMD -L`"
7202
7203  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7204    PATH_SEP=";"
7205
7206  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7207  if test $SRC_ROOT_LENGTH -gt 100; then
7208    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7209  fi
7210
7211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7213$as_echo_n "checking cygwin release... " >&6; }
7214    CYGWIN_VERSION=`$UNAME -r`
7215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7216$as_echo "$CYGWIN_VERSION" >&6; }
7217    WINDOWS_ENV_VENDOR='cygwin'
7218    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7219
7220    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7221    if test "x$CYGWIN_VERSION_OK" = x; then
7222      { $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
7223$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;}
7224      as_fn_error $? "Cannot continue" "$LINENO" 5
7225    fi
7226    if test "x$CYGPATH" = x; then
7227      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7228    fi
7229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7230$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7231    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7232    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7233    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7234    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7236$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7237    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7238    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7239    if test "x$test_cygdrive_prefix" = x; then
7240      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7241    fi
7242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7244$as_echo_n "checking msys release... " >&6; }
7245    MSYS_VERSION=`$UNAME -r`
7246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7247$as_echo "$MSYS_VERSION" >&6; }
7248
7249    WINDOWS_ENV_VENDOR='msys'
7250    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7251
7252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7253$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7254    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7255    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7256
7257  windows_path="$MSYS_ROOT_PATH"
7258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7259    unix_path=`$CYGPATH -u "$windows_path"`
7260    MSYS_ROOT_PATH="$unix_path"
7261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7263    MSYS_ROOT_PATH="$unix_path"
7264  fi
7265
7266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7267$as_echo "$MSYS_ROOT_PATH" >&6; }
7268    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7269  else
7270    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7271  fi
7272
7273  # Test if windows or unix (cygwin/msys) find is first in path.
7274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7275$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7276  FIND_BINARY_OUTPUT=`find --version 2>&1`
7277  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7279$as_echo "unix style" >&6; }
7280  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7282$as_echo "Windows" >&6; }
7283    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7284$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7285    { $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
7286$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7287    as_fn_error $? "Cannot continue" "$LINENO" 5
7288  else
7289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7290$as_echo "unknown" >&6; }
7291    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7292$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7293  fi
7294
7295  else
7296    PATH_SEP=":"
7297  fi
7298
7299
7300
7301  cd "$CURDIR"
7302
7303
7304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7305
7306  # Input might be given as Windows format, start by converting to
7307  # unix format.
7308  path="$SRC_ROOT"
7309  new_path=`$CYGPATH -u "$path"`
7310
7311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7314  # "foo.exe" is OK but "foo" is an error.
7315  #
7316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7317  # It is also a way to make sure we got the proper file name for the real test later on.
7318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7319  if test "x$test_shortpath" = x; then
7320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7321$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7322    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7323  fi
7324
7325  # Call helper function which possibly converts this using DOS-style short mode.
7326  # If so, the updated path is stored in $new_path.
7327
7328  input_path="$new_path"
7329  # Check if we need to convert this using DOS-style short mode. If the path
7330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7331  # take no chances and rewrite it.
7332  # Note: m4 eats our [], so we need to use [ and ] instead.
7333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7334  if test "x$has_forbidden_chars" != x; then
7335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7339      # Going to short mode and back again did indeed matter. Since short mode is
7340      # case insensitive, let's make it lowercase to improve readability.
7341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7342      # Now convert it back to Unix-stile (cygpath)
7343      input_path=`$CYGPATH -u "$shortmode_path"`
7344      new_path="$input_path"
7345    fi
7346  fi
7347
7348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7349  if test "x$test_cygdrive_prefix" = x; then
7350    # As a simple fix, exclude /usr/bin since it's not a real path.
7351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7353      # a path prefixed by /cygdrive for fixpath to work.
7354      new_path="$CYGWIN_ROOT_PATH$input_path"
7355    fi
7356  fi
7357
7358
7359  if test "x$path" != "x$new_path"; then
7360    SRC_ROOT="$new_path"
7361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7362$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7363  fi
7364
7365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7366
7367  path="$SRC_ROOT"
7368  has_colon=`$ECHO $path | $GREP ^.:`
7369  new_path="$path"
7370  if test "x$has_colon" = x; then
7371    # Not in mixed or Windows style, start by that.
7372    new_path=`cmd //c echo $path`
7373  fi
7374
7375
7376  input_path="$new_path"
7377  # Check if we need to convert this using DOS-style short mode. If the path
7378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7379  # take no chances and rewrite it.
7380  # Note: m4 eats our [], so we need to use [ and ] instead.
7381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7382  if test "x$has_forbidden_chars" != x; then
7383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7385  fi
7386
7387
7388  windows_path="$new_path"
7389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7390    unix_path=`$CYGPATH -u "$windows_path"`
7391    new_path="$unix_path"
7392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7394    new_path="$unix_path"
7395  fi
7396
7397  if test "x$path" != "x$new_path"; then
7398    SRC_ROOT="$new_path"
7399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7400$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7401  fi
7402
7403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7405
7406  else
7407    # We're on a posix platform. Hooray! :)
7408    path="$SRC_ROOT"
7409    has_space=`$ECHO "$path" | $GREP " "`
7410    if test "x$has_space" != x; then
7411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7412$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7413      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7414    fi
7415
7416    # Use eval to expand a potential ~
7417    eval path="$path"
7418    if test ! -f "$path" && test ! -d "$path"; then
7419      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7420    fi
7421
7422    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7423  fi
7424
7425
7426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7427
7428  # Input might be given as Windows format, start by converting to
7429  # unix format.
7430  path="$CURDIR"
7431  new_path=`$CYGPATH -u "$path"`
7432
7433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7436  # "foo.exe" is OK but "foo" is an error.
7437  #
7438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7439  # It is also a way to make sure we got the proper file name for the real test later on.
7440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7441  if test "x$test_shortpath" = x; then
7442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7443$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7444    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7445  fi
7446
7447  # Call helper function which possibly converts this using DOS-style short mode.
7448  # If so, the updated path is stored in $new_path.
7449
7450  input_path="$new_path"
7451  # Check if we need to convert this using DOS-style short mode. If the path
7452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7453  # take no chances and rewrite it.
7454  # Note: m4 eats our [], so we need to use [ and ] instead.
7455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7456  if test "x$has_forbidden_chars" != x; then
7457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7461      # Going to short mode and back again did indeed matter. Since short mode is
7462      # case insensitive, let's make it lowercase to improve readability.
7463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7464      # Now convert it back to Unix-stile (cygpath)
7465      input_path=`$CYGPATH -u "$shortmode_path"`
7466      new_path="$input_path"
7467    fi
7468  fi
7469
7470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7471  if test "x$test_cygdrive_prefix" = x; then
7472    # As a simple fix, exclude /usr/bin since it's not a real path.
7473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7475      # a path prefixed by /cygdrive for fixpath to work.
7476      new_path="$CYGWIN_ROOT_PATH$input_path"
7477    fi
7478  fi
7479
7480
7481  if test "x$path" != "x$new_path"; then
7482    CURDIR="$new_path"
7483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7484$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7485  fi
7486
7487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7488
7489  path="$CURDIR"
7490  has_colon=`$ECHO $path | $GREP ^.:`
7491  new_path="$path"
7492  if test "x$has_colon" = x; then
7493    # Not in mixed or Windows style, start by that.
7494    new_path=`cmd //c echo $path`
7495  fi
7496
7497
7498  input_path="$new_path"
7499  # Check if we need to convert this using DOS-style short mode. If the path
7500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7501  # take no chances and rewrite it.
7502  # Note: m4 eats our [], so we need to use [ and ] instead.
7503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7504  if test "x$has_forbidden_chars" != x; then
7505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7507  fi
7508
7509
7510  windows_path="$new_path"
7511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7512    unix_path=`$CYGPATH -u "$windows_path"`
7513    new_path="$unix_path"
7514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7516    new_path="$unix_path"
7517  fi
7518
7519  if test "x$path" != "x$new_path"; then
7520    CURDIR="$new_path"
7521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7522$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7523  fi
7524
7525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7527
7528  else
7529    # We're on a posix platform. Hooray! :)
7530    path="$CURDIR"
7531    has_space=`$ECHO "$path" | $GREP " "`
7532    if test "x$has_space" != x; then
7533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7534$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7535      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7536    fi
7537
7538    # Use eval to expand a potential ~
7539    eval path="$path"
7540    if test ! -f "$path" && test ! -d "$path"; then
7541      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7542    fi
7543
7544    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7545  fi
7546
7547
7548  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7549    # Add extra search paths on solaris for utilities like ar and as etc...
7550    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7551  fi
7552
7553  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7554  # is not correct.
7555
7556# Check whether --with-sys-root was given.
7557if test "${with_sys_root+set}" = set; then :
7558  withval=$with_sys_root;
7559fi
7560
7561
7562  if test "x$with_sys_root" != x; then
7563    SYS_ROOT=$with_sys_root
7564  else
7565    SYS_ROOT=/
7566  fi
7567
7568
7569
7570# Check whether --with-tools-dir was given.
7571if test "${with_tools_dir+set}" = set; then :
7572  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7573
7574fi
7575
7576
7577
7578# Check whether --with-devkit was given.
7579if test "${with_devkit+set}" = set; then :
7580  withval=$with_devkit;
7581        if test "x$with_sys_root" != x; then
7582          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7583        fi
7584
7585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7586
7587  # Input might be given as Windows format, start by converting to
7588  # unix format.
7589  path="$with_devkit"
7590  new_path=`$CYGPATH -u "$path"`
7591
7592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7595  # "foo.exe" is OK but "foo" is an error.
7596  #
7597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7598  # It is also a way to make sure we got the proper file name for the real test later on.
7599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7600  if test "x$test_shortpath" = x; then
7601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7602$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7603    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7604  fi
7605
7606  # Call helper function which possibly converts this using DOS-style short mode.
7607  # If so, the updated path is stored in $new_path.
7608
7609  input_path="$new_path"
7610  # Check if we need to convert this using DOS-style short mode. If the path
7611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7612  # take no chances and rewrite it.
7613  # Note: m4 eats our [], so we need to use [ and ] instead.
7614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7615  if test "x$has_forbidden_chars" != x; then
7616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7620      # Going to short mode and back again did indeed matter. Since short mode is
7621      # case insensitive, let's make it lowercase to improve readability.
7622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7623      # Now convert it back to Unix-stile (cygpath)
7624      input_path=`$CYGPATH -u "$shortmode_path"`
7625      new_path="$input_path"
7626    fi
7627  fi
7628
7629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7630  if test "x$test_cygdrive_prefix" = x; then
7631    # As a simple fix, exclude /usr/bin since it's not a real path.
7632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7634      # a path prefixed by /cygdrive for fixpath to work.
7635      new_path="$CYGWIN_ROOT_PATH$input_path"
7636    fi
7637  fi
7638
7639
7640  if test "x$path" != "x$new_path"; then
7641    with_devkit="$new_path"
7642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7643$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7644  fi
7645
7646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7647
7648  path="$with_devkit"
7649  has_colon=`$ECHO $path | $GREP ^.:`
7650  new_path="$path"
7651  if test "x$has_colon" = x; then
7652    # Not in mixed or Windows style, start by that.
7653    new_path=`cmd //c echo $path`
7654  fi
7655
7656
7657  input_path="$new_path"
7658  # Check if we need to convert this using DOS-style short mode. If the path
7659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7660  # take no chances and rewrite it.
7661  # Note: m4 eats our [], so we need to use [ and ] instead.
7662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7663  if test "x$has_forbidden_chars" != x; then
7664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7666  fi
7667
7668
7669  windows_path="$new_path"
7670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7671    unix_path=`$CYGPATH -u "$windows_path"`
7672    new_path="$unix_path"
7673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7675    new_path="$unix_path"
7676  fi
7677
7678  if test "x$path" != "x$new_path"; then
7679    with_devkit="$new_path"
7680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7681$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7682  fi
7683
7684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7686
7687  else
7688    # We're on a posix platform. Hooray! :)
7689    path="$with_devkit"
7690    has_space=`$ECHO "$path" | $GREP " "`
7691    if test "x$has_space" != x; then
7692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7693$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7694      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7695    fi
7696
7697    # Use eval to expand a potential ~
7698    eval path="$path"
7699    if test ! -f "$path" && test ! -d "$path"; then
7700      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7701    fi
7702
7703    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7704  fi
7705
7706
7707  if test "x$TOOLS_DIR" = x; then
7708    TOOLS_DIR="$with_devkit/bin"
7709  else
7710    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7711  fi
7712
7713        if test -d "$with_devkit/$host_alias/libc"; then
7714          SYS_ROOT=$with_devkit/$host_alias/libc
7715        elif test -d "$with_devkit/$host/sys-root"; then
7716          SYS_ROOT=$with_devkit/$host/sys-root
7717        fi
7718
7719fi
7720
7721
7722
7723  # Setup default logging of stdout and stderr to build.log in the output root.
7724  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7725  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7726  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7727
7728
7729
7730
7731
7732# Check if it's a pure open build or if custom sources are to be used.
7733
7734  # Check whether --enable-openjdk-only was given.
7735if test "${enable_openjdk_only+set}" = set; then :
7736  enableval=$enable_openjdk_only;
7737else
7738  enable_openjdk_only="no"
7739fi
7740
7741
7742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7743$as_echo_n "checking for presence of closed sources... " >&6; }
7744  if test -d "$SRC_ROOT/jdk/src/closed"; then
7745    CLOSED_SOURCE_PRESENT=yes
7746  else
7747    CLOSED_SOURCE_PRESENT=no
7748  fi
7749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7750$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7751
7752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7753$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7754  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7756$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7757
7758  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7759    OPENJDK=true
7760    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7761      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7762$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7763    fi
7764  else
7765    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7766      OPENJDK=true
7767    else
7768      OPENJDK=false
7769    fi
7770  fi
7771
7772  if test "x$OPENJDK" = "xtrue"; then
7773    SET_OPENJDK="OPENJDK=true"
7774  fi
7775
7776
7777
7778
7779# These are needed to be able to create a configuration name (and thus the output directory)
7780
7781  ###############################################################################
7782  #
7783  # Check which variant of the JDK that we want to build.
7784  # Currently we have:
7785  #    normal:   standard edition
7786  # but the custom make system may add other variants
7787  #
7788  # Effectively the JDK variant gives a name to a specific set of
7789  # modules to compile into the JDK. In the future, these modules
7790  # might even be Jigsaw modules.
7791  #
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7793$as_echo_n "checking which variant of the JDK to build... " >&6; }
7794
7795# Check whether --with-jdk-variant was given.
7796if test "${with_jdk_variant+set}" = set; then :
7797  withval=$with_jdk_variant;
7798fi
7799
7800
7801  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7802    JDK_VARIANT="normal"
7803  else
7804    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7805  fi
7806
7807
7808
7809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7810$as_echo "$JDK_VARIANT" >&6; }
7811
7812
7813
7814  ###############################################################################
7815  #
7816  # Check which variants of the JVM that we want to build.
7817  # Currently we have:
7818  #    server: normal interpreter and a tiered C1/C2 compiler
7819  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7820  #    minimal1: reduced form of client with optional VM services and features stripped out
7821  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7822  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7823  #    zero: no machine code interpreter, no compiler
7824  #    zeroshark: zero interpreter and shark/llvm compiler backend
7825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7826$as_echo_n "checking which variants of the JVM to build... " >&6; }
7827
7828# Check whether --with-jvm-variants was given.
7829if test "${with_jvm_variants+set}" = set; then :
7830  withval=$with_jvm_variants;
7831fi
7832
7833
7834  if test "x$with_jvm_variants" = x; then
7835    with_jvm_variants="server"
7836  fi
7837
7838  JVM_VARIANTS=",$with_jvm_variants,"
7839  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7840
7841  if test "x$TEST_VARIANTS" != "x,"; then
7842    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7843  fi
7844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7845$as_echo "$with_jvm_variants" >&6; }
7846
7847  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7848  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7849  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7850  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7851  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7852  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7853
7854  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7855    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7856      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7857    fi
7858  fi
7859  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7860    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7861      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7862    fi
7863  fi
7864  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7865    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7866      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7867    fi
7868  fi
7869
7870  # Replace the commas with AND for use in the build directory name.
7871  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7872  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7873  if test "x$COUNT_VARIANTS" != "x,1"; then
7874    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7875  else
7876    BUILDING_MULTIPLE_JVM_VARIANTS=no
7877  fi
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887  INCLUDE_SA=true
7888  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7889    INCLUDE_SA=false
7890  fi
7891  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7892    INCLUDE_SA=false
7893  fi
7894
7895
7896  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7897    MACOSX_UNIVERSAL="true"
7898  fi
7899
7900
7901
7902
7903  ###############################################################################
7904  #
7905  # Set the debug level
7906  #    release: no debug information, all optimizations, no asserts.
7907  #    fastdebug: debug information (-g), all optimizations, all asserts
7908  #    slowdebug: debug information (-g), no optimizations, all asserts
7909  #
7910  DEBUG_LEVEL="release"
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7912$as_echo_n "checking which debug level to use... " >&6; }
7913  # Check whether --enable-debug was given.
7914if test "${enable_debug+set}" = set; then :
7915  enableval=$enable_debug;
7916        ENABLE_DEBUG="${enableval}"
7917        DEBUG_LEVEL="fastdebug"
7918
7919else
7920  ENABLE_DEBUG="no"
7921fi
7922
7923
7924
7925# Check whether --with-debug-level was given.
7926if test "${with_debug_level+set}" = set; then :
7927  withval=$with_debug_level;
7928        DEBUG_LEVEL="${withval}"
7929        if test "x$ENABLE_DEBUG" = xyes; then
7930          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7931        fi
7932
7933fi
7934
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7936$as_echo "$DEBUG_LEVEL" >&6; }
7937
7938  if test "x$DEBUG_LEVEL" != xrelease && \
7939      test "x$DEBUG_LEVEL" != xfastdebug && \
7940      test "x$DEBUG_LEVEL" != xslowdebug; then
7941    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7942  fi
7943
7944
7945  ###############################################################################
7946  #
7947  # Setup legacy vars/targets and new vars to deal with different debug levels.
7948  #
7949
7950  case $DEBUG_LEVEL in
7951    release )
7952      VARIANT="OPT"
7953      FASTDEBUG="false"
7954      DEBUG_CLASSFILES="false"
7955      BUILD_VARIANT_RELEASE=""
7956      HOTSPOT_DEBUG_LEVEL="product"
7957      HOTSPOT_EXPORT="product"
7958      ;;
7959    fastdebug )
7960      VARIANT="DBG"
7961      FASTDEBUG="true"
7962      DEBUG_CLASSFILES="true"
7963      BUILD_VARIANT_RELEASE="-fastdebug"
7964      HOTSPOT_DEBUG_LEVEL="fastdebug"
7965      HOTSPOT_EXPORT="fastdebug"
7966      ;;
7967    slowdebug )
7968      VARIANT="DBG"
7969      FASTDEBUG="false"
7970      DEBUG_CLASSFILES="true"
7971      BUILD_VARIANT_RELEASE="-debug"
7972      HOTSPOT_DEBUG_LEVEL="jvmg"
7973      HOTSPOT_EXPORT="debug"
7974      ;;
7975  esac
7976
7977  #####
7978  # Generate the legacy makefile targets for hotspot.
7979  # The hotspot api for selecting the build artifacts, really, needs to be improved.
7980  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7981  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7982  # But until then ...
7983  HOTSPOT_TARGET=""
7984
7985  if test "x$JVM_VARIANT_SERVER" = xtrue; then
7986    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7987  fi
7988
7989  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7990    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7991  fi
7992
7993  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7994    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7995  fi
7996
7997  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7998    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7999  fi
8000
8001  if test "x$JVM_VARIANT_ZERO" = xtrue; then
8002    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8003  fi
8004
8005  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8006    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8007  fi
8008
8009  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8010
8011  # On Macosx universal binaries are produced, but they only contain
8012  # 64 bit intel. This invalidates control of which jvms are built
8013  # from configure, but only server is valid anyway. Fix this
8014  # when hotspot makefiles are rewritten.
8015  if test "x$MACOSX_UNIVERSAL" = xtrue; then
8016    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8017  fi
8018
8019  #####
8020
8021
8022
8023
8024
8025
8026
8027
8028# With basic setup done, call the custom early hook.
8029
8030
8031# To properly create a configuration name, we need to have the OpenJDK target
8032# and options (variants and debug level) parsed.
8033
8034
8035
8036# Check whether --with-conf-name was given.
8037if test "${with_conf_name+set}" = set; then :
8038  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8039fi
8040
8041
8042  # Test from where we are running configure, in or outside of src root.
8043  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8044      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8045      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8046    # We are running configure from the src root.
8047    # Create a default ./build/target-variant-debuglevel output root.
8048    if test "x${CONF_NAME}" = x; then
8049      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8050    fi
8051    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8052    $MKDIR -p "$OUTPUT_ROOT"
8053    if test ! -d "$OUTPUT_ROOT"; then
8054      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8055    fi
8056  else
8057    # We are running configure from outside of the src dir.
8058    # Then use the current directory as output dir!
8059    # If configuration is situated in normal build directory, just use the build
8060    # directory name as configuration name, otherwise use the complete path.
8061    if test "x${CONF_NAME}" = x; then
8062      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8063    fi
8064    OUTPUT_ROOT="$CURDIR"
8065
8066    # WARNING: This might be a bad thing to do. You need to be sure you want to
8067    # have a configuration in this directory. Do some sanity checks!
8068
8069    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8070      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8071      # other files
8072      files_present=`$LS $OUTPUT_ROOT`
8073      # Configure has already touched config.log and confdefs.h in the current dir when this check
8074      # is performed.
8075      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8076      | $TR -d '\n'`
8077      if test "x$filtered_files" != x; then
8078        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8079$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8080        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8081$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8082        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8083$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8084        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8085$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8086        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8087$as_echo "$as_me: seriously mess up just about everything." >&6;}
8088        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8089$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8090        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8091$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8092        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8093      fi
8094    fi
8095  fi
8096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8097$as_echo_n "checking what configuration name to use... " >&6; }
8098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8099$as_echo "$CONF_NAME" >&6; }
8100
8101
8102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8103
8104  # Input might be given as Windows format, start by converting to
8105  # unix format.
8106  path="$OUTPUT_ROOT"
8107  new_path=`$CYGPATH -u "$path"`
8108
8109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8112  # "foo.exe" is OK but "foo" is an error.
8113  #
8114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8115  # It is also a way to make sure we got the proper file name for the real test later on.
8116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8117  if test "x$test_shortpath" = x; then
8118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8119$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8120    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8121  fi
8122
8123  # Call helper function which possibly converts this using DOS-style short mode.
8124  # If so, the updated path is stored in $new_path.
8125
8126  input_path="$new_path"
8127  # Check if we need to convert this using DOS-style short mode. If the path
8128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8129  # take no chances and rewrite it.
8130  # Note: m4 eats our [], so we need to use [ and ] instead.
8131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8132  if test "x$has_forbidden_chars" != x; then
8133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8137      # Going to short mode and back again did indeed matter. Since short mode is
8138      # case insensitive, let's make it lowercase to improve readability.
8139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8140      # Now convert it back to Unix-stile (cygpath)
8141      input_path=`$CYGPATH -u "$shortmode_path"`
8142      new_path="$input_path"
8143    fi
8144  fi
8145
8146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8147  if test "x$test_cygdrive_prefix" = x; then
8148    # As a simple fix, exclude /usr/bin since it's not a real path.
8149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8151      # a path prefixed by /cygdrive for fixpath to work.
8152      new_path="$CYGWIN_ROOT_PATH$input_path"
8153    fi
8154  fi
8155
8156
8157  if test "x$path" != "x$new_path"; then
8158    OUTPUT_ROOT="$new_path"
8159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8160$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8161  fi
8162
8163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8164
8165  path="$OUTPUT_ROOT"
8166  has_colon=`$ECHO $path | $GREP ^.:`
8167  new_path="$path"
8168  if test "x$has_colon" = x; then
8169    # Not in mixed or Windows style, start by that.
8170    new_path=`cmd //c echo $path`
8171  fi
8172
8173
8174  input_path="$new_path"
8175  # Check if we need to convert this using DOS-style short mode. If the path
8176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8177  # take no chances and rewrite it.
8178  # Note: m4 eats our [], so we need to use [ and ] instead.
8179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8180  if test "x$has_forbidden_chars" != x; then
8181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8183  fi
8184
8185
8186  windows_path="$new_path"
8187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8188    unix_path=`$CYGPATH -u "$windows_path"`
8189    new_path="$unix_path"
8190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8192    new_path="$unix_path"
8193  fi
8194
8195  if test "x$path" != "x$new_path"; then
8196    OUTPUT_ROOT="$new_path"
8197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8198$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8199  fi
8200
8201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8203
8204  else
8205    # We're on a posix platform. Hooray! :)
8206    path="$OUTPUT_ROOT"
8207    has_space=`$ECHO "$path" | $GREP " "`
8208    if test "x$has_space" != x; then
8209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8210$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8211      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8212    fi
8213
8214    # Use eval to expand a potential ~
8215    eval path="$path"
8216    if test ! -f "$path" && test ! -d "$path"; then
8217      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8218    fi
8219
8220    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8221  fi
8222
8223
8224  SPEC=$OUTPUT_ROOT/spec.gmk
8225
8226  CONF_NAME=$CONF_NAME
8227
8228  OUTPUT_ROOT=$OUTPUT_ROOT
8229
8230
8231  # Most of the probed defines are put into config.h
8232  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8233
8234  # The spec.gmk file contains all variables for the make system.
8235  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8236
8237  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8238  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8239
8240  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8241  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8242
8243  # The compare.sh is used to compare the build output to other builds.
8244  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8245
8246  # Spec.sh is currently used by compare-objects.sh
8247  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8248
8249  # The generated Makefile knows where the spec.gmk is and where the source is.
8250  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8251  # which will look for generated configurations
8252  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8253
8254
8255  # Save the arguments given to us
8256  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8257
8258
8259# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8260
8261  for ac_prog in apt-get yum port pkgutil pkgadd
8262do
8263  # Extract the first word of "$ac_prog", so it can be a program name with args.
8264set dummy $ac_prog; ac_word=$2
8265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8266$as_echo_n "checking for $ac_word... " >&6; }
8267if ${ac_cv_prog_PKGHANDLER+:} false; then :
8268  $as_echo_n "(cached) " >&6
8269else
8270  if test -n "$PKGHANDLER"; then
8271  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8272else
8273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8274for as_dir in $PATH
8275do
8276  IFS=$as_save_IFS
8277  test -z "$as_dir" && as_dir=.
8278    for ac_exec_ext in '' $ac_executable_extensions; do
8279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8280    ac_cv_prog_PKGHANDLER="$ac_prog"
8281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8282    break 2
8283  fi
8284done
8285  done
8286IFS=$as_save_IFS
8287
8288fi
8289fi
8290PKGHANDLER=$ac_cv_prog_PKGHANDLER
8291if test -n "$PKGHANDLER"; then
8292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8293$as_echo "$PKGHANDLER" >&6; }
8294else
8295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8296$as_echo "no" >&6; }
8297fi
8298
8299
8300  test -n "$PKGHANDLER" && break
8301done
8302
8303
8304
8305# Setup tools that requires more complex handling, or that is not needed by the configure script.
8306
8307
8308  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8309  if test "x$MAKE" != x; then
8310    # User has supplied a make, test it.
8311    if test ! -f "$MAKE"; then
8312      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8313    fi
8314
8315  MAKE_CANDIDATE=""$MAKE""
8316  DESCRIPTION="user supplied MAKE=$MAKE"
8317  if test "x$MAKE_CANDIDATE" != x; then
8318    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8319$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8320    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8321    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8322    if test "x$IS_GNU_MAKE" = x; then
8323      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8324$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8325    else
8326      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
8327      if test "x$IS_MODERN_MAKE" = x; then
8328        { $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
8329$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;}
8330      else
8331        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8332          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8333            MAKE_EXPECTED_ENV='cygwin'
8334          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8335            MAKE_EXPECTED_ENV='msys'
8336          else
8337            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8338          fi
8339          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8340          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8341        else
8342          # Not relevant for non-Windows
8343          IS_MAKE_CORRECT_ENV=true
8344        fi
8345        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8346          { $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
8347$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;}
8348        else
8349          FOUND_MAKE=$MAKE_CANDIDATE
8350
8351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8352
8353  # First separate the path from the arguments. This will split at the first
8354  # space.
8355  complete="$FOUND_MAKE"
8356  path="${complete%% *}"
8357  tmp="$complete EOL"
8358  arguments="${tmp#* }"
8359
8360  # Input might be given as Windows format, start by converting to
8361  # unix format.
8362  new_path=`$CYGPATH -u "$path"`
8363
8364  # Now try to locate executable using which
8365  new_path=`$WHICH "$new_path" 2> /dev/null`
8366  # bat and cmd files are not always considered executable in cygwin causing which
8367  # to not find them
8368  if test "x$new_path" = x \
8369      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8370      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8371    new_path=`$CYGPATH -u "$path"`
8372  fi
8373  if test "x$new_path" = x; then
8374    # Oops. Which didn't find the executable.
8375    # The splitting of arguments from the executable at a space might have been incorrect,
8376    # since paths with space are more likely in Windows. Give it another try with the whole
8377    # argument.
8378    path="$complete"
8379    arguments="EOL"
8380    new_path=`$CYGPATH -u "$path"`
8381    new_path=`$WHICH "$new_path" 2> /dev/null`
8382    # bat and cmd files are not always considered executable in cygwin causing which
8383    # to not find them
8384    if test "x$new_path" = x \
8385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8387      new_path=`$CYGPATH -u "$path"`
8388    fi
8389    if test "x$new_path" = x; then
8390      # It's still not found. Now this is an unrecoverable error.
8391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8392$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8393      has_space=`$ECHO "$complete" | $GREP " "`
8394      if test "x$has_space" != x; then
8395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8397      fi
8398      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8399    fi
8400  fi
8401
8402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8405  # "foo.exe" is OK but "foo" is an error.
8406  #
8407  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8408  # It is also a way to make sure we got the proper file name for the real test later on.
8409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8410  if test "x$test_shortpath" = x; then
8411    # Short path failed, file does not exist as specified.
8412    # Try adding .exe or .cmd
8413    if test -f "${new_path}.exe"; then
8414      input_to_shortpath="${new_path}.exe"
8415    elif test -f "${new_path}.cmd"; then
8416      input_to_shortpath="${new_path}.cmd"
8417    else
8418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8419$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8422      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8423    fi
8424  else
8425    input_to_shortpath="$new_path"
8426  fi
8427
8428  # Call helper function which possibly converts this using DOS-style short mode.
8429  # If so, the updated path is stored in $new_path.
8430  new_path="$input_to_shortpath"
8431
8432  input_path="$input_to_shortpath"
8433  # Check if we need to convert this using DOS-style short mode. If the path
8434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8435  # take no chances and rewrite it.
8436  # Note: m4 eats our [], so we need to use [ and ] instead.
8437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8438  if test "x$has_forbidden_chars" != x; then
8439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8443      # Going to short mode and back again did indeed matter. Since short mode is
8444      # case insensitive, let's make it lowercase to improve readability.
8445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8446      # Now convert it back to Unix-stile (cygpath)
8447      input_path=`$CYGPATH -u "$shortmode_path"`
8448      new_path="$input_path"
8449    fi
8450  fi
8451
8452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8453  if test "x$test_cygdrive_prefix" = x; then
8454    # As a simple fix, exclude /usr/bin since it's not a real path.
8455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8457      # a path prefixed by /cygdrive for fixpath to work.
8458      new_path="$CYGWIN_ROOT_PATH$input_path"
8459    fi
8460  fi
8461
8462  # remove trailing .exe if any
8463  new_path="${new_path/%.exe/}"
8464
8465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8466
8467  # First separate the path from the arguments. This will split at the first
8468  # space.
8469  complete="$FOUND_MAKE"
8470  path="${complete%% *}"
8471  tmp="$complete EOL"
8472  arguments="${tmp#* }"
8473
8474  # Input might be given as Windows format, start by converting to
8475  # unix format.
8476  new_path="$path"
8477
8478  windows_path="$new_path"
8479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8480    unix_path=`$CYGPATH -u "$windows_path"`
8481    new_path="$unix_path"
8482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8484    new_path="$unix_path"
8485  fi
8486
8487
8488  # Now try to locate executable using which
8489  new_path=`$WHICH "$new_path" 2> /dev/null`
8490
8491  if test "x$new_path" = x; then
8492    # Oops. Which didn't find the executable.
8493    # The splitting of arguments from the executable at a space might have been incorrect,
8494    # since paths with space are more likely in Windows. Give it another try with the whole
8495    # argument.
8496    path="$complete"
8497    arguments="EOL"
8498    new_path="$path"
8499
8500  windows_path="$new_path"
8501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8502    unix_path=`$CYGPATH -u "$windows_path"`
8503    new_path="$unix_path"
8504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8506    new_path="$unix_path"
8507  fi
8508
8509
8510    new_path=`$WHICH "$new_path" 2> /dev/null`
8511
8512    if test "x$new_path" = x; then
8513      # It's still not found. Now this is an unrecoverable error.
8514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8515$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8516      has_space=`$ECHO "$complete" | $GREP " "`
8517      if test "x$has_space" != x; then
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8520      fi
8521      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8522    fi
8523  fi
8524
8525  # Now new_path has a complete unix path to the binary
8526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8527    # Keep paths in /bin as-is, but remove trailing .exe if any
8528    new_path="${new_path/%.exe/}"
8529    # Do not save /bin paths to all_fixpath_prefixes!
8530  else
8531    # Not in mixed or Windows style, start by that.
8532    new_path=`cmd //c echo $new_path`
8533
8534  input_path="$new_path"
8535  # Check if we need to convert this using DOS-style short mode. If the path
8536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8537  # take no chances and rewrite it.
8538  # Note: m4 eats our [], so we need to use [ and ] instead.
8539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8540  if test "x$has_forbidden_chars" != x; then
8541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8543  fi
8544
8545    # Output is in $new_path
8546
8547  windows_path="$new_path"
8548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8549    unix_path=`$CYGPATH -u "$windows_path"`
8550    new_path="$unix_path"
8551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8553    new_path="$unix_path"
8554  fi
8555
8556    # remove trailing .exe if any
8557    new_path="${new_path/%.exe/}"
8558
8559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8561  fi
8562
8563  else
8564    # We're on a posix platform. Hooray! :)
8565    # First separate the path from the arguments. This will split at the first
8566    # space.
8567    complete="$FOUND_MAKE"
8568    path="${complete%% *}"
8569    tmp="$complete EOL"
8570    arguments="${tmp#* }"
8571
8572    # Cannot rely on the command "which" here since it doesn't always work.
8573    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8574    if test -z "$is_absolute_path"; then
8575      # Path to executable is not absolute. Find it.
8576      IFS_save="$IFS"
8577      IFS=:
8578      for p in $PATH; do
8579        if test -f "$p/$path" && test -x "$p/$path"; then
8580          new_path="$p/$path"
8581          break
8582        fi
8583      done
8584      IFS="$IFS_save"
8585    else
8586      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8587$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8588      new_path="$path"
8589    fi
8590
8591    if test "x$new_path" = x; then
8592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8593$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8594      has_space=`$ECHO "$complete" | $GREP " "`
8595      if test "x$has_space" != x; then
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8598      fi
8599      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8600    fi
8601  fi
8602
8603  # Now join together the path and the arguments once again
8604  if test "x$arguments" != xEOL; then
8605    new_complete="$new_path ${arguments% *}"
8606  else
8607    new_complete="$new_path"
8608  fi
8609
8610  if test "x$complete" != "x$new_complete"; then
8611    FOUND_MAKE="$new_complete"
8612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8613$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8614  fi
8615
8616        fi
8617      fi
8618    fi
8619  fi
8620
8621    if test "x$FOUND_MAKE" = x; then
8622      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8623    fi
8624  else
8625    # Try our hardest to locate a correct version of GNU make
8626    for ac_prog in gmake
8627do
8628  # Extract the first word of "$ac_prog", so it can be a program name with args.
8629set dummy $ac_prog; ac_word=$2
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8631$as_echo_n "checking for $ac_word... " >&6; }
8632if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8633  $as_echo_n "(cached) " >&6
8634else
8635  case $CHECK_GMAKE in
8636  [\\/]* | ?:[\\/]*)
8637  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8638  ;;
8639  *)
8640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8641for as_dir in $PATH
8642do
8643  IFS=$as_save_IFS
8644  test -z "$as_dir" && as_dir=.
8645    for ac_exec_ext in '' $ac_executable_extensions; do
8646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8647    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8649    break 2
8650  fi
8651done
8652  done
8653IFS=$as_save_IFS
8654
8655  ;;
8656esac
8657fi
8658CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8659if test -n "$CHECK_GMAKE"; then
8660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8661$as_echo "$CHECK_GMAKE" >&6; }
8662else
8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8664$as_echo "no" >&6; }
8665fi
8666
8667
8668  test -n "$CHECK_GMAKE" && break
8669done
8670
8671
8672  MAKE_CANDIDATE=""$CHECK_GMAKE""
8673  DESCRIPTION="gmake in PATH"
8674  if test "x$MAKE_CANDIDATE" != x; then
8675    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8676$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8677    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8678    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8679    if test "x$IS_GNU_MAKE" = x; then
8680      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8681$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8682    else
8683      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
8684      if test "x$IS_MODERN_MAKE" = x; then
8685        { $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
8686$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;}
8687      else
8688        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8689          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8690            MAKE_EXPECTED_ENV='cygwin'
8691          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8692            MAKE_EXPECTED_ENV='msys'
8693          else
8694            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8695          fi
8696          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8697          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8698        else
8699          # Not relevant for non-Windows
8700          IS_MAKE_CORRECT_ENV=true
8701        fi
8702        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8703          { $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
8704$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;}
8705        else
8706          FOUND_MAKE=$MAKE_CANDIDATE
8707
8708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8709
8710  # First separate the path from the arguments. This will split at the first
8711  # space.
8712  complete="$FOUND_MAKE"
8713  path="${complete%% *}"
8714  tmp="$complete EOL"
8715  arguments="${tmp#* }"
8716
8717  # Input might be given as Windows format, start by converting to
8718  # unix format.
8719  new_path=`$CYGPATH -u "$path"`
8720
8721  # Now try to locate executable using which
8722  new_path=`$WHICH "$new_path" 2> /dev/null`
8723  # bat and cmd files are not always considered executable in cygwin causing which
8724  # to not find them
8725  if test "x$new_path" = x \
8726      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8727      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8728    new_path=`$CYGPATH -u "$path"`
8729  fi
8730  if test "x$new_path" = x; then
8731    # Oops. Which didn't find the executable.
8732    # The splitting of arguments from the executable at a space might have been incorrect,
8733    # since paths with space are more likely in Windows. Give it another try with the whole
8734    # argument.
8735    path="$complete"
8736    arguments="EOL"
8737    new_path=`$CYGPATH -u "$path"`
8738    new_path=`$WHICH "$new_path" 2> /dev/null`
8739    # bat and cmd files are not always considered executable in cygwin causing which
8740    # to not find them
8741    if test "x$new_path" = x \
8742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8744      new_path=`$CYGPATH -u "$path"`
8745    fi
8746    if test "x$new_path" = x; then
8747      # It's still not found. Now this is an unrecoverable error.
8748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8750      has_space=`$ECHO "$complete" | $GREP " "`
8751      if test "x$has_space" != x; then
8752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8754      fi
8755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8756    fi
8757  fi
8758
8759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8762  # "foo.exe" is OK but "foo" is an error.
8763  #
8764  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8765  # It is also a way to make sure we got the proper file name for the real test later on.
8766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8767  if test "x$test_shortpath" = x; then
8768    # Short path failed, file does not exist as specified.
8769    # Try adding .exe or .cmd
8770    if test -f "${new_path}.exe"; then
8771      input_to_shortpath="${new_path}.exe"
8772    elif test -f "${new_path}.cmd"; then
8773      input_to_shortpath="${new_path}.cmd"
8774    else
8775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8776$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8779      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8780    fi
8781  else
8782    input_to_shortpath="$new_path"
8783  fi
8784
8785  # Call helper function which possibly converts this using DOS-style short mode.
8786  # If so, the updated path is stored in $new_path.
8787  new_path="$input_to_shortpath"
8788
8789  input_path="$input_to_shortpath"
8790  # Check if we need to convert this using DOS-style short mode. If the path
8791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8792  # take no chances and rewrite it.
8793  # Note: m4 eats our [], so we need to use [ and ] instead.
8794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8795  if test "x$has_forbidden_chars" != x; then
8796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8800      # Going to short mode and back again did indeed matter. Since short mode is
8801      # case insensitive, let's make it lowercase to improve readability.
8802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8803      # Now convert it back to Unix-stile (cygpath)
8804      input_path=`$CYGPATH -u "$shortmode_path"`
8805      new_path="$input_path"
8806    fi
8807  fi
8808
8809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8810  if test "x$test_cygdrive_prefix" = x; then
8811    # As a simple fix, exclude /usr/bin since it's not a real path.
8812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8814      # a path prefixed by /cygdrive for fixpath to work.
8815      new_path="$CYGWIN_ROOT_PATH$input_path"
8816    fi
8817  fi
8818
8819  # remove trailing .exe if any
8820  new_path="${new_path/%.exe/}"
8821
8822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8823
8824  # First separate the path from the arguments. This will split at the first
8825  # space.
8826  complete="$FOUND_MAKE"
8827  path="${complete%% *}"
8828  tmp="$complete EOL"
8829  arguments="${tmp#* }"
8830
8831  # Input might be given as Windows format, start by converting to
8832  # unix format.
8833  new_path="$path"
8834
8835  windows_path="$new_path"
8836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8837    unix_path=`$CYGPATH -u "$windows_path"`
8838    new_path="$unix_path"
8839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8841    new_path="$unix_path"
8842  fi
8843
8844
8845  # Now try to locate executable using which
8846  new_path=`$WHICH "$new_path" 2> /dev/null`
8847
8848  if test "x$new_path" = x; then
8849    # Oops. Which didn't find the executable.
8850    # The splitting of arguments from the executable at a space might have been incorrect,
8851    # since paths with space are more likely in Windows. Give it another try with the whole
8852    # argument.
8853    path="$complete"
8854    arguments="EOL"
8855    new_path="$path"
8856
8857  windows_path="$new_path"
8858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8859    unix_path=`$CYGPATH -u "$windows_path"`
8860    new_path="$unix_path"
8861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8863    new_path="$unix_path"
8864  fi
8865
8866
8867    new_path=`$WHICH "$new_path" 2> /dev/null`
8868
8869    if test "x$new_path" = x; then
8870      # It's still not found. Now this is an unrecoverable error.
8871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8872$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8873      has_space=`$ECHO "$complete" | $GREP " "`
8874      if test "x$has_space" != x; then
8875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8877      fi
8878      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8879    fi
8880  fi
8881
8882  # Now new_path has a complete unix path to the binary
8883  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8884    # Keep paths in /bin as-is, but remove trailing .exe if any
8885    new_path="${new_path/%.exe/}"
8886    # Do not save /bin paths to all_fixpath_prefixes!
8887  else
8888    # Not in mixed or Windows style, start by that.
8889    new_path=`cmd //c echo $new_path`
8890
8891  input_path="$new_path"
8892  # Check if we need to convert this using DOS-style short mode. If the path
8893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8894  # take no chances and rewrite it.
8895  # Note: m4 eats our [], so we need to use [ and ] instead.
8896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8897  if test "x$has_forbidden_chars" != x; then
8898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8900  fi
8901
8902    # Output is in $new_path
8903
8904  windows_path="$new_path"
8905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8906    unix_path=`$CYGPATH -u "$windows_path"`
8907    new_path="$unix_path"
8908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8910    new_path="$unix_path"
8911  fi
8912
8913    # remove trailing .exe if any
8914    new_path="${new_path/%.exe/}"
8915
8916    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8917    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8918  fi
8919
8920  else
8921    # We're on a posix platform. Hooray! :)
8922    # First separate the path from the arguments. This will split at the first
8923    # space.
8924    complete="$FOUND_MAKE"
8925    path="${complete%% *}"
8926    tmp="$complete EOL"
8927    arguments="${tmp#* }"
8928
8929    # Cannot rely on the command "which" here since it doesn't always work.
8930    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8931    if test -z "$is_absolute_path"; then
8932      # Path to executable is not absolute. Find it.
8933      IFS_save="$IFS"
8934      IFS=:
8935      for p in $PATH; do
8936        if test -f "$p/$path" && test -x "$p/$path"; then
8937          new_path="$p/$path"
8938          break
8939        fi
8940      done
8941      IFS="$IFS_save"
8942    else
8943      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8944$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8945      new_path="$path"
8946    fi
8947
8948    if test "x$new_path" = x; then
8949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8950$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8951      has_space=`$ECHO "$complete" | $GREP " "`
8952      if test "x$has_space" != x; then
8953        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8955      fi
8956      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8957    fi
8958  fi
8959
8960  # Now join together the path and the arguments once again
8961  if test "x$arguments" != xEOL; then
8962    new_complete="$new_path ${arguments% *}"
8963  else
8964    new_complete="$new_path"
8965  fi
8966
8967  if test "x$complete" != "x$new_complete"; then
8968    FOUND_MAKE="$new_complete"
8969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8970$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8971  fi
8972
8973        fi
8974      fi
8975    fi
8976  fi
8977
8978
8979    if test "x$FOUND_MAKE" = x; then
8980      for ac_prog in make
8981do
8982  # Extract the first word of "$ac_prog", so it can be a program name with args.
8983set dummy $ac_prog; ac_word=$2
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8985$as_echo_n "checking for $ac_word... " >&6; }
8986if ${ac_cv_path_CHECK_MAKE+:} false; then :
8987  $as_echo_n "(cached) " >&6
8988else
8989  case $CHECK_MAKE in
8990  [\\/]* | ?:[\\/]*)
8991  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8992  ;;
8993  *)
8994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8995for as_dir in $PATH
8996do
8997  IFS=$as_save_IFS
8998  test -z "$as_dir" && as_dir=.
8999    for ac_exec_ext in '' $ac_executable_extensions; do
9000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9001    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9003    break 2
9004  fi
9005done
9006  done
9007IFS=$as_save_IFS
9008
9009  ;;
9010esac
9011fi
9012CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9013if test -n "$CHECK_MAKE"; then
9014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9015$as_echo "$CHECK_MAKE" >&6; }
9016else
9017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9018$as_echo "no" >&6; }
9019fi
9020
9021
9022  test -n "$CHECK_MAKE" && break
9023done
9024
9025
9026  MAKE_CANDIDATE=""$CHECK_MAKE""
9027  DESCRIPTION="make in PATH"
9028  if test "x$MAKE_CANDIDATE" != x; then
9029    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9030$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9031    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9032    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9033    if test "x$IS_GNU_MAKE" = x; then
9034      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9035$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9036    else
9037      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9038      if test "x$IS_MODERN_MAKE" = x; then
9039        { $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
9040$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;}
9041      else
9042        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9043          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9044            MAKE_EXPECTED_ENV='cygwin'
9045          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9046            MAKE_EXPECTED_ENV='msys'
9047          else
9048            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9049          fi
9050          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9051          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9052        else
9053          # Not relevant for non-Windows
9054          IS_MAKE_CORRECT_ENV=true
9055        fi
9056        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9057          { $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
9058$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;}
9059        else
9060          FOUND_MAKE=$MAKE_CANDIDATE
9061
9062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9063
9064  # First separate the path from the arguments. This will split at the first
9065  # space.
9066  complete="$FOUND_MAKE"
9067  path="${complete%% *}"
9068  tmp="$complete EOL"
9069  arguments="${tmp#* }"
9070
9071  # Input might be given as Windows format, start by converting to
9072  # unix format.
9073  new_path=`$CYGPATH -u "$path"`
9074
9075  # Now try to locate executable using which
9076  new_path=`$WHICH "$new_path" 2> /dev/null`
9077  # bat and cmd files are not always considered executable in cygwin causing which
9078  # to not find them
9079  if test "x$new_path" = x \
9080      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9081      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9082    new_path=`$CYGPATH -u "$path"`
9083  fi
9084  if test "x$new_path" = x; then
9085    # Oops. Which didn't find the executable.
9086    # The splitting of arguments from the executable at a space might have been incorrect,
9087    # since paths with space are more likely in Windows. Give it another try with the whole
9088    # argument.
9089    path="$complete"
9090    arguments="EOL"
9091    new_path=`$CYGPATH -u "$path"`
9092    new_path=`$WHICH "$new_path" 2> /dev/null`
9093    # bat and cmd files are not always considered executable in cygwin causing which
9094    # to not find them
9095    if test "x$new_path" = x \
9096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9098      new_path=`$CYGPATH -u "$path"`
9099    fi
9100    if test "x$new_path" = x; then
9101      # It's still not found. Now this is an unrecoverable error.
9102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9103$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9104      has_space=`$ECHO "$complete" | $GREP " "`
9105      if test "x$has_space" != x; then
9106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9108      fi
9109      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9110    fi
9111  fi
9112
9113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9116  # "foo.exe" is OK but "foo" is an error.
9117  #
9118  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9119  # It is also a way to make sure we got the proper file name for the real test later on.
9120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9121  if test "x$test_shortpath" = x; then
9122    # Short path failed, file does not exist as specified.
9123    # Try adding .exe or .cmd
9124    if test -f "${new_path}.exe"; then
9125      input_to_shortpath="${new_path}.exe"
9126    elif test -f "${new_path}.cmd"; then
9127      input_to_shortpath="${new_path}.cmd"
9128    else
9129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9130$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9131      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9132$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9133      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9134    fi
9135  else
9136    input_to_shortpath="$new_path"
9137  fi
9138
9139  # Call helper function which possibly converts this using DOS-style short mode.
9140  # If so, the updated path is stored in $new_path.
9141  new_path="$input_to_shortpath"
9142
9143  input_path="$input_to_shortpath"
9144  # Check if we need to convert this using DOS-style short mode. If the path
9145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9146  # take no chances and rewrite it.
9147  # Note: m4 eats our [], so we need to use [ and ] instead.
9148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9149  if test "x$has_forbidden_chars" != x; then
9150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9154      # Going to short mode and back again did indeed matter. Since short mode is
9155      # case insensitive, let's make it lowercase to improve readability.
9156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9157      # Now convert it back to Unix-stile (cygpath)
9158      input_path=`$CYGPATH -u "$shortmode_path"`
9159      new_path="$input_path"
9160    fi
9161  fi
9162
9163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9164  if test "x$test_cygdrive_prefix" = x; then
9165    # As a simple fix, exclude /usr/bin since it's not a real path.
9166    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9168      # a path prefixed by /cygdrive for fixpath to work.
9169      new_path="$CYGWIN_ROOT_PATH$input_path"
9170    fi
9171  fi
9172
9173  # remove trailing .exe if any
9174  new_path="${new_path/%.exe/}"
9175
9176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9177
9178  # First separate the path from the arguments. This will split at the first
9179  # space.
9180  complete="$FOUND_MAKE"
9181  path="${complete%% *}"
9182  tmp="$complete EOL"
9183  arguments="${tmp#* }"
9184
9185  # Input might be given as Windows format, start by converting to
9186  # unix format.
9187  new_path="$path"
9188
9189  windows_path="$new_path"
9190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9191    unix_path=`$CYGPATH -u "$windows_path"`
9192    new_path="$unix_path"
9193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9195    new_path="$unix_path"
9196  fi
9197
9198
9199  # Now try to locate executable using which
9200  new_path=`$WHICH "$new_path" 2> /dev/null`
9201
9202  if test "x$new_path" = x; then
9203    # Oops. Which didn't find the executable.
9204    # The splitting of arguments from the executable at a space might have been incorrect,
9205    # since paths with space are more likely in Windows. Give it another try with the whole
9206    # argument.
9207    path="$complete"
9208    arguments="EOL"
9209    new_path="$path"
9210
9211  windows_path="$new_path"
9212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9213    unix_path=`$CYGPATH -u "$windows_path"`
9214    new_path="$unix_path"
9215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9217    new_path="$unix_path"
9218  fi
9219
9220
9221    new_path=`$WHICH "$new_path" 2> /dev/null`
9222
9223    if test "x$new_path" = x; then
9224      # It's still not found. Now this is an unrecoverable error.
9225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9227      has_space=`$ECHO "$complete" | $GREP " "`
9228      if test "x$has_space" != x; then
9229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9231      fi
9232      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9233    fi
9234  fi
9235
9236  # Now new_path has a complete unix path to the binary
9237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9238    # Keep paths in /bin as-is, but remove trailing .exe if any
9239    new_path="${new_path/%.exe/}"
9240    # Do not save /bin paths to all_fixpath_prefixes!
9241  else
9242    # Not in mixed or Windows style, start by that.
9243    new_path=`cmd //c echo $new_path`
9244
9245  input_path="$new_path"
9246  # Check if we need to convert this using DOS-style short mode. If the path
9247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9248  # take no chances and rewrite it.
9249  # Note: m4 eats our [], so we need to use [ and ] instead.
9250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9251  if test "x$has_forbidden_chars" != x; then
9252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9254  fi
9255
9256    # Output is in $new_path
9257
9258  windows_path="$new_path"
9259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9260    unix_path=`$CYGPATH -u "$windows_path"`
9261    new_path="$unix_path"
9262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9264    new_path="$unix_path"
9265  fi
9266
9267    # remove trailing .exe if any
9268    new_path="${new_path/%.exe/}"
9269
9270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9272  fi
9273
9274  else
9275    # We're on a posix platform. Hooray! :)
9276    # First separate the path from the arguments. This will split at the first
9277    # space.
9278    complete="$FOUND_MAKE"
9279    path="${complete%% *}"
9280    tmp="$complete EOL"
9281    arguments="${tmp#* }"
9282
9283    # Cannot rely on the command "which" here since it doesn't always work.
9284    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9285    if test -z "$is_absolute_path"; then
9286      # Path to executable is not absolute. Find it.
9287      IFS_save="$IFS"
9288      IFS=:
9289      for p in $PATH; do
9290        if test -f "$p/$path" && test -x "$p/$path"; then
9291          new_path="$p/$path"
9292          break
9293        fi
9294      done
9295      IFS="$IFS_save"
9296    else
9297      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9298$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9299      new_path="$path"
9300    fi
9301
9302    if test "x$new_path" = x; then
9303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9304$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9305      has_space=`$ECHO "$complete" | $GREP " "`
9306      if test "x$has_space" != x; then
9307        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9309      fi
9310      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9311    fi
9312  fi
9313
9314  # Now join together the path and the arguments once again
9315  if test "x$arguments" != xEOL; then
9316    new_complete="$new_path ${arguments% *}"
9317  else
9318    new_complete="$new_path"
9319  fi
9320
9321  if test "x$complete" != "x$new_complete"; then
9322    FOUND_MAKE="$new_complete"
9323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9324$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9325  fi
9326
9327        fi
9328      fi
9329    fi
9330  fi
9331
9332    fi
9333
9334    if test "x$FOUND_MAKE" = x; then
9335      if test "x$TOOLS_DIR" != x; then
9336        # We have a tools-dir, check that as well before giving up.
9337        OLD_PATH=$PATH
9338        PATH=$TOOLS_DIR:$PATH
9339        for ac_prog in gmake
9340do
9341  # Extract the first word of "$ac_prog", so it can be a program name with args.
9342set dummy $ac_prog; ac_word=$2
9343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9344$as_echo_n "checking for $ac_word... " >&6; }
9345if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9346  $as_echo_n "(cached) " >&6
9347else
9348  case $CHECK_TOOLSDIR_GMAKE in
9349  [\\/]* | ?:[\\/]*)
9350  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9351  ;;
9352  *)
9353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9354for as_dir in $PATH
9355do
9356  IFS=$as_save_IFS
9357  test -z "$as_dir" && as_dir=.
9358    for ac_exec_ext in '' $ac_executable_extensions; do
9359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9360    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9362    break 2
9363  fi
9364done
9365  done
9366IFS=$as_save_IFS
9367
9368  ;;
9369esac
9370fi
9371CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9372if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9374$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9375else
9376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
9378fi
9379
9380
9381  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9382done
9383
9384
9385  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9386  DESCRIPTION="gmake in tools-dir"
9387  if test "x$MAKE_CANDIDATE" != x; then
9388    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9389$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9390    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9391    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9392    if test "x$IS_GNU_MAKE" = x; then
9393      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9394$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9395    else
9396      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9397      if test "x$IS_MODERN_MAKE" = x; then
9398        { $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
9399$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;}
9400      else
9401        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9402          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9403            MAKE_EXPECTED_ENV='cygwin'
9404          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9405            MAKE_EXPECTED_ENV='msys'
9406          else
9407            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9408          fi
9409          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9410          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9411        else
9412          # Not relevant for non-Windows
9413          IS_MAKE_CORRECT_ENV=true
9414        fi
9415        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9416          { $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
9417$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;}
9418        else
9419          FOUND_MAKE=$MAKE_CANDIDATE
9420
9421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9422
9423  # First separate the path from the arguments. This will split at the first
9424  # space.
9425  complete="$FOUND_MAKE"
9426  path="${complete%% *}"
9427  tmp="$complete EOL"
9428  arguments="${tmp#* }"
9429
9430  # Input might be given as Windows format, start by converting to
9431  # unix format.
9432  new_path=`$CYGPATH -u "$path"`
9433
9434  # Now try to locate executable using which
9435  new_path=`$WHICH "$new_path" 2> /dev/null`
9436  # bat and cmd files are not always considered executable in cygwin causing which
9437  # to not find them
9438  if test "x$new_path" = x \
9439      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9440      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9441    new_path=`$CYGPATH -u "$path"`
9442  fi
9443  if test "x$new_path" = x; then
9444    # Oops. Which didn't find the executable.
9445    # The splitting of arguments from the executable at a space might have been incorrect,
9446    # since paths with space are more likely in Windows. Give it another try with the whole
9447    # argument.
9448    path="$complete"
9449    arguments="EOL"
9450    new_path=`$CYGPATH -u "$path"`
9451    new_path=`$WHICH "$new_path" 2> /dev/null`
9452    # bat and cmd files are not always considered executable in cygwin causing which
9453    # to not find them
9454    if test "x$new_path" = x \
9455        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9456        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9457      new_path=`$CYGPATH -u "$path"`
9458    fi
9459    if test "x$new_path" = x; then
9460      # It's still not found. Now this is an unrecoverable error.
9461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9462$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9463      has_space=`$ECHO "$complete" | $GREP " "`
9464      if test "x$has_space" != x; then
9465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9467      fi
9468      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9469    fi
9470  fi
9471
9472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9475  # "foo.exe" is OK but "foo" is an error.
9476  #
9477  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9478  # It is also a way to make sure we got the proper file name for the real test later on.
9479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9480  if test "x$test_shortpath" = x; then
9481    # Short path failed, file does not exist as specified.
9482    # Try adding .exe or .cmd
9483    if test -f "${new_path}.exe"; then
9484      input_to_shortpath="${new_path}.exe"
9485    elif test -f "${new_path}.cmd"; then
9486      input_to_shortpath="${new_path}.cmd"
9487    else
9488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9490      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9491$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9492      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9493    fi
9494  else
9495    input_to_shortpath="$new_path"
9496  fi
9497
9498  # Call helper function which possibly converts this using DOS-style short mode.
9499  # If so, the updated path is stored in $new_path.
9500  new_path="$input_to_shortpath"
9501
9502  input_path="$input_to_shortpath"
9503  # Check if we need to convert this using DOS-style short mode. If the path
9504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9505  # take no chances and rewrite it.
9506  # Note: m4 eats our [], so we need to use [ and ] instead.
9507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9508  if test "x$has_forbidden_chars" != x; then
9509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9513      # Going to short mode and back again did indeed matter. Since short mode is
9514      # case insensitive, let's make it lowercase to improve readability.
9515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9516      # Now convert it back to Unix-stile (cygpath)
9517      input_path=`$CYGPATH -u "$shortmode_path"`
9518      new_path="$input_path"
9519    fi
9520  fi
9521
9522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9523  if test "x$test_cygdrive_prefix" = x; then
9524    # As a simple fix, exclude /usr/bin since it's not a real path.
9525    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9527      # a path prefixed by /cygdrive for fixpath to work.
9528      new_path="$CYGWIN_ROOT_PATH$input_path"
9529    fi
9530  fi
9531
9532  # remove trailing .exe if any
9533  new_path="${new_path/%.exe/}"
9534
9535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9536
9537  # First separate the path from the arguments. This will split at the first
9538  # space.
9539  complete="$FOUND_MAKE"
9540  path="${complete%% *}"
9541  tmp="$complete EOL"
9542  arguments="${tmp#* }"
9543
9544  # Input might be given as Windows format, start by converting to
9545  # unix format.
9546  new_path="$path"
9547
9548  windows_path="$new_path"
9549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9550    unix_path=`$CYGPATH -u "$windows_path"`
9551    new_path="$unix_path"
9552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9554    new_path="$unix_path"
9555  fi
9556
9557
9558  # Now try to locate executable using which
9559  new_path=`$WHICH "$new_path" 2> /dev/null`
9560
9561  if test "x$new_path" = x; then
9562    # Oops. Which didn't find the executable.
9563    # The splitting of arguments from the executable at a space might have been incorrect,
9564    # since paths with space are more likely in Windows. Give it another try with the whole
9565    # argument.
9566    path="$complete"
9567    arguments="EOL"
9568    new_path="$path"
9569
9570  windows_path="$new_path"
9571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9572    unix_path=`$CYGPATH -u "$windows_path"`
9573    new_path="$unix_path"
9574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9576    new_path="$unix_path"
9577  fi
9578
9579
9580    new_path=`$WHICH "$new_path" 2> /dev/null`
9581
9582    if test "x$new_path" = x; then
9583      # It's still not found. Now this is an unrecoverable error.
9584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9585$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9586      has_space=`$ECHO "$complete" | $GREP " "`
9587      if test "x$has_space" != x; then
9588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9590      fi
9591      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9592    fi
9593  fi
9594
9595  # Now new_path has a complete unix path to the binary
9596  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9597    # Keep paths in /bin as-is, but remove trailing .exe if any
9598    new_path="${new_path/%.exe/}"
9599    # Do not save /bin paths to all_fixpath_prefixes!
9600  else
9601    # Not in mixed or Windows style, start by that.
9602    new_path=`cmd //c echo $new_path`
9603
9604  input_path="$new_path"
9605  # Check if we need to convert this using DOS-style short mode. If the path
9606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9607  # take no chances and rewrite it.
9608  # Note: m4 eats our [], so we need to use [ and ] instead.
9609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9610  if test "x$has_forbidden_chars" != x; then
9611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9613  fi
9614
9615    # Output is in $new_path
9616
9617  windows_path="$new_path"
9618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9619    unix_path=`$CYGPATH -u "$windows_path"`
9620    new_path="$unix_path"
9621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9623    new_path="$unix_path"
9624  fi
9625
9626    # remove trailing .exe if any
9627    new_path="${new_path/%.exe/}"
9628
9629    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9630    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9631  fi
9632
9633  else
9634    # We're on a posix platform. Hooray! :)
9635    # First separate the path from the arguments. This will split at the first
9636    # space.
9637    complete="$FOUND_MAKE"
9638    path="${complete%% *}"
9639    tmp="$complete EOL"
9640    arguments="${tmp#* }"
9641
9642    # Cannot rely on the command "which" here since it doesn't always work.
9643    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9644    if test -z "$is_absolute_path"; then
9645      # Path to executable is not absolute. Find it.
9646      IFS_save="$IFS"
9647      IFS=:
9648      for p in $PATH; do
9649        if test -f "$p/$path" && test -x "$p/$path"; then
9650          new_path="$p/$path"
9651          break
9652        fi
9653      done
9654      IFS="$IFS_save"
9655    else
9656      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9657$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9658      new_path="$path"
9659    fi
9660
9661    if test "x$new_path" = x; then
9662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9663$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9664      has_space=`$ECHO "$complete" | $GREP " "`
9665      if test "x$has_space" != x; then
9666        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9668      fi
9669      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9670    fi
9671  fi
9672
9673  # Now join together the path and the arguments once again
9674  if test "x$arguments" != xEOL; then
9675    new_complete="$new_path ${arguments% *}"
9676  else
9677    new_complete="$new_path"
9678  fi
9679
9680  if test "x$complete" != "x$new_complete"; then
9681    FOUND_MAKE="$new_complete"
9682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9683$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9684  fi
9685
9686        fi
9687      fi
9688    fi
9689  fi
9690
9691        if test "x$FOUND_MAKE" = x; then
9692          for ac_prog in make
9693do
9694  # Extract the first word of "$ac_prog", so it can be a program name with args.
9695set dummy $ac_prog; ac_word=$2
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9697$as_echo_n "checking for $ac_word... " >&6; }
9698if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9699  $as_echo_n "(cached) " >&6
9700else
9701  case $CHECK_TOOLSDIR_MAKE in
9702  [\\/]* | ?:[\\/]*)
9703  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9704  ;;
9705  *)
9706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9707for as_dir in $PATH
9708do
9709  IFS=$as_save_IFS
9710  test -z "$as_dir" && as_dir=.
9711    for ac_exec_ext in '' $ac_executable_extensions; do
9712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9713    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9715    break 2
9716  fi
9717done
9718  done
9719IFS=$as_save_IFS
9720
9721  ;;
9722esac
9723fi
9724CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9725if test -n "$CHECK_TOOLSDIR_MAKE"; then
9726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9727$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9728else
9729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9730$as_echo "no" >&6; }
9731fi
9732
9733
9734  test -n "$CHECK_TOOLSDIR_MAKE" && break
9735done
9736
9737
9738  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9739  DESCRIPTION="make in tools-dir"
9740  if test "x$MAKE_CANDIDATE" != x; then
9741    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9742$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9743    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9744    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9745    if test "x$IS_GNU_MAKE" = x; then
9746      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9747$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9748    else
9749      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[12]\)\|\(4\.\)'`
9750      if test "x$IS_MODERN_MAKE" = x; then
9751        { $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
9752$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;}
9753      else
9754        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9755          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9756            MAKE_EXPECTED_ENV='cygwin'
9757          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9758            MAKE_EXPECTED_ENV='msys'
9759          else
9760            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9761          fi
9762          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9763          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9764        else
9765          # Not relevant for non-Windows
9766          IS_MAKE_CORRECT_ENV=true
9767        fi
9768        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9769          { $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
9770$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;}
9771        else
9772          FOUND_MAKE=$MAKE_CANDIDATE
9773
9774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9775
9776  # First separate the path from the arguments. This will split at the first
9777  # space.
9778  complete="$FOUND_MAKE"
9779  path="${complete%% *}"
9780  tmp="$complete EOL"
9781  arguments="${tmp#* }"
9782
9783  # Input might be given as Windows format, start by converting to
9784  # unix format.
9785  new_path=`$CYGPATH -u "$path"`
9786
9787  # Now try to locate executable using which
9788  new_path=`$WHICH "$new_path" 2> /dev/null`
9789  # bat and cmd files are not always considered executable in cygwin causing which
9790  # to not find them
9791  if test "x$new_path" = x \
9792      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9793      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9794    new_path=`$CYGPATH -u "$path"`
9795  fi
9796  if test "x$new_path" = x; then
9797    # Oops. Which didn't find the executable.
9798    # The splitting of arguments from the executable at a space might have been incorrect,
9799    # since paths with space are more likely in Windows. Give it another try with the whole
9800    # argument.
9801    path="$complete"
9802    arguments="EOL"
9803    new_path=`$CYGPATH -u "$path"`
9804    new_path=`$WHICH "$new_path" 2> /dev/null`
9805    # bat and cmd files are not always considered executable in cygwin causing which
9806    # to not find them
9807    if test "x$new_path" = x \
9808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9810      new_path=`$CYGPATH -u "$path"`
9811    fi
9812    if test "x$new_path" = x; then
9813      # It's still not found. Now this is an unrecoverable error.
9814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9815$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9816      has_space=`$ECHO "$complete" | $GREP " "`
9817      if test "x$has_space" != x; then
9818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9820      fi
9821      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9822    fi
9823  fi
9824
9825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9828  # "foo.exe" is OK but "foo" is an error.
9829  #
9830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9831  # It is also a way to make sure we got the proper file name for the real test later on.
9832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9833  if test "x$test_shortpath" = x; then
9834    # Short path failed, file does not exist as specified.
9835    # Try adding .exe or .cmd
9836    if test -f "${new_path}.exe"; then
9837      input_to_shortpath="${new_path}.exe"
9838    elif test -f "${new_path}.cmd"; then
9839      input_to_shortpath="${new_path}.cmd"
9840    else
9841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9842$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9845      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9846    fi
9847  else
9848    input_to_shortpath="$new_path"
9849  fi
9850
9851  # Call helper function which possibly converts this using DOS-style short mode.
9852  # If so, the updated path is stored in $new_path.
9853  new_path="$input_to_shortpath"
9854
9855  input_path="$input_to_shortpath"
9856  # Check if we need to convert this using DOS-style short mode. If the path
9857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9858  # take no chances and rewrite it.
9859  # Note: m4 eats our [], so we need to use [ and ] instead.
9860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9861  if test "x$has_forbidden_chars" != x; then
9862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9866      # Going to short mode and back again did indeed matter. Since short mode is
9867      # case insensitive, let's make it lowercase to improve readability.
9868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9869      # Now convert it back to Unix-stile (cygpath)
9870      input_path=`$CYGPATH -u "$shortmode_path"`
9871      new_path="$input_path"
9872    fi
9873  fi
9874
9875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9876  if test "x$test_cygdrive_prefix" = x; then
9877    # As a simple fix, exclude /usr/bin since it's not a real path.
9878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9880      # a path prefixed by /cygdrive for fixpath to work.
9881      new_path="$CYGWIN_ROOT_PATH$input_path"
9882    fi
9883  fi
9884
9885  # remove trailing .exe if any
9886  new_path="${new_path/%.exe/}"
9887
9888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9889
9890  # First separate the path from the arguments. This will split at the first
9891  # space.
9892  complete="$FOUND_MAKE"
9893  path="${complete%% *}"
9894  tmp="$complete EOL"
9895  arguments="${tmp#* }"
9896
9897  # Input might be given as Windows format, start by converting to
9898  # unix format.
9899  new_path="$path"
9900
9901  windows_path="$new_path"
9902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9903    unix_path=`$CYGPATH -u "$windows_path"`
9904    new_path="$unix_path"
9905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9907    new_path="$unix_path"
9908  fi
9909
9910
9911  # Now try to locate executable using which
9912  new_path=`$WHICH "$new_path" 2> /dev/null`
9913
9914  if test "x$new_path" = x; then
9915    # Oops. Which didn't find the executable.
9916    # The splitting of arguments from the executable at a space might have been incorrect,
9917    # since paths with space are more likely in Windows. Give it another try with the whole
9918    # argument.
9919    path="$complete"
9920    arguments="EOL"
9921    new_path="$path"
9922
9923  windows_path="$new_path"
9924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9925    unix_path=`$CYGPATH -u "$windows_path"`
9926    new_path="$unix_path"
9927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9929    new_path="$unix_path"
9930  fi
9931
9932
9933    new_path=`$WHICH "$new_path" 2> /dev/null`
9934
9935    if test "x$new_path" = x; then
9936      # It's still not found. Now this is an unrecoverable error.
9937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9938$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9939      has_space=`$ECHO "$complete" | $GREP " "`
9940      if test "x$has_space" != x; then
9941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9943      fi
9944      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9945    fi
9946  fi
9947
9948  # Now new_path has a complete unix path to the binary
9949  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9950    # Keep paths in /bin as-is, but remove trailing .exe if any
9951    new_path="${new_path/%.exe/}"
9952    # Do not save /bin paths to all_fixpath_prefixes!
9953  else
9954    # Not in mixed or Windows style, start by that.
9955    new_path=`cmd //c echo $new_path`
9956
9957  input_path="$new_path"
9958  # Check if we need to convert this using DOS-style short mode. If the path
9959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9960  # take no chances and rewrite it.
9961  # Note: m4 eats our [], so we need to use [ and ] instead.
9962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9963  if test "x$has_forbidden_chars" != x; then
9964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9966  fi
9967
9968    # Output is in $new_path
9969
9970  windows_path="$new_path"
9971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9972    unix_path=`$CYGPATH -u "$windows_path"`
9973    new_path="$unix_path"
9974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9976    new_path="$unix_path"
9977  fi
9978
9979    # remove trailing .exe if any
9980    new_path="${new_path/%.exe/}"
9981
9982    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9983    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9984  fi
9985
9986  else
9987    # We're on a posix platform. Hooray! :)
9988    # First separate the path from the arguments. This will split at the first
9989    # space.
9990    complete="$FOUND_MAKE"
9991    path="${complete%% *}"
9992    tmp="$complete EOL"
9993    arguments="${tmp#* }"
9994
9995    # Cannot rely on the command "which" here since it doesn't always work.
9996    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9997    if test -z "$is_absolute_path"; then
9998      # Path to executable is not absolute. Find it.
9999      IFS_save="$IFS"
10000      IFS=:
10001      for p in $PATH; do
10002        if test -f "$p/$path" && test -x "$p/$path"; then
10003          new_path="$p/$path"
10004          break
10005        fi
10006      done
10007      IFS="$IFS_save"
10008    else
10009      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10010$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10011      new_path="$path"
10012    fi
10013
10014    if test "x$new_path" = x; then
10015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10016$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10017      has_space=`$ECHO "$complete" | $GREP " "`
10018      if test "x$has_space" != x; then
10019        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10021      fi
10022      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10023    fi
10024  fi
10025
10026  # Now join together the path and the arguments once again
10027  if test "x$arguments" != xEOL; then
10028    new_complete="$new_path ${arguments% *}"
10029  else
10030    new_complete="$new_path"
10031  fi
10032
10033  if test "x$complete" != "x$new_complete"; then
10034    FOUND_MAKE="$new_complete"
10035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10036$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10037  fi
10038
10039        fi
10040      fi
10041    fi
10042  fi
10043
10044        fi
10045        PATH=$OLD_PATH
10046      fi
10047    fi
10048
10049    if test "x$FOUND_MAKE" = x; then
10050      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
10051    fi
10052  fi
10053
10054  MAKE=$FOUND_MAKE
10055
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10057$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10058
10059
10060
10061  # Test if find supports -delete
10062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10063$as_echo_n "checking if find supports -delete... " >&6; }
10064  FIND_DELETE="-delete"
10065
10066  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10067
10068  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10069
10070  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10071  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10072    # No, it does not.
10073    rm $DELETEDIR/TestIfFindSupportsDelete
10074    FIND_DELETE="-exec rm \{\} \+"
10075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076$as_echo "no" >&6; }
10077  else
10078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10079$as_echo "yes" >&6; }
10080  fi
10081  rmdir $DELETEDIR
10082
10083
10084
10085  # These tools might not be installed by default,
10086  # need hint on how to install them.
10087
10088  for ac_prog in unzip
10089do
10090  # Extract the first word of "$ac_prog", so it can be a program name with args.
10091set dummy $ac_prog; ac_word=$2
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10093$as_echo_n "checking for $ac_word... " >&6; }
10094if ${ac_cv_path_UNZIP+:} false; then :
10095  $as_echo_n "(cached) " >&6
10096else
10097  case $UNZIP in
10098  [\\/]* | ?:[\\/]*)
10099  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10100  ;;
10101  *)
10102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10103for as_dir in $PATH
10104do
10105  IFS=$as_save_IFS
10106  test -z "$as_dir" && as_dir=.
10107    for ac_exec_ext in '' $ac_executable_extensions; do
10108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10109    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10111    break 2
10112  fi
10113done
10114  done
10115IFS=$as_save_IFS
10116
10117  ;;
10118esac
10119fi
10120UNZIP=$ac_cv_path_UNZIP
10121if test -n "$UNZIP"; then
10122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10123$as_echo "$UNZIP" >&6; }
10124else
10125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10126$as_echo "no" >&6; }
10127fi
10128
10129
10130  test -n "$UNZIP" && break
10131done
10132
10133
10134  if test "x$UNZIP" = x; then
10135    if test "xunzip" = x; then
10136      PROG_NAME=unzip
10137    else
10138      PROG_NAME=unzip
10139    fi
10140    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10141$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10142    as_fn_error $? "Cannot continue" "$LINENO" 5
10143  fi
10144
10145
10146
10147  for ac_prog in zip
10148do
10149  # Extract the first word of "$ac_prog", so it can be a program name with args.
10150set dummy $ac_prog; ac_word=$2
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10152$as_echo_n "checking for $ac_word... " >&6; }
10153if ${ac_cv_path_ZIP+:} false; then :
10154  $as_echo_n "(cached) " >&6
10155else
10156  case $ZIP in
10157  [\\/]* | ?:[\\/]*)
10158  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10159  ;;
10160  *)
10161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10162for as_dir in $PATH
10163do
10164  IFS=$as_save_IFS
10165  test -z "$as_dir" && as_dir=.
10166    for ac_exec_ext in '' $ac_executable_extensions; do
10167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10168    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10170    break 2
10171  fi
10172done
10173  done
10174IFS=$as_save_IFS
10175
10176  ;;
10177esac
10178fi
10179ZIP=$ac_cv_path_ZIP
10180if test -n "$ZIP"; then
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10182$as_echo "$ZIP" >&6; }
10183else
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185$as_echo "no" >&6; }
10186fi
10187
10188
10189  test -n "$ZIP" && break
10190done
10191
10192
10193  if test "x$ZIP" = x; then
10194    if test "xzip" = x; then
10195      PROG_NAME=zip
10196    else
10197      PROG_NAME=zip
10198    fi
10199    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10200$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10201    as_fn_error $? "Cannot continue" "$LINENO" 5
10202  fi
10203
10204
10205
10206  # Non-required basic tools
10207
10208  # Extract the first word of "ldd", so it can be a program name with args.
10209set dummy ldd; ac_word=$2
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10211$as_echo_n "checking for $ac_word... " >&6; }
10212if ${ac_cv_path_LDD+:} false; then :
10213  $as_echo_n "(cached) " >&6
10214else
10215  case $LDD in
10216  [\\/]* | ?:[\\/]*)
10217  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10218  ;;
10219  *)
10220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10221for as_dir in $PATH
10222do
10223  IFS=$as_save_IFS
10224  test -z "$as_dir" && as_dir=.
10225    for ac_exec_ext in '' $ac_executable_extensions; do
10226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10227    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10229    break 2
10230  fi
10231done
10232  done
10233IFS=$as_save_IFS
10234
10235  ;;
10236esac
10237fi
10238LDD=$ac_cv_path_LDD
10239if test -n "$LDD"; then
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10241$as_echo "$LDD" >&6; }
10242else
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
10245fi
10246
10247
10248  if test "x$LDD" = "x"; then
10249    # List shared lib dependencies is used for
10250    # debug output and checking for forbidden dependencies.
10251    # We can build without it.
10252    LDD="true"
10253  fi
10254  # Extract the first word of "otool", so it can be a program name with args.
10255set dummy otool; ac_word=$2
10256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10257$as_echo_n "checking for $ac_word... " >&6; }
10258if ${ac_cv_path_OTOOL+:} false; then :
10259  $as_echo_n "(cached) " >&6
10260else
10261  case $OTOOL in
10262  [\\/]* | ?:[\\/]*)
10263  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10264  ;;
10265  *)
10266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10267for as_dir in $PATH
10268do
10269  IFS=$as_save_IFS
10270  test -z "$as_dir" && as_dir=.
10271    for ac_exec_ext in '' $ac_executable_extensions; do
10272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10273    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10275    break 2
10276  fi
10277done
10278  done
10279IFS=$as_save_IFS
10280
10281  ;;
10282esac
10283fi
10284OTOOL=$ac_cv_path_OTOOL
10285if test -n "$OTOOL"; then
10286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10287$as_echo "$OTOOL" >&6; }
10288else
10289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290$as_echo "no" >&6; }
10291fi
10292
10293
10294  if test "x$OTOOL" = "x"; then
10295    OTOOL="true"
10296  fi
10297  for ac_prog in readelf greadelf
10298do
10299  # Extract the first word of "$ac_prog", so it can be a program name with args.
10300set dummy $ac_prog; ac_word=$2
10301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10302$as_echo_n "checking for $ac_word... " >&6; }
10303if ${ac_cv_path_READELF+:} false; then :
10304  $as_echo_n "(cached) " >&6
10305else
10306  case $READELF in
10307  [\\/]* | ?:[\\/]*)
10308  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10309  ;;
10310  *)
10311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10312for as_dir in $PATH
10313do
10314  IFS=$as_save_IFS
10315  test -z "$as_dir" && as_dir=.
10316    for ac_exec_ext in '' $ac_executable_extensions; do
10317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10318    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10320    break 2
10321  fi
10322done
10323  done
10324IFS=$as_save_IFS
10325
10326  ;;
10327esac
10328fi
10329READELF=$ac_cv_path_READELF
10330if test -n "$READELF"; then
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10332$as_echo "$READELF" >&6; }
10333else
10334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10335$as_echo "no" >&6; }
10336fi
10337
10338
10339  test -n "$READELF" && break
10340done
10341
10342  # Extract the first word of "hg", so it can be a program name with args.
10343set dummy hg; ac_word=$2
10344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10345$as_echo_n "checking for $ac_word... " >&6; }
10346if ${ac_cv_path_HG+:} false; then :
10347  $as_echo_n "(cached) " >&6
10348else
10349  case $HG in
10350  [\\/]* | ?:[\\/]*)
10351  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10352  ;;
10353  *)
10354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10355for as_dir in $PATH
10356do
10357  IFS=$as_save_IFS
10358  test -z "$as_dir" && as_dir=.
10359    for ac_exec_ext in '' $ac_executable_extensions; do
10360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10361    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10363    break 2
10364  fi
10365done
10366  done
10367IFS=$as_save_IFS
10368
10369  ;;
10370esac
10371fi
10372HG=$ac_cv_path_HG
10373if test -n "$HG"; then
10374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10375$as_echo "$HG" >&6; }
10376else
10377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10378$as_echo "no" >&6; }
10379fi
10380
10381
10382  # Extract the first word of "stat", so it can be a program name with args.
10383set dummy stat; ac_word=$2
10384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10385$as_echo_n "checking for $ac_word... " >&6; }
10386if ${ac_cv_path_STAT+:} false; then :
10387  $as_echo_n "(cached) " >&6
10388else
10389  case $STAT in
10390  [\\/]* | ?:[\\/]*)
10391  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10392  ;;
10393  *)
10394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10395for as_dir in $PATH
10396do
10397  IFS=$as_save_IFS
10398  test -z "$as_dir" && as_dir=.
10399    for ac_exec_ext in '' $ac_executable_extensions; do
10400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10401    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10403    break 2
10404  fi
10405done
10406  done
10407IFS=$as_save_IFS
10408
10409  ;;
10410esac
10411fi
10412STAT=$ac_cv_path_STAT
10413if test -n "$STAT"; then
10414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10415$as_echo "$STAT" >&6; }
10416else
10417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
10419fi
10420
10421
10422  # Extract the first word of "time", so it can be a program name with args.
10423set dummy time; ac_word=$2
10424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10425$as_echo_n "checking for $ac_word... " >&6; }
10426if ${ac_cv_path_TIME+:} false; then :
10427  $as_echo_n "(cached) " >&6
10428else
10429  case $TIME in
10430  [\\/]* | ?:[\\/]*)
10431  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10432  ;;
10433  *)
10434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10435for as_dir in $PATH
10436do
10437  IFS=$as_save_IFS
10438  test -z "$as_dir" && as_dir=.
10439    for ac_exec_ext in '' $ac_executable_extensions; do
10440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10441    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10443    break 2
10444  fi
10445done
10446  done
10447IFS=$as_save_IFS
10448
10449  ;;
10450esac
10451fi
10452TIME=$ac_cv_path_TIME
10453if test -n "$TIME"; then
10454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10455$as_echo "$TIME" >&6; }
10456else
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10458$as_echo "no" >&6; }
10459fi
10460
10461
10462  # Check if it's GNU time
10463  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10464  if test "x$IS_GNU_TIME" != x; then
10465    IS_GNU_TIME=yes
10466  else
10467    IS_GNU_TIME=no
10468  fi
10469
10470
10471  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10472
10473  for ac_prog in comm
10474do
10475  # Extract the first word of "$ac_prog", so it can be a program name with args.
10476set dummy $ac_prog; ac_word=$2
10477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10478$as_echo_n "checking for $ac_word... " >&6; }
10479if ${ac_cv_path_COMM+:} false; then :
10480  $as_echo_n "(cached) " >&6
10481else
10482  case $COMM in
10483  [\\/]* | ?:[\\/]*)
10484  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10485  ;;
10486  *)
10487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10488for as_dir in $PATH
10489do
10490  IFS=$as_save_IFS
10491  test -z "$as_dir" && as_dir=.
10492    for ac_exec_ext in '' $ac_executable_extensions; do
10493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10494    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10496    break 2
10497  fi
10498done
10499  done
10500IFS=$as_save_IFS
10501
10502  ;;
10503esac
10504fi
10505COMM=$ac_cv_path_COMM
10506if test -n "$COMM"; then
10507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10508$as_echo "$COMM" >&6; }
10509else
10510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10511$as_echo "no" >&6; }
10512fi
10513
10514
10515  test -n "$COMM" && break
10516done
10517
10518
10519  if test "x$COMM" = x; then
10520    if test "xcomm" = x; then
10521      PROG_NAME=comm
10522    else
10523      PROG_NAME=comm
10524    fi
10525    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10526$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10527    as_fn_error $? "Cannot continue" "$LINENO" 5
10528  fi
10529
10530
10531  fi
10532
10533  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10534
10535  for ac_prog in dsymutil
10536do
10537  # Extract the first word of "$ac_prog", so it can be a program name with args.
10538set dummy $ac_prog; ac_word=$2
10539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10540$as_echo_n "checking for $ac_word... " >&6; }
10541if ${ac_cv_path_DSYMUTIL+:} false; then :
10542  $as_echo_n "(cached) " >&6
10543else
10544  case $DSYMUTIL in
10545  [\\/]* | ?:[\\/]*)
10546  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10547  ;;
10548  *)
10549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10550for as_dir in $PATH
10551do
10552  IFS=$as_save_IFS
10553  test -z "$as_dir" && as_dir=.
10554    for ac_exec_ext in '' $ac_executable_extensions; do
10555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10556    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10558    break 2
10559  fi
10560done
10561  done
10562IFS=$as_save_IFS
10563
10564  ;;
10565esac
10566fi
10567DSYMUTIL=$ac_cv_path_DSYMUTIL
10568if test -n "$DSYMUTIL"; then
10569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10570$as_echo "$DSYMUTIL" >&6; }
10571else
10572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10573$as_echo "no" >&6; }
10574fi
10575
10576
10577  test -n "$DSYMUTIL" && break
10578done
10579
10580
10581  if test "x$DSYMUTIL" = x; then
10582    if test "xdsymutil" = x; then
10583      PROG_NAME=dsymutil
10584    else
10585      PROG_NAME=dsymutil
10586    fi
10587    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10588$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10589    as_fn_error $? "Cannot continue" "$LINENO" 5
10590  fi
10591
10592
10593
10594  for ac_prog in xattr
10595do
10596  # Extract the first word of "$ac_prog", so it can be a program name with args.
10597set dummy $ac_prog; ac_word=$2
10598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10599$as_echo_n "checking for $ac_word... " >&6; }
10600if ${ac_cv_path_XATTR+:} false; then :
10601  $as_echo_n "(cached) " >&6
10602else
10603  case $XATTR in
10604  [\\/]* | ?:[\\/]*)
10605  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10606  ;;
10607  *)
10608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10609for as_dir in $PATH
10610do
10611  IFS=$as_save_IFS
10612  test -z "$as_dir" && as_dir=.
10613    for ac_exec_ext in '' $ac_executable_extensions; do
10614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10615    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10617    break 2
10618  fi
10619done
10620  done
10621IFS=$as_save_IFS
10622
10623  ;;
10624esac
10625fi
10626XATTR=$ac_cv_path_XATTR
10627if test -n "$XATTR"; then
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10629$as_echo "$XATTR" >&6; }
10630else
10631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632$as_echo "no" >&6; }
10633fi
10634
10635
10636  test -n "$XATTR" && break
10637done
10638
10639
10640  if test "x$XATTR" = x; then
10641    if test "xxattr" = x; then
10642      PROG_NAME=xattr
10643    else
10644      PROG_NAME=xattr
10645    fi
10646    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10647$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10648    as_fn_error $? "Cannot continue" "$LINENO" 5
10649  fi
10650
10651
10652    # Extract the first word of "codesign", so it can be a program name with args.
10653set dummy codesign; ac_word=$2
10654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10655$as_echo_n "checking for $ac_word... " >&6; }
10656if ${ac_cv_path_CODESIGN+:} false; then :
10657  $as_echo_n "(cached) " >&6
10658else
10659  case $CODESIGN in
10660  [\\/]* | ?:[\\/]*)
10661  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10662  ;;
10663  *)
10664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10665for as_dir in $PATH
10666do
10667  IFS=$as_save_IFS
10668  test -z "$as_dir" && as_dir=.
10669    for ac_exec_ext in '' $ac_executable_extensions; do
10670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10671    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10673    break 2
10674  fi
10675done
10676  done
10677IFS=$as_save_IFS
10678
10679  ;;
10680esac
10681fi
10682CODESIGN=$ac_cv_path_CODESIGN
10683if test -n "$CODESIGN"; then
10684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10685$as_echo "$CODESIGN" >&6; }
10686else
10687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10688$as_echo "no" >&6; }
10689fi
10690
10691
10692    if test "x$CODESIGN" != "x"; then
10693      # Verify that the openjdk_codesign certificate is present
10694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10695$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10696      rm -f codesign-testfile
10697      touch codesign-testfile
10698      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10699      rm -f codesign-testfile
10700      if test "x$CODESIGN" = x; then
10701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10702$as_echo "no" >&6; }
10703      else
10704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10705$as_echo "yes" >&6; }
10706      fi
10707    fi
10708  fi
10709
10710
10711# Check if pkg-config is available.
10712
10713
10714if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10715	if test -n "$ac_tool_prefix"; then
10716  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10717set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10719$as_echo_n "checking for $ac_word... " >&6; }
10720if ${ac_cv_path_PKG_CONFIG+:} false; then :
10721  $as_echo_n "(cached) " >&6
10722else
10723  case $PKG_CONFIG in
10724  [\\/]* | ?:[\\/]*)
10725  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10726  ;;
10727  *)
10728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10729for as_dir in $PATH
10730do
10731  IFS=$as_save_IFS
10732  test -z "$as_dir" && as_dir=.
10733    for ac_exec_ext in '' $ac_executable_extensions; do
10734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10735    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10737    break 2
10738  fi
10739done
10740  done
10741IFS=$as_save_IFS
10742
10743  ;;
10744esac
10745fi
10746PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10747if test -n "$PKG_CONFIG"; then
10748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10749$as_echo "$PKG_CONFIG" >&6; }
10750else
10751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10752$as_echo "no" >&6; }
10753fi
10754
10755
10756fi
10757if test -z "$ac_cv_path_PKG_CONFIG"; then
10758  ac_pt_PKG_CONFIG=$PKG_CONFIG
10759  # Extract the first word of "pkg-config", so it can be a program name with args.
10760set dummy pkg-config; ac_word=$2
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10762$as_echo_n "checking for $ac_word... " >&6; }
10763if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10764  $as_echo_n "(cached) " >&6
10765else
10766  case $ac_pt_PKG_CONFIG in
10767  [\\/]* | ?:[\\/]*)
10768  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10769  ;;
10770  *)
10771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10772for as_dir in $PATH
10773do
10774  IFS=$as_save_IFS
10775  test -z "$as_dir" && as_dir=.
10776    for ac_exec_ext in '' $ac_executable_extensions; do
10777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10778    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10780    break 2
10781  fi
10782done
10783  done
10784IFS=$as_save_IFS
10785
10786  ;;
10787esac
10788fi
10789ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10790if test -n "$ac_pt_PKG_CONFIG"; then
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10792$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10793else
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
10796fi
10797
10798  if test "x$ac_pt_PKG_CONFIG" = x; then
10799    PKG_CONFIG=""
10800  else
10801    case $cross_compiling:$ac_tool_warned in
10802yes:)
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10804$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10805ac_tool_warned=yes ;;
10806esac
10807    PKG_CONFIG=$ac_pt_PKG_CONFIG
10808  fi
10809else
10810  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10811fi
10812
10813fi
10814if test -n "$PKG_CONFIG"; then
10815	_pkg_min_version=0.9.0
10816	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10817$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10818	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10819		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10820$as_echo "yes" >&6; }
10821	else
10822		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10823$as_echo "no" >&6; }
10824		PKG_CONFIG=""
10825	fi
10826
10827fi
10828
10829# After basic tools have been setup, we can check build os specific details.
10830
10831  ###############################################################################
10832
10833  # Note that this is the build platform OS version!
10834
10835  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10836  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10837  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10838  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10839
10840
10841
10842
10843
10844# Setup builddeps, for automatic downloading of tools we need.
10845# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10846# boot-jdk setup, but we need to have basic tools setup first.
10847
10848
10849# Check whether --with-builddeps-conf was given.
10850if test "${with_builddeps_conf+set}" = set; then :
10851  withval=$with_builddeps_conf;
10852fi
10853
10854
10855
10856# Check whether --with-builddeps-server was given.
10857if test "${with_builddeps_server+set}" = set; then :
10858  withval=$with_builddeps_server;
10859fi
10860
10861
10862
10863# Check whether --with-builddeps-dir was given.
10864if test "${with_builddeps_dir+set}" = set; then :
10865  withval=$with_builddeps_dir;
10866else
10867  with_builddeps_dir=/localhome/builddeps
10868fi
10869
10870
10871
10872# Check whether --with-builddeps-group was given.
10873if test "${with_builddeps_group+set}" = set; then :
10874  withval=$with_builddeps_group;
10875fi
10876
10877
10878
10879
10880  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10881    if test "x$with_builddeps_conf" != x; then
10882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10883$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10884      builddepsfile=$with_builddeps_conf
10885      if test -s $builddepsfile; then
10886        . $builddepsfile
10887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10888$as_echo "loaded!" >&6; }
10889      else
10890        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10891      fi
10892    else
10893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10894$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10895      builddepsfile=`mktemp`
10896      touch $builddepsfile
10897      # Put all found confs into a single file.
10898      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10899      # Source the file to acquire the variables
10900      if test -s $builddepsfile; then
10901        . $builddepsfile
10902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10903$as_echo "found at least one!" >&6; }
10904      else
10905        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10906      fi
10907    fi
10908    # Create build and target names that use _ instead of "-" and ".".
10909    # This is necessary to use them in variable names.
10910    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10911    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10912    # Extract rewrite information for build and target
10913    eval rewritten_build=\${REWRITE_${build_var}}
10914    if test "x$rewritten_build" = x; then
10915      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10916      echo Build stays the same $rewritten_build
10917    else
10918      echo Rewriting build for builddeps into $rewritten_build
10919    fi
10920    eval rewritten_target=\${REWRITE_${target_var}}
10921    if test "x$rewritten_target" = x; then
10922      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10923      echo Target stays the same $rewritten_target
10924    else
10925      echo Rewriting target for builddeps into $rewritten_target
10926    fi
10927    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10928    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10929  fi
10930  for ac_prog in 7z unzip
10931do
10932  # Extract the first word of "$ac_prog", so it can be a program name with args.
10933set dummy $ac_prog; ac_word=$2
10934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10935$as_echo_n "checking for $ac_word... " >&6; }
10936if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10937  $as_echo_n "(cached) " >&6
10938else
10939  if test -n "$BDEPS_UNZIP"; then
10940  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10941else
10942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10943for as_dir in $PATH
10944do
10945  IFS=$as_save_IFS
10946  test -z "$as_dir" && as_dir=.
10947    for ac_exec_ext in '' $ac_executable_extensions; do
10948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10949    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10951    break 2
10952  fi
10953done
10954  done
10955IFS=$as_save_IFS
10956
10957fi
10958fi
10959BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10960if test -n "$BDEPS_UNZIP"; then
10961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10962$as_echo "$BDEPS_UNZIP" >&6; }
10963else
10964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
10966fi
10967
10968
10969  test -n "$BDEPS_UNZIP" && break
10970done
10971
10972  if test "x$BDEPS_UNZIP" = x7z; then
10973    BDEPS_UNZIP="7z x"
10974  fi
10975
10976  for ac_prog in wget lftp ftp
10977do
10978  # Extract the first word of "$ac_prog", so it can be a program name with args.
10979set dummy $ac_prog; ac_word=$2
10980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10981$as_echo_n "checking for $ac_word... " >&6; }
10982if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10983  $as_echo_n "(cached) " >&6
10984else
10985  if test -n "$BDEPS_FTP"; then
10986  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10987else
10988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10989for as_dir in $PATH
10990do
10991  IFS=$as_save_IFS
10992  test -z "$as_dir" && as_dir=.
10993    for ac_exec_ext in '' $ac_executable_extensions; do
10994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10995    ac_cv_prog_BDEPS_FTP="$ac_prog"
10996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10997    break 2
10998  fi
10999done
11000  done
11001IFS=$as_save_IFS
11002
11003fi
11004fi
11005BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11006if test -n "$BDEPS_FTP"; then
11007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11008$as_echo "$BDEPS_FTP" >&6; }
11009else
11010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11011$as_echo "no" >&6; }
11012fi
11013
11014
11015  test -n "$BDEPS_FTP" && break
11016done
11017
11018
11019
11020###############################################################################
11021#
11022# Determine OpenJDK variants, options and version numbers.
11023#
11024###############################################################################
11025
11026# We need build & target for this.
11027
11028
11029  ###############################################################################
11030  #
11031  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11032  # We always build headless support.
11033  #
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11035$as_echo_n "checking headful support... " >&6; }
11036  # Check whether --enable-headful was given.
11037if test "${enable_headful+set}" = set; then :
11038  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11039else
11040  SUPPORT_HEADFUL=yes
11041fi
11042
11043
11044  SUPPORT_HEADLESS=yes
11045  BUILD_HEADLESS="BUILD_HEADLESS:=true"
11046
11047  if test "x$SUPPORT_HEADFUL" = xyes; then
11048    # We are building both headful and headless.
11049    headful_msg="include support for both headful and headless"
11050  fi
11051
11052  if test "x$SUPPORT_HEADFUL" = xno; then
11053    # Thus we are building headless only.
11054    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11055    headful_msg="headless only"
11056  fi
11057
11058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11059$as_echo "$headful_msg" >&6; }
11060
11061
11062
11063
11064
11065  # Control wether Hotspot runs Queens test after build.
11066  # Check whether --enable-hotspot-test-in-build was given.
11067if test "${enable_hotspot_test_in_build+set}" = set; then :
11068  enableval=$enable_hotspot_test_in_build;
11069else
11070  enable_hotspot_test_in_build=no
11071fi
11072
11073  if test "x$enable_hotspot_test_in_build" = "xyes"; then
11074    TEST_IN_BUILD=true
11075  else
11076    TEST_IN_BUILD=false
11077  fi
11078
11079
11080  ###############################################################################
11081  #
11082  # Choose cacerts source file
11083  #
11084
11085# Check whether --with-cacerts-file was given.
11086if test "${with_cacerts_file+set}" = set; then :
11087  withval=$with_cacerts_file;
11088fi
11089
11090  if test "x$with_cacerts_file" != x; then
11091    CACERTS_FILE=$with_cacerts_file
11092  else
11093    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11094  fi
11095
11096
11097  ###############################################################################
11098  #
11099  # Enable or disable unlimited crypto
11100  #
11101  # Check whether --enable-unlimited-crypto was given.
11102if test "${enable_unlimited_crypto+set}" = set; then :
11103  enableval=$enable_unlimited_crypto;
11104else
11105  enable_unlimited_crypto=no
11106fi
11107
11108  if test "x$enable_unlimited_crypto" = "xyes"; then
11109    UNLIMITED_CRYPTO=true
11110  else
11111    UNLIMITED_CRYPTO=false
11112  fi
11113
11114
11115  ###############################################################################
11116  #
11117  # Enable or disable the elliptic curve crypto implementation
11118  #
11119
11120
11121  ###############################################################################
11122  #
11123  # Compress jars
11124  #
11125  COMPRESS_JARS=false
11126
11127
11128
11129
11130  # Source the version numbers
11131  . $AUTOCONF_DIR/version-numbers
11132
11133  # Get the settings from parameters
11134
11135# Check whether --with-milestone was given.
11136if test "${with_milestone+set}" = set; then :
11137  withval=$with_milestone;
11138fi
11139
11140  if test "x$with_milestone" = xyes; then
11141    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11142  elif test "x$with_milestone" != x; then
11143    MILESTONE="$with_milestone"
11144  fi
11145  if test "x$MILESTONE" = x; then
11146    MILESTONE=internal
11147  fi
11148
11149
11150# Check whether --with-update-version was given.
11151if test "${with_update_version+set}" = set; then :
11152  withval=$with_update_version;
11153fi
11154
11155  if test "x$with_update_version" = xyes; then
11156    as_fn_error $? "Update version must have a value" "$LINENO" 5
11157  elif test "x$with_update_version" != x; then
11158    JDK_UPDATE_VERSION="$with_update_version"
11159  fi
11160
11161
11162# Check whether --with-user-release-suffix was given.
11163if test "${with_user_release_suffix+set}" = set; then :
11164  withval=$with_user_release_suffix;
11165fi
11166
11167  if test "x$with_user_release_suffix" = xyes; then
11168    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11169  elif test "x$with_user_release_suffix" != x; then
11170    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11171  fi
11172
11173
11174# Check whether --with-build-number was given.
11175if test "${with_build_number+set}" = set; then :
11176  withval=$with_build_number;
11177fi
11178
11179  if test "x$with_build_number" = xyes; then
11180    as_fn_error $? "Build number must have a value" "$LINENO" 5
11181  elif test "x$with_build_number" != x; then
11182    JDK_BUILD_NUMBER="$with_build_number"
11183  fi
11184  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11185  if test "x$JDK_BUILD_NUMBER" = x; then
11186    JDK_BUILD_NUMBER=b00
11187    if test "x$USER_RELEASE_SUFFIX" = x; then
11188      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11189      # Avoid [:alnum:] since it depends on the locale.
11190      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11191      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11192    fi
11193  fi
11194
11195  # Now set the JDK version, milestone, build number etc.
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211  COPYRIGHT_YEAR=`date +'%Y'`
11212
11213
11214  if test "x$JDK_UPDATE_VERSION" != x; then
11215    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11216  else
11217    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11218  fi
11219
11220
11221  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11222
11223
11224
11225###############################################################################
11226#
11227# Setup BootJDK, used to bootstrap the build.
11228#
11229###############################################################################
11230
11231
11232  BOOT_JDK_FOUND=no
11233
11234# Check whether --with-boot-jdk was given.
11235if test "${with_boot_jdk+set}" = set; then :
11236  withval=$with_boot_jdk;
11237fi
11238
11239
11240  # We look for the Boot JDK through various means, going from more certain to
11241  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11242  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11243  # must check if this is indeed valid; otherwise we'll continue looking.
11244
11245  # Test: Is bootjdk explicitely set by command line arguments?
11246
11247  if test "x$BOOT_JDK_FOUND" = xno; then
11248    # Now execute the test
11249
11250  if test "x$with_boot_jdk" != x; then
11251    BOOT_JDK=$with_boot_jdk
11252    BOOT_JDK_FOUND=maybe
11253    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11254$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11255  fi
11256
11257
11258    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11259    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11260      # Do we have a bin/java?
11261      if test ! -x "$BOOT_JDK/bin/java"; then
11262        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11264        BOOT_JDK_FOUND=no
11265      else
11266        # Do we have a bin/javac?
11267        if test ! -x "$BOOT_JDK/bin/javac"; then
11268          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11270          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11271$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11272          BOOT_JDK_FOUND=no
11273        else
11274          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11275          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11276            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11278            BOOT_JDK_FOUND=no
11279          else
11280            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11281            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11282
11283            # Extra M4 quote needed to protect [] in grep expression.
11284            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11285            if test "x$FOUND_VERSION_78" = x; then
11286              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11288              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11289$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11290              BOOT_JDK_FOUND=no
11291            else
11292              # We're done! :-)
11293              BOOT_JDK_FOUND=yes
11294
11295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11296
11297  # Input might be given as Windows format, start by converting to
11298  # unix format.
11299  path="$BOOT_JDK"
11300  new_path=`$CYGPATH -u "$path"`
11301
11302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11305  # "foo.exe" is OK but "foo" is an error.
11306  #
11307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11308  # It is also a way to make sure we got the proper file name for the real test later on.
11309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11310  if test "x$test_shortpath" = x; then
11311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11313    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11314  fi
11315
11316  # Call helper function which possibly converts this using DOS-style short mode.
11317  # If so, the updated path is stored in $new_path.
11318
11319  input_path="$new_path"
11320  # Check if we need to convert this using DOS-style short mode. If the path
11321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11322  # take no chances and rewrite it.
11323  # Note: m4 eats our [], so we need to use [ and ] instead.
11324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11325  if test "x$has_forbidden_chars" != x; then
11326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11330      # Going to short mode and back again did indeed matter. Since short mode is
11331      # case insensitive, let's make it lowercase to improve readability.
11332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11333      # Now convert it back to Unix-stile (cygpath)
11334      input_path=`$CYGPATH -u "$shortmode_path"`
11335      new_path="$input_path"
11336    fi
11337  fi
11338
11339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11340  if test "x$test_cygdrive_prefix" = x; then
11341    # As a simple fix, exclude /usr/bin since it's not a real path.
11342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11344      # a path prefixed by /cygdrive for fixpath to work.
11345      new_path="$CYGWIN_ROOT_PATH$input_path"
11346    fi
11347  fi
11348
11349
11350  if test "x$path" != "x$new_path"; then
11351    BOOT_JDK="$new_path"
11352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11353$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11354  fi
11355
11356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11357
11358  path="$BOOT_JDK"
11359  has_colon=`$ECHO $path | $GREP ^.:`
11360  new_path="$path"
11361  if test "x$has_colon" = x; then
11362    # Not in mixed or Windows style, start by that.
11363    new_path=`cmd //c echo $path`
11364  fi
11365
11366
11367  input_path="$new_path"
11368  # Check if we need to convert this using DOS-style short mode. If the path
11369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11370  # take no chances and rewrite it.
11371  # Note: m4 eats our [], so we need to use [ and ] instead.
11372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11373  if test "x$has_forbidden_chars" != x; then
11374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11376  fi
11377
11378
11379  windows_path="$new_path"
11380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11381    unix_path=`$CYGPATH -u "$windows_path"`
11382    new_path="$unix_path"
11383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11385    new_path="$unix_path"
11386  fi
11387
11388  if test "x$path" != "x$new_path"; then
11389    BOOT_JDK="$new_path"
11390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11391$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11392  fi
11393
11394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11396
11397  else
11398    # We're on a posix platform. Hooray! :)
11399    path="$BOOT_JDK"
11400    has_space=`$ECHO "$path" | $GREP " "`
11401    if test "x$has_space" != x; then
11402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11403$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11404      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11405    fi
11406
11407    # Use eval to expand a potential ~
11408    eval path="$path"
11409    if test ! -f "$path" && test ! -d "$path"; then
11410      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11411    fi
11412
11413    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11414  fi
11415
11416              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11417$as_echo_n "checking for Boot JDK... " >&6; }
11418              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11419$as_echo "$BOOT_JDK" >&6; }
11420              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11421$as_echo_n "checking Boot JDK version... " >&6; }
11422              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11423              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11424$as_echo "$BOOT_JDK_VERSION" >&6; }
11425            fi # end check jdk version
11426          fi # end check rt.jar
11427        fi # end check javac
11428      fi # end check java
11429    fi # end check boot jdk found
11430  fi
11431
11432  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11433    # Having specified an argument which is incorrect will produce an instant failure;
11434    # we should not go on looking
11435    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11436  fi
11437
11438  # Test: Is bootjdk available from builddeps?
11439
11440  if test "x$BOOT_JDK_FOUND" = xno; then
11441    # Now execute the test
11442
11443
11444
11445  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11446    # Source the builddeps file again, to make sure it uses the latest variables!
11447    . $builddepsfile
11448    # Look for a target and build machine specific resource!
11449    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11450    if test "x$resource" = x; then
11451      # Ok, lets instead look for a target specific resource
11452      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11453    fi
11454    if test "x$resource" = x; then
11455      # Ok, lets instead look for a build specific resource
11456      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11457    fi
11458    if test "x$resource" = x; then
11459      # Ok, lets instead look for a generic resource
11460      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11461      resource=${builddep_bootjdk}
11462    fi
11463    if test "x$resource" != x; then
11464      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11465$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11466      # If the resource in the builddeps.conf file is an existing directory,
11467      # for example /java/linux/cups
11468      if test -d ${resource}; then
11469        depdir=${resource}
11470      else
11471
11472  # bootjdk is for example mymodule
11473  # $resource is for example libs/general/libmymod_1_2_3.zip
11474  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11475  # $with_builddeps_dir is for example /localhome/builddeps
11476  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11477  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11478  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11479  filename=`basename $resource`
11480  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11481  filebase=${filename%%.*}
11482  extension=${filename#*.}
11483  installdir=$with_builddeps_dir/$filebase
11484  if test ! -f $installdir/$filename.unpacked; then
11485    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11486$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11487    if test ! -d $installdir; then
11488      mkdir -p $installdir
11489    fi
11490    if test ! -d $installdir; then
11491      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11492    fi
11493    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11494    touch $tmpfile
11495    if test ! -f $tmpfile; then
11496      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11497    fi
11498
11499  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11500  # $tmpfile is the local file name for the downloaded file.
11501  VALID_TOOL=no
11502  if test "x$BDEPS_FTP" = xwget; then
11503    VALID_TOOL=yes
11504    wget -O $tmpfile $with_builddeps_server/$resource
11505  fi
11506  if test "x$BDEPS_FTP" = xlftp; then
11507    VALID_TOOL=yes
11508    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11509  fi
11510  if test "x$BDEPS_FTP" = xftp; then
11511    VALID_TOOL=yes
11512    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11513    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11514    FTPUSERPWD=${FTPSERVER%%@*}
11515    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11516      FTPUSER=${userpwd%%:*}
11517      FTPPWD=${userpwd#*@}
11518      FTPSERVER=${FTPSERVER#*@}
11519    else
11520      FTPUSER=ftp
11521      FTPPWD=ftp
11522    fi
11523    # the "pass" command does not work on some
11524    # ftp clients (read ftp.exe) but if it works,
11525    # passive mode is better!
11526    ( \
11527        echo "user $FTPUSER $FTPPWD"        ; \
11528        echo "pass"                         ; \
11529        echo "bin"                          ; \
11530        echo "get $FTPPATH $tmpfile"              ; \
11531    ) | ftp -in $FTPSERVER
11532  fi
11533  if test "x$VALID_TOOL" != xyes; then
11534    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11535  fi
11536
11537    mv $tmpfile $installdir/$filename
11538    if test ! -s $installdir/$filename; then
11539      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11540    fi
11541    case "$extension" in
11542      zip)  echo "Unzipping $installdir/$filename..."
11543        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11544        ;;
11545      tar.gz) echo "Untaring $installdir/$filename..."
11546        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11547        ;;
11548      tgz) echo "Untaring $installdir/$filename..."
11549        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11550        ;;
11551      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11552        ;;
11553    esac
11554  fi
11555  if test -f $installdir/$filename.unpacked; then
11556    depdir=$installdir
11557  fi
11558
11559      fi
11560      # Source the builddeps file again, because in the previous command, the depdir
11561      # was updated to point at the current build dependency install directory.
11562      . $builddepsfile
11563      # Now extract variables from the builddeps.conf files.
11564      theroot=${builddep_bootjdk_ROOT}
11565      thecflags=${builddep_bootjdk_CFLAGS}
11566      thelibs=${builddep_bootjdk_LIBS}
11567      if test "x$depdir" = x; then
11568        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11569      fi
11570      BOOT_JDK=$depdir
11571      if test "x$theroot" != x; then
11572        BOOT_JDK="$theroot"
11573      fi
11574      if test "x$thecflags" != x; then
11575        BOOT_JDK_CFLAGS="$thecflags"
11576      fi
11577      if test "x$thelibs" != x; then
11578        BOOT_JDK_LIBS="$thelibs"
11579      fi
11580      BOOT_JDK_FOUND=maybe
11581      else BOOT_JDK_FOUND=no
11582
11583    fi
11584    else BOOT_JDK_FOUND=no
11585
11586  fi
11587
11588
11589
11590    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11591    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11592      # Do we have a bin/java?
11593      if test ! -x "$BOOT_JDK/bin/java"; then
11594        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11596        BOOT_JDK_FOUND=no
11597      else
11598        # Do we have a bin/javac?
11599        if test ! -x "$BOOT_JDK/bin/javac"; then
11600          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11602          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11603$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11604          BOOT_JDK_FOUND=no
11605        else
11606          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11607          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11608            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11610            BOOT_JDK_FOUND=no
11611          else
11612            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11613            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11614
11615            # Extra M4 quote needed to protect [] in grep expression.
11616            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11617            if test "x$FOUND_VERSION_78" = x; then
11618              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11620              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11621$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11622              BOOT_JDK_FOUND=no
11623            else
11624              # We're done! :-)
11625              BOOT_JDK_FOUND=yes
11626
11627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11628
11629  # Input might be given as Windows format, start by converting to
11630  # unix format.
11631  path="$BOOT_JDK"
11632  new_path=`$CYGPATH -u "$path"`
11633
11634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11637  # "foo.exe" is OK but "foo" is an error.
11638  #
11639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11640  # It is also a way to make sure we got the proper file name for the real test later on.
11641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11642  if test "x$test_shortpath" = x; then
11643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11646  fi
11647
11648  # Call helper function which possibly converts this using DOS-style short mode.
11649  # If so, the updated path is stored in $new_path.
11650
11651  input_path="$new_path"
11652  # Check if we need to convert this using DOS-style short mode. If the path
11653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11654  # take no chances and rewrite it.
11655  # Note: m4 eats our [], so we need to use [ and ] instead.
11656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11657  if test "x$has_forbidden_chars" != x; then
11658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11662      # Going to short mode and back again did indeed matter. Since short mode is
11663      # case insensitive, let's make it lowercase to improve readability.
11664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11665      # Now convert it back to Unix-stile (cygpath)
11666      input_path=`$CYGPATH -u "$shortmode_path"`
11667      new_path="$input_path"
11668    fi
11669  fi
11670
11671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11672  if test "x$test_cygdrive_prefix" = x; then
11673    # As a simple fix, exclude /usr/bin since it's not a real path.
11674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11676      # a path prefixed by /cygdrive for fixpath to work.
11677      new_path="$CYGWIN_ROOT_PATH$input_path"
11678    fi
11679  fi
11680
11681
11682  if test "x$path" != "x$new_path"; then
11683    BOOT_JDK="$new_path"
11684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11686  fi
11687
11688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11689
11690  path="$BOOT_JDK"
11691  has_colon=`$ECHO $path | $GREP ^.:`
11692  new_path="$path"
11693  if test "x$has_colon" = x; then
11694    # Not in mixed or Windows style, start by that.
11695    new_path=`cmd //c echo $path`
11696  fi
11697
11698
11699  input_path="$new_path"
11700  # Check if we need to convert this using DOS-style short mode. If the path
11701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11702  # take no chances and rewrite it.
11703  # Note: m4 eats our [], so we need to use [ and ] instead.
11704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11705  if test "x$has_forbidden_chars" != x; then
11706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11708  fi
11709
11710
11711  windows_path="$new_path"
11712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11713    unix_path=`$CYGPATH -u "$windows_path"`
11714    new_path="$unix_path"
11715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11717    new_path="$unix_path"
11718  fi
11719
11720  if test "x$path" != "x$new_path"; then
11721    BOOT_JDK="$new_path"
11722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11724  fi
11725
11726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11728
11729  else
11730    # We're on a posix platform. Hooray! :)
11731    path="$BOOT_JDK"
11732    has_space=`$ECHO "$path" | $GREP " "`
11733    if test "x$has_space" != x; then
11734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11736      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11737    fi
11738
11739    # Use eval to expand a potential ~
11740    eval path="$path"
11741    if test ! -f "$path" && test ! -d "$path"; then
11742      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11743    fi
11744
11745    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11746  fi
11747
11748              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11749$as_echo_n "checking for Boot JDK... " >&6; }
11750              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11751$as_echo "$BOOT_JDK" >&6; }
11752              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11753$as_echo_n "checking Boot JDK version... " >&6; }
11754              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11755              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11756$as_echo "$BOOT_JDK_VERSION" >&6; }
11757            fi # end check jdk version
11758          fi # end check rt.jar
11759        fi # end check javac
11760      fi # end check java
11761    fi # end check boot jdk found
11762  fi
11763
11764
11765  # Test: Is $JAVA_HOME set?
11766
11767  if test "x$BOOT_JDK_FOUND" = xno; then
11768    # Now execute the test
11769
11770  if test "x$JAVA_HOME" != x; then
11771    JAVA_HOME_PROCESSED="$JAVA_HOME"
11772
11773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11774
11775  # Input might be given as Windows format, start by converting to
11776  # unix format.
11777  path="$JAVA_HOME_PROCESSED"
11778  new_path=`$CYGPATH -u "$path"`
11779
11780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11783  # "foo.exe" is OK but "foo" is an error.
11784  #
11785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11786  # It is also a way to make sure we got the proper file name for the real test later on.
11787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11788  if test "x$test_shortpath" = x; then
11789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11790$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11791    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11792  fi
11793
11794  # Call helper function which possibly converts this using DOS-style short mode.
11795  # If so, the updated path is stored in $new_path.
11796
11797  input_path="$new_path"
11798  # Check if we need to convert this using DOS-style short mode. If the path
11799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11800  # take no chances and rewrite it.
11801  # Note: m4 eats our [], so we need to use [ and ] instead.
11802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11803  if test "x$has_forbidden_chars" != x; then
11804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11808      # Going to short mode and back again did indeed matter. Since short mode is
11809      # case insensitive, let's make it lowercase to improve readability.
11810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11811      # Now convert it back to Unix-stile (cygpath)
11812      input_path=`$CYGPATH -u "$shortmode_path"`
11813      new_path="$input_path"
11814    fi
11815  fi
11816
11817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11818  if test "x$test_cygdrive_prefix" = x; then
11819    # As a simple fix, exclude /usr/bin since it's not a real path.
11820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11822      # a path prefixed by /cygdrive for fixpath to work.
11823      new_path="$CYGWIN_ROOT_PATH$input_path"
11824    fi
11825  fi
11826
11827
11828  if test "x$path" != "x$new_path"; then
11829    JAVA_HOME_PROCESSED="$new_path"
11830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11831$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11832  fi
11833
11834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11835
11836  path="$JAVA_HOME_PROCESSED"
11837  has_colon=`$ECHO $path | $GREP ^.:`
11838  new_path="$path"
11839  if test "x$has_colon" = x; then
11840    # Not in mixed or Windows style, start by that.
11841    new_path=`cmd //c echo $path`
11842  fi
11843
11844
11845  input_path="$new_path"
11846  # Check if we need to convert this using DOS-style short mode. If the path
11847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11848  # take no chances and rewrite it.
11849  # Note: m4 eats our [], so we need to use [ and ] instead.
11850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11851  if test "x$has_forbidden_chars" != x; then
11852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11854  fi
11855
11856
11857  windows_path="$new_path"
11858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11859    unix_path=`$CYGPATH -u "$windows_path"`
11860    new_path="$unix_path"
11861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11863    new_path="$unix_path"
11864  fi
11865
11866  if test "x$path" != "x$new_path"; then
11867    JAVA_HOME_PROCESSED="$new_path"
11868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11869$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11870  fi
11871
11872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11874
11875  else
11876    # We're on a posix platform. Hooray! :)
11877    path="$JAVA_HOME_PROCESSED"
11878    has_space=`$ECHO "$path" | $GREP " "`
11879    if test "x$has_space" != x; then
11880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11881$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11882      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11883    fi
11884
11885    # Use eval to expand a potential ~
11886    eval path="$path"
11887    if test ! -f "$path" && test ! -d "$path"; then
11888      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11889    fi
11890
11891    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11892  fi
11893
11894    if test ! -d "$JAVA_HOME_PROCESSED"; then
11895      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11896$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11897    else
11898      # Aha, the user has set a JAVA_HOME
11899      # let us use that as the Boot JDK.
11900      BOOT_JDK="$JAVA_HOME_PROCESSED"
11901      BOOT_JDK_FOUND=maybe
11902      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11903$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11904    fi
11905  fi
11906
11907
11908    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11909    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11910      # Do we have a bin/java?
11911      if test ! -x "$BOOT_JDK/bin/java"; then
11912        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11914        BOOT_JDK_FOUND=no
11915      else
11916        # Do we have a bin/javac?
11917        if test ! -x "$BOOT_JDK/bin/javac"; then
11918          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11920          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11921$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11922          BOOT_JDK_FOUND=no
11923        else
11924          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11925          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11926            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11928            BOOT_JDK_FOUND=no
11929          else
11930            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11931            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11932
11933            # Extra M4 quote needed to protect [] in grep expression.
11934            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11935            if test "x$FOUND_VERSION_78" = x; then
11936              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11938              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11939$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11940              BOOT_JDK_FOUND=no
11941            else
11942              # We're done! :-)
11943              BOOT_JDK_FOUND=yes
11944
11945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11946
11947  # Input might be given as Windows format, start by converting to
11948  # unix format.
11949  path="$BOOT_JDK"
11950  new_path=`$CYGPATH -u "$path"`
11951
11952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11955  # "foo.exe" is OK but "foo" is an error.
11956  #
11957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11958  # It is also a way to make sure we got the proper file name for the real test later on.
11959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11960  if test "x$test_shortpath" = x; then
11961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11962$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11963    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11964  fi
11965
11966  # Call helper function which possibly converts this using DOS-style short mode.
11967  # If so, the updated path is stored in $new_path.
11968
11969  input_path="$new_path"
11970  # Check if we need to convert this using DOS-style short mode. If the path
11971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11972  # take no chances and rewrite it.
11973  # Note: m4 eats our [], so we need to use [ and ] instead.
11974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11975  if test "x$has_forbidden_chars" != x; then
11976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11980      # Going to short mode and back again did indeed matter. Since short mode is
11981      # case insensitive, let's make it lowercase to improve readability.
11982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11983      # Now convert it back to Unix-stile (cygpath)
11984      input_path=`$CYGPATH -u "$shortmode_path"`
11985      new_path="$input_path"
11986    fi
11987  fi
11988
11989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11990  if test "x$test_cygdrive_prefix" = x; then
11991    # As a simple fix, exclude /usr/bin since it's not a real path.
11992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11994      # a path prefixed by /cygdrive for fixpath to work.
11995      new_path="$CYGWIN_ROOT_PATH$input_path"
11996    fi
11997  fi
11998
11999
12000  if test "x$path" != "x$new_path"; then
12001    BOOT_JDK="$new_path"
12002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12004  fi
12005
12006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12007
12008  path="$BOOT_JDK"
12009  has_colon=`$ECHO $path | $GREP ^.:`
12010  new_path="$path"
12011  if test "x$has_colon" = x; then
12012    # Not in mixed or Windows style, start by that.
12013    new_path=`cmd //c echo $path`
12014  fi
12015
12016
12017  input_path="$new_path"
12018  # Check if we need to convert this using DOS-style short mode. If the path
12019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12020  # take no chances and rewrite it.
12021  # Note: m4 eats our [], so we need to use [ and ] instead.
12022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12023  if test "x$has_forbidden_chars" != x; then
12024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12026  fi
12027
12028
12029  windows_path="$new_path"
12030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12031    unix_path=`$CYGPATH -u "$windows_path"`
12032    new_path="$unix_path"
12033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12035    new_path="$unix_path"
12036  fi
12037
12038  if test "x$path" != "x$new_path"; then
12039    BOOT_JDK="$new_path"
12040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12042  fi
12043
12044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12046
12047  else
12048    # We're on a posix platform. Hooray! :)
12049    path="$BOOT_JDK"
12050    has_space=`$ECHO "$path" | $GREP " "`
12051    if test "x$has_space" != x; then
12052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12054      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12055    fi
12056
12057    # Use eval to expand a potential ~
12058    eval path="$path"
12059    if test ! -f "$path" && test ! -d "$path"; then
12060      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12061    fi
12062
12063    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12064  fi
12065
12066              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12067$as_echo_n "checking for Boot JDK... " >&6; }
12068              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12069$as_echo "$BOOT_JDK" >&6; }
12070              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12071$as_echo_n "checking Boot JDK version... " >&6; }
12072              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12073              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12074$as_echo "$BOOT_JDK_VERSION" >&6; }
12075            fi # end check jdk version
12076          fi # end check rt.jar
12077        fi # end check javac
12078      fi # end check java
12079    fi # end check boot jdk found
12080  fi
12081
12082
12083  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12084
12085  if test "x$BOOT_JDK_FOUND" = xno; then
12086    # Now execute the test
12087
12088  if test -x /usr/libexec/java_home; then
12089    BOOT_JDK=`/usr/libexec/java_home`
12090    BOOT_JDK_FOUND=maybe
12091    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12092$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12093  fi
12094
12095
12096    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12097    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12098      # Do we have a bin/java?
12099      if test ! -x "$BOOT_JDK/bin/java"; then
12100        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12102        BOOT_JDK_FOUND=no
12103      else
12104        # Do we have a bin/javac?
12105        if test ! -x "$BOOT_JDK/bin/javac"; then
12106          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12108          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12109$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12110          BOOT_JDK_FOUND=no
12111        else
12112          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12113          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12116            BOOT_JDK_FOUND=no
12117          else
12118            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12119            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12120
12121            # Extra M4 quote needed to protect [] in grep expression.
12122            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12123            if test "x$FOUND_VERSION_78" = x; then
12124              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12126              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12127$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12128              BOOT_JDK_FOUND=no
12129            else
12130              # We're done! :-)
12131              BOOT_JDK_FOUND=yes
12132
12133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12134
12135  # Input might be given as Windows format, start by converting to
12136  # unix format.
12137  path="$BOOT_JDK"
12138  new_path=`$CYGPATH -u "$path"`
12139
12140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12143  # "foo.exe" is OK but "foo" is an error.
12144  #
12145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12146  # It is also a way to make sure we got the proper file name for the real test later on.
12147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12148  if test "x$test_shortpath" = x; then
12149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12151    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12152  fi
12153
12154  # Call helper function which possibly converts this using DOS-style short mode.
12155  # If so, the updated path is stored in $new_path.
12156
12157  input_path="$new_path"
12158  # Check if we need to convert this using DOS-style short mode. If the path
12159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12160  # take no chances and rewrite it.
12161  # Note: m4 eats our [], so we need to use [ and ] instead.
12162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12163  if test "x$has_forbidden_chars" != x; then
12164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12168      # Going to short mode and back again did indeed matter. Since short mode is
12169      # case insensitive, let's make it lowercase to improve readability.
12170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12171      # Now convert it back to Unix-stile (cygpath)
12172      input_path=`$CYGPATH -u "$shortmode_path"`
12173      new_path="$input_path"
12174    fi
12175  fi
12176
12177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12178  if test "x$test_cygdrive_prefix" = x; then
12179    # As a simple fix, exclude /usr/bin since it's not a real path.
12180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12182      # a path prefixed by /cygdrive for fixpath to work.
12183      new_path="$CYGWIN_ROOT_PATH$input_path"
12184    fi
12185  fi
12186
12187
12188  if test "x$path" != "x$new_path"; then
12189    BOOT_JDK="$new_path"
12190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12192  fi
12193
12194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12195
12196  path="$BOOT_JDK"
12197  has_colon=`$ECHO $path | $GREP ^.:`
12198  new_path="$path"
12199  if test "x$has_colon" = x; then
12200    # Not in mixed or Windows style, start by that.
12201    new_path=`cmd //c echo $path`
12202  fi
12203
12204
12205  input_path="$new_path"
12206  # Check if we need to convert this using DOS-style short mode. If the path
12207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12208  # take no chances and rewrite it.
12209  # Note: m4 eats our [], so we need to use [ and ] instead.
12210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12211  if test "x$has_forbidden_chars" != x; then
12212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12214  fi
12215
12216
12217  windows_path="$new_path"
12218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12219    unix_path=`$CYGPATH -u "$windows_path"`
12220    new_path="$unix_path"
12221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12223    new_path="$unix_path"
12224  fi
12225
12226  if test "x$path" != "x$new_path"; then
12227    BOOT_JDK="$new_path"
12228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12230  fi
12231
12232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12234
12235  else
12236    # We're on a posix platform. Hooray! :)
12237    path="$BOOT_JDK"
12238    has_space=`$ECHO "$path" | $GREP " "`
12239    if test "x$has_space" != x; then
12240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12242      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12243    fi
12244
12245    # Use eval to expand a potential ~
12246    eval path="$path"
12247    if test ! -f "$path" && test ! -d "$path"; then
12248      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12249    fi
12250
12251    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12252  fi
12253
12254              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12255$as_echo_n "checking for Boot JDK... " >&6; }
12256              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12257$as_echo "$BOOT_JDK" >&6; }
12258              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12259$as_echo_n "checking Boot JDK version... " >&6; }
12260              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12261              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12262$as_echo "$BOOT_JDK_VERSION" >&6; }
12263            fi # end check jdk version
12264          fi # end check rt.jar
12265        fi # end check javac
12266      fi # end check java
12267    fi # end check boot jdk found
12268  fi
12269
12270
12271  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12272
12273  if test "x$BOOT_JDK_FOUND" = xno; then
12274    # Now execute the test
12275
12276  # Extract the first word of "javac", so it can be a program name with args.
12277set dummy javac; ac_word=$2
12278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12279$as_echo_n "checking for $ac_word... " >&6; }
12280if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12281  $as_echo_n "(cached) " >&6
12282else
12283  case $JAVAC_CHECK in
12284  [\\/]* | ?:[\\/]*)
12285  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12286  ;;
12287  *)
12288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12289for as_dir in $PATH
12290do
12291  IFS=$as_save_IFS
12292  test -z "$as_dir" && as_dir=.
12293    for ac_exec_ext in '' $ac_executable_extensions; do
12294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12295    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12297    break 2
12298  fi
12299done
12300  done
12301IFS=$as_save_IFS
12302
12303  ;;
12304esac
12305fi
12306JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12307if test -n "$JAVAC_CHECK"; then
12308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12309$as_echo "$JAVAC_CHECK" >&6; }
12310else
12311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12312$as_echo "no" >&6; }
12313fi
12314
12315
12316  # Extract the first word of "java", so it can be a program name with args.
12317set dummy java; ac_word=$2
12318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12319$as_echo_n "checking for $ac_word... " >&6; }
12320if ${ac_cv_path_JAVA_CHECK+:} false; then :
12321  $as_echo_n "(cached) " >&6
12322else
12323  case $JAVA_CHECK in
12324  [\\/]* | ?:[\\/]*)
12325  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12326  ;;
12327  *)
12328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12329for as_dir in $PATH
12330do
12331  IFS=$as_save_IFS
12332  test -z "$as_dir" && as_dir=.
12333    for ac_exec_ext in '' $ac_executable_extensions; do
12334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12335    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12337    break 2
12338  fi
12339done
12340  done
12341IFS=$as_save_IFS
12342
12343  ;;
12344esac
12345fi
12346JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12347if test -n "$JAVA_CHECK"; then
12348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12349$as_echo "$JAVA_CHECK" >&6; }
12350else
12351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12352$as_echo "no" >&6; }
12353fi
12354
12355
12356  BINARY="$JAVAC_CHECK"
12357  if test "x$JAVAC_CHECK" = x; then
12358    BINARY="$JAVA_CHECK"
12359  fi
12360  if test "x$BINARY" != x; then
12361    # So there is a java(c) binary, it might be part of a JDK.
12362    # Lets find the JDK/JRE directory by following symbolic links.
12363    # Linux/GNU systems often have links from /usr/bin/java to
12364    # /etc/alternatives/java to the real JDK binary.
12365
12366  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12367    # Follow a chain of symbolic links. Use readlink
12368    # where it exists, else fall back to horribly
12369    # complicated shell code.
12370    if test "x$READLINK_TESTED" != yes; then
12371      # On MacOSX there is a readlink tool with a different
12372      # purpose than the GNU readlink tool. Check the found readlink.
12373      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12374      if test "x$ISGNU" = x; then
12375        # A readlink that we do not know how to use.
12376        # Are there other non-GNU readlinks out there?
12377        READLINK_TESTED=yes
12378        READLINK=
12379      fi
12380    fi
12381
12382    if test "x$READLINK" != x; then
12383      BINARY=`$READLINK -f $BINARY`
12384    else
12385      # Save the current directory for restoring afterwards
12386      STARTDIR=$PWD
12387      COUNTER=0
12388      sym_link_dir=`$DIRNAME $BINARY`
12389      sym_link_file=`$BASENAME $BINARY`
12390      cd $sym_link_dir
12391      # Use -P flag to resolve symlinks in directories.
12392      cd `$THEPWDCMD -P`
12393      sym_link_dir=`$THEPWDCMD -P`
12394      # Resolve file symlinks
12395      while test $COUNTER -lt 20; do
12396        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12397        if test "x$ISLINK" == x; then
12398          # This is not a symbolic link! We are done!
12399          break
12400        fi
12401        # Again resolve directory symlinks since the target of the just found
12402        # link could be in a different directory
12403        cd `$DIRNAME $ISLINK`
12404        sym_link_dir=`$THEPWDCMD -P`
12405        sym_link_file=`$BASENAME $ISLINK`
12406        let COUNTER=COUNTER+1
12407      done
12408      cd $STARTDIR
12409      BINARY=$sym_link_dir/$sym_link_file
12410    fi
12411  fi
12412
12413    BOOT_JDK=`dirname "$BINARY"`
12414    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12415    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12416      # Looks like we found ourselves an JDK
12417      BOOT_JDK_FOUND=maybe
12418      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12419$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12420    fi
12421  fi
12422
12423
12424    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12425    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12426      # Do we have a bin/java?
12427      if test ! -x "$BOOT_JDK/bin/java"; then
12428        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12430        BOOT_JDK_FOUND=no
12431      else
12432        # Do we have a bin/javac?
12433        if test ! -x "$BOOT_JDK/bin/javac"; then
12434          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12436          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12437$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12438          BOOT_JDK_FOUND=no
12439        else
12440          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12441          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12442            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12444            BOOT_JDK_FOUND=no
12445          else
12446            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12447            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12448
12449            # Extra M4 quote needed to protect [] in grep expression.
12450            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12451            if test "x$FOUND_VERSION_78" = x; then
12452              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12454              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12455$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12456              BOOT_JDK_FOUND=no
12457            else
12458              # We're done! :-)
12459              BOOT_JDK_FOUND=yes
12460
12461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12462
12463  # Input might be given as Windows format, start by converting to
12464  # unix format.
12465  path="$BOOT_JDK"
12466  new_path=`$CYGPATH -u "$path"`
12467
12468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12471  # "foo.exe" is OK but "foo" is an error.
12472  #
12473  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12474  # It is also a way to make sure we got the proper file name for the real test later on.
12475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12476  if test "x$test_shortpath" = x; then
12477    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12479    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12480  fi
12481
12482  # Call helper function which possibly converts this using DOS-style short mode.
12483  # If so, the updated path is stored in $new_path.
12484
12485  input_path="$new_path"
12486  # Check if we need to convert this using DOS-style short mode. If the path
12487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12488  # take no chances and rewrite it.
12489  # Note: m4 eats our [], so we need to use [ and ] instead.
12490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12491  if test "x$has_forbidden_chars" != x; then
12492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12496      # Going to short mode and back again did indeed matter. Since short mode is
12497      # case insensitive, let's make it lowercase to improve readability.
12498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12499      # Now convert it back to Unix-stile (cygpath)
12500      input_path=`$CYGPATH -u "$shortmode_path"`
12501      new_path="$input_path"
12502    fi
12503  fi
12504
12505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12506  if test "x$test_cygdrive_prefix" = x; then
12507    # As a simple fix, exclude /usr/bin since it's not a real path.
12508    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12510      # a path prefixed by /cygdrive for fixpath to work.
12511      new_path="$CYGWIN_ROOT_PATH$input_path"
12512    fi
12513  fi
12514
12515
12516  if test "x$path" != "x$new_path"; then
12517    BOOT_JDK="$new_path"
12518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12519$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12520  fi
12521
12522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12523
12524  path="$BOOT_JDK"
12525  has_colon=`$ECHO $path | $GREP ^.:`
12526  new_path="$path"
12527  if test "x$has_colon" = x; then
12528    # Not in mixed or Windows style, start by that.
12529    new_path=`cmd //c echo $path`
12530  fi
12531
12532
12533  input_path="$new_path"
12534  # Check if we need to convert this using DOS-style short mode. If the path
12535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12536  # take no chances and rewrite it.
12537  # Note: m4 eats our [], so we need to use [ and ] instead.
12538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12539  if test "x$has_forbidden_chars" != x; then
12540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12542  fi
12543
12544
12545  windows_path="$new_path"
12546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12547    unix_path=`$CYGPATH -u "$windows_path"`
12548    new_path="$unix_path"
12549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12551    new_path="$unix_path"
12552  fi
12553
12554  if test "x$path" != "x$new_path"; then
12555    BOOT_JDK="$new_path"
12556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12557$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12558  fi
12559
12560  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12561  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12562
12563  else
12564    # We're on a posix platform. Hooray! :)
12565    path="$BOOT_JDK"
12566    has_space=`$ECHO "$path" | $GREP " "`
12567    if test "x$has_space" != x; then
12568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12569$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12570      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12571    fi
12572
12573    # Use eval to expand a potential ~
12574    eval path="$path"
12575    if test ! -f "$path" && test ! -d "$path"; then
12576      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12577    fi
12578
12579    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12580  fi
12581
12582              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12583$as_echo_n "checking for Boot JDK... " >&6; }
12584              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12585$as_echo "$BOOT_JDK" >&6; }
12586              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12587$as_echo_n "checking Boot JDK version... " >&6; }
12588              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12589              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12590$as_echo "$BOOT_JDK_VERSION" >&6; }
12591            fi # end check jdk version
12592          fi # end check rt.jar
12593        fi # end check javac
12594      fi # end check java
12595    fi # end check boot jdk found
12596  fi
12597
12598
12599  # Test: Is there a JDK installed in default, well-known locations?
12600
12601  if test "x$BOOT_JDK_FOUND" = xno; then
12602    # Now execute the test
12603
12604  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12605
12606  if test "x$BOOT_JDK_FOUND" = xno; then
12607    # Now execute the test
12608
12609  if test "x$ProgramW6432" != x; then
12610    VIRTUAL_DIR="$ProgramW6432/Java"
12611
12612  windows_path="$VIRTUAL_DIR"
12613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12614    unix_path=`$CYGPATH -u "$windows_path"`
12615    VIRTUAL_DIR="$unix_path"
12616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12618    VIRTUAL_DIR="$unix_path"
12619  fi
12620
12621
12622  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12623  BOOT_JDK_SUFFIX=""
12624  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12625  if test "x$ALL_JDKS_FOUND" != x; then
12626    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12627
12628  if test "x$BOOT_JDK_FOUND" = xno; then
12629    # Now execute the test
12630
12631        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12632        if test -d "$BOOT_JDK"; then
12633          BOOT_JDK_FOUND=maybe
12634          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12635$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12636        fi
12637
12638
12639    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12640    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12641      # Do we have a bin/java?
12642      if test ! -x "$BOOT_JDK/bin/java"; then
12643        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12645        BOOT_JDK_FOUND=no
12646      else
12647        # Do we have a bin/javac?
12648        if test ! -x "$BOOT_JDK/bin/javac"; then
12649          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12651          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12652$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12653          BOOT_JDK_FOUND=no
12654        else
12655          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12656          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12657            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12659            BOOT_JDK_FOUND=no
12660          else
12661            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12662            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12663
12664            # Extra M4 quote needed to protect [] in grep expression.
12665            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12666            if test "x$FOUND_VERSION_78" = x; then
12667              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12669              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12670$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12671              BOOT_JDK_FOUND=no
12672            else
12673              # We're done! :-)
12674              BOOT_JDK_FOUND=yes
12675
12676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12677
12678  # Input might be given as Windows format, start by converting to
12679  # unix format.
12680  path="$BOOT_JDK"
12681  new_path=`$CYGPATH -u "$path"`
12682
12683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12686  # "foo.exe" is OK but "foo" is an error.
12687  #
12688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12689  # It is also a way to make sure we got the proper file name for the real test later on.
12690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12691  if test "x$test_shortpath" = x; then
12692    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12693$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12694    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12695  fi
12696
12697  # Call helper function which possibly converts this using DOS-style short mode.
12698  # If so, the updated path is stored in $new_path.
12699
12700  input_path="$new_path"
12701  # Check if we need to convert this using DOS-style short mode. If the path
12702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12703  # take no chances and rewrite it.
12704  # Note: m4 eats our [], so we need to use [ and ] instead.
12705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12706  if test "x$has_forbidden_chars" != x; then
12707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12711      # Going to short mode and back again did indeed matter. Since short mode is
12712      # case insensitive, let's make it lowercase to improve readability.
12713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12714      # Now convert it back to Unix-stile (cygpath)
12715      input_path=`$CYGPATH -u "$shortmode_path"`
12716      new_path="$input_path"
12717    fi
12718  fi
12719
12720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12721  if test "x$test_cygdrive_prefix" = x; then
12722    # As a simple fix, exclude /usr/bin since it's not a real path.
12723    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12725      # a path prefixed by /cygdrive for fixpath to work.
12726      new_path="$CYGWIN_ROOT_PATH$input_path"
12727    fi
12728  fi
12729
12730
12731  if test "x$path" != "x$new_path"; then
12732    BOOT_JDK="$new_path"
12733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12734$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12735  fi
12736
12737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12738
12739  path="$BOOT_JDK"
12740  has_colon=`$ECHO $path | $GREP ^.:`
12741  new_path="$path"
12742  if test "x$has_colon" = x; then
12743    # Not in mixed or Windows style, start by that.
12744    new_path=`cmd //c echo $path`
12745  fi
12746
12747
12748  input_path="$new_path"
12749  # Check if we need to convert this using DOS-style short mode. If the path
12750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12751  # take no chances and rewrite it.
12752  # Note: m4 eats our [], so we need to use [ and ] instead.
12753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12754  if test "x$has_forbidden_chars" != x; then
12755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12757  fi
12758
12759
12760  windows_path="$new_path"
12761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12762    unix_path=`$CYGPATH -u "$windows_path"`
12763    new_path="$unix_path"
12764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12766    new_path="$unix_path"
12767  fi
12768
12769  if test "x$path" != "x$new_path"; then
12770    BOOT_JDK="$new_path"
12771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12773  fi
12774
12775  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12776  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12777
12778  else
12779    # We're on a posix platform. Hooray! :)
12780    path="$BOOT_JDK"
12781    has_space=`$ECHO "$path" | $GREP " "`
12782    if test "x$has_space" != x; then
12783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12785      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12786    fi
12787
12788    # Use eval to expand a potential ~
12789    eval path="$path"
12790    if test ! -f "$path" && test ! -d "$path"; then
12791      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12792    fi
12793
12794    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12795  fi
12796
12797              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12798$as_echo_n "checking for Boot JDK... " >&6; }
12799              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12800$as_echo "$BOOT_JDK" >&6; }
12801              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12802$as_echo_n "checking Boot JDK version... " >&6; }
12803              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12804              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12805$as_echo "$BOOT_JDK_VERSION" >&6; }
12806            fi # end check jdk version
12807          fi # end check rt.jar
12808        fi # end check javac
12809      fi # end check java
12810    fi # end check boot jdk found
12811  fi
12812
12813    done
12814  fi
12815
12816  fi
12817
12818
12819    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12820    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12821      # Do we have a bin/java?
12822      if test ! -x "$BOOT_JDK/bin/java"; then
12823        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12825        BOOT_JDK_FOUND=no
12826      else
12827        # Do we have a bin/javac?
12828        if test ! -x "$BOOT_JDK/bin/javac"; then
12829          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12831          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12832$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12833          BOOT_JDK_FOUND=no
12834        else
12835          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12836          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12837            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12839            BOOT_JDK_FOUND=no
12840          else
12841            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12842            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12843
12844            # Extra M4 quote needed to protect [] in grep expression.
12845            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12846            if test "x$FOUND_VERSION_78" = x; then
12847              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12849              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12850$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12851              BOOT_JDK_FOUND=no
12852            else
12853              # We're done! :-)
12854              BOOT_JDK_FOUND=yes
12855
12856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12857
12858  # Input might be given as Windows format, start by converting to
12859  # unix format.
12860  path="$BOOT_JDK"
12861  new_path=`$CYGPATH -u "$path"`
12862
12863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12866  # "foo.exe" is OK but "foo" is an error.
12867  #
12868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12869  # It is also a way to make sure we got the proper file name for the real test later on.
12870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12871  if test "x$test_shortpath" = x; then
12872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12873$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12874    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12875  fi
12876
12877  # Call helper function which possibly converts this using DOS-style short mode.
12878  # If so, the updated path is stored in $new_path.
12879
12880  input_path="$new_path"
12881  # Check if we need to convert this using DOS-style short mode. If the path
12882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12883  # take no chances and rewrite it.
12884  # Note: m4 eats our [], so we need to use [ and ] instead.
12885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12886  if test "x$has_forbidden_chars" != x; then
12887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12891      # Going to short mode and back again did indeed matter. Since short mode is
12892      # case insensitive, let's make it lowercase to improve readability.
12893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12894      # Now convert it back to Unix-stile (cygpath)
12895      input_path=`$CYGPATH -u "$shortmode_path"`
12896      new_path="$input_path"
12897    fi
12898  fi
12899
12900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12901  if test "x$test_cygdrive_prefix" = x; then
12902    # As a simple fix, exclude /usr/bin since it's not a real path.
12903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12905      # a path prefixed by /cygdrive for fixpath to work.
12906      new_path="$CYGWIN_ROOT_PATH$input_path"
12907    fi
12908  fi
12909
12910
12911  if test "x$path" != "x$new_path"; then
12912    BOOT_JDK="$new_path"
12913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12915  fi
12916
12917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12918
12919  path="$BOOT_JDK"
12920  has_colon=`$ECHO $path | $GREP ^.:`
12921  new_path="$path"
12922  if test "x$has_colon" = x; then
12923    # Not in mixed or Windows style, start by that.
12924    new_path=`cmd //c echo $path`
12925  fi
12926
12927
12928  input_path="$new_path"
12929  # Check if we need to convert this using DOS-style short mode. If the path
12930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12931  # take no chances and rewrite it.
12932  # Note: m4 eats our [], so we need to use [ and ] instead.
12933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12934  if test "x$has_forbidden_chars" != x; then
12935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12937  fi
12938
12939
12940  windows_path="$new_path"
12941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12942    unix_path=`$CYGPATH -u "$windows_path"`
12943    new_path="$unix_path"
12944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12946    new_path="$unix_path"
12947  fi
12948
12949  if test "x$path" != "x$new_path"; then
12950    BOOT_JDK="$new_path"
12951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12952$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12953  fi
12954
12955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12957
12958  else
12959    # We're on a posix platform. Hooray! :)
12960    path="$BOOT_JDK"
12961    has_space=`$ECHO "$path" | $GREP " "`
12962    if test "x$has_space" != x; then
12963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12964$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12965      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12966    fi
12967
12968    # Use eval to expand a potential ~
12969    eval path="$path"
12970    if test ! -f "$path" && test ! -d "$path"; then
12971      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12972    fi
12973
12974    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12975  fi
12976
12977              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12978$as_echo_n "checking for Boot JDK... " >&6; }
12979              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12980$as_echo "$BOOT_JDK" >&6; }
12981              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12982$as_echo_n "checking Boot JDK version... " >&6; }
12983              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12984              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12985$as_echo "$BOOT_JDK_VERSION" >&6; }
12986            fi # end check jdk version
12987          fi # end check rt.jar
12988        fi # end check javac
12989      fi # end check java
12990    fi # end check boot jdk found
12991  fi
12992
12993
12994  if test "x$BOOT_JDK_FOUND" = xno; then
12995    # Now execute the test
12996
12997  if test "x$PROGRAMW6432" != x; then
12998    VIRTUAL_DIR="$PROGRAMW6432/Java"
12999
13000  windows_path="$VIRTUAL_DIR"
13001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13002    unix_path=`$CYGPATH -u "$windows_path"`
13003    VIRTUAL_DIR="$unix_path"
13004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13006    VIRTUAL_DIR="$unix_path"
13007  fi
13008
13009
13010  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13011  BOOT_JDK_SUFFIX=""
13012  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13013  if test "x$ALL_JDKS_FOUND" != x; then
13014    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13015
13016  if test "x$BOOT_JDK_FOUND" = xno; then
13017    # Now execute the test
13018
13019        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13020        if test -d "$BOOT_JDK"; then
13021          BOOT_JDK_FOUND=maybe
13022          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13023$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13024        fi
13025
13026
13027    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13028    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13029      # Do we have a bin/java?
13030      if test ! -x "$BOOT_JDK/bin/java"; then
13031        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13033        BOOT_JDK_FOUND=no
13034      else
13035        # Do we have a bin/javac?
13036        if test ! -x "$BOOT_JDK/bin/javac"; then
13037          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13039          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13040$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13041          BOOT_JDK_FOUND=no
13042        else
13043          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13044          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13045            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13047            BOOT_JDK_FOUND=no
13048          else
13049            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13050            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13051
13052            # Extra M4 quote needed to protect [] in grep expression.
13053            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13054            if test "x$FOUND_VERSION_78" = x; then
13055              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13057              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13058$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13059              BOOT_JDK_FOUND=no
13060            else
13061              # We're done! :-)
13062              BOOT_JDK_FOUND=yes
13063
13064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13065
13066  # Input might be given as Windows format, start by converting to
13067  # unix format.
13068  path="$BOOT_JDK"
13069  new_path=`$CYGPATH -u "$path"`
13070
13071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13074  # "foo.exe" is OK but "foo" is an error.
13075  #
13076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13077  # It is also a way to make sure we got the proper file name for the real test later on.
13078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13079  if test "x$test_shortpath" = x; then
13080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13082    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13083  fi
13084
13085  # Call helper function which possibly converts this using DOS-style short mode.
13086  # If so, the updated path is stored in $new_path.
13087
13088  input_path="$new_path"
13089  # Check if we need to convert this using DOS-style short mode. If the path
13090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13091  # take no chances and rewrite it.
13092  # Note: m4 eats our [], so we need to use [ and ] instead.
13093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13094  if test "x$has_forbidden_chars" != x; then
13095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13099      # Going to short mode and back again did indeed matter. Since short mode is
13100      # case insensitive, let's make it lowercase to improve readability.
13101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13102      # Now convert it back to Unix-stile (cygpath)
13103      input_path=`$CYGPATH -u "$shortmode_path"`
13104      new_path="$input_path"
13105    fi
13106  fi
13107
13108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13109  if test "x$test_cygdrive_prefix" = x; then
13110    # As a simple fix, exclude /usr/bin since it's not a real path.
13111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13113      # a path prefixed by /cygdrive for fixpath to work.
13114      new_path="$CYGWIN_ROOT_PATH$input_path"
13115    fi
13116  fi
13117
13118
13119  if test "x$path" != "x$new_path"; then
13120    BOOT_JDK="$new_path"
13121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13123  fi
13124
13125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13126
13127  path="$BOOT_JDK"
13128  has_colon=`$ECHO $path | $GREP ^.:`
13129  new_path="$path"
13130  if test "x$has_colon" = x; then
13131    # Not in mixed or Windows style, start by that.
13132    new_path=`cmd //c echo $path`
13133  fi
13134
13135
13136  input_path="$new_path"
13137  # Check if we need to convert this using DOS-style short mode. If the path
13138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13139  # take no chances and rewrite it.
13140  # Note: m4 eats our [], so we need to use [ and ] instead.
13141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13142  if test "x$has_forbidden_chars" != x; then
13143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13145  fi
13146
13147
13148  windows_path="$new_path"
13149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13150    unix_path=`$CYGPATH -u "$windows_path"`
13151    new_path="$unix_path"
13152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13154    new_path="$unix_path"
13155  fi
13156
13157  if test "x$path" != "x$new_path"; then
13158    BOOT_JDK="$new_path"
13159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13161  fi
13162
13163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13165
13166  else
13167    # We're on a posix platform. Hooray! :)
13168    path="$BOOT_JDK"
13169    has_space=`$ECHO "$path" | $GREP " "`
13170    if test "x$has_space" != x; then
13171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13173      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13174    fi
13175
13176    # Use eval to expand a potential ~
13177    eval path="$path"
13178    if test ! -f "$path" && test ! -d "$path"; then
13179      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13180    fi
13181
13182    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13183  fi
13184
13185              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13186$as_echo_n "checking for Boot JDK... " >&6; }
13187              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13188$as_echo "$BOOT_JDK" >&6; }
13189              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13190$as_echo_n "checking Boot JDK version... " >&6; }
13191              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13192              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13193$as_echo "$BOOT_JDK_VERSION" >&6; }
13194            fi # end check jdk version
13195          fi # end check rt.jar
13196        fi # end check javac
13197      fi # end check java
13198    fi # end check boot jdk found
13199  fi
13200
13201    done
13202  fi
13203
13204  fi
13205
13206
13207    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13208    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13209      # Do we have a bin/java?
13210      if test ! -x "$BOOT_JDK/bin/java"; then
13211        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13213        BOOT_JDK_FOUND=no
13214      else
13215        # Do we have a bin/javac?
13216        if test ! -x "$BOOT_JDK/bin/javac"; then
13217          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13219          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13220$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13221          BOOT_JDK_FOUND=no
13222        else
13223          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13224          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13225            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13227            BOOT_JDK_FOUND=no
13228          else
13229            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13230            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13231
13232            # Extra M4 quote needed to protect [] in grep expression.
13233            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13234            if test "x$FOUND_VERSION_78" = x; then
13235              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13237              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13238$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13239              BOOT_JDK_FOUND=no
13240            else
13241              # We're done! :-)
13242              BOOT_JDK_FOUND=yes
13243
13244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13245
13246  # Input might be given as Windows format, start by converting to
13247  # unix format.
13248  path="$BOOT_JDK"
13249  new_path=`$CYGPATH -u "$path"`
13250
13251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13254  # "foo.exe" is OK but "foo" is an error.
13255  #
13256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13257  # It is also a way to make sure we got the proper file name for the real test later on.
13258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13259  if test "x$test_shortpath" = x; then
13260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13261$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13262    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13263  fi
13264
13265  # Call helper function which possibly converts this using DOS-style short mode.
13266  # If so, the updated path is stored in $new_path.
13267
13268  input_path="$new_path"
13269  # Check if we need to convert this using DOS-style short mode. If the path
13270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13271  # take no chances and rewrite it.
13272  # Note: m4 eats our [], so we need to use [ and ] instead.
13273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13274  if test "x$has_forbidden_chars" != x; then
13275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13279      # Going to short mode and back again did indeed matter. Since short mode is
13280      # case insensitive, let's make it lowercase to improve readability.
13281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13282      # Now convert it back to Unix-stile (cygpath)
13283      input_path=`$CYGPATH -u "$shortmode_path"`
13284      new_path="$input_path"
13285    fi
13286  fi
13287
13288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13289  if test "x$test_cygdrive_prefix" = x; then
13290    # As a simple fix, exclude /usr/bin since it's not a real path.
13291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13293      # a path prefixed by /cygdrive for fixpath to work.
13294      new_path="$CYGWIN_ROOT_PATH$input_path"
13295    fi
13296  fi
13297
13298
13299  if test "x$path" != "x$new_path"; then
13300    BOOT_JDK="$new_path"
13301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13302$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13303  fi
13304
13305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13306
13307  path="$BOOT_JDK"
13308  has_colon=`$ECHO $path | $GREP ^.:`
13309  new_path="$path"
13310  if test "x$has_colon" = x; then
13311    # Not in mixed or Windows style, start by that.
13312    new_path=`cmd //c echo $path`
13313  fi
13314
13315
13316  input_path="$new_path"
13317  # Check if we need to convert this using DOS-style short mode. If the path
13318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13319  # take no chances and rewrite it.
13320  # Note: m4 eats our [], so we need to use [ and ] instead.
13321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13322  if test "x$has_forbidden_chars" != x; then
13323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13325  fi
13326
13327
13328  windows_path="$new_path"
13329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13330    unix_path=`$CYGPATH -u "$windows_path"`
13331    new_path="$unix_path"
13332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13334    new_path="$unix_path"
13335  fi
13336
13337  if test "x$path" != "x$new_path"; then
13338    BOOT_JDK="$new_path"
13339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13341  fi
13342
13343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13345
13346  else
13347    # We're on a posix platform. Hooray! :)
13348    path="$BOOT_JDK"
13349    has_space=`$ECHO "$path" | $GREP " "`
13350    if test "x$has_space" != x; then
13351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13352$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13353      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13354    fi
13355
13356    # Use eval to expand a potential ~
13357    eval path="$path"
13358    if test ! -f "$path" && test ! -d "$path"; then
13359      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13360    fi
13361
13362    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13363  fi
13364
13365              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13366$as_echo_n "checking for Boot JDK... " >&6; }
13367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13368$as_echo "$BOOT_JDK" >&6; }
13369              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13370$as_echo_n "checking Boot JDK version... " >&6; }
13371              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13372              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13373$as_echo "$BOOT_JDK_VERSION" >&6; }
13374            fi # end check jdk version
13375          fi # end check rt.jar
13376        fi # end check javac
13377      fi # end check java
13378    fi # end check boot jdk found
13379  fi
13380
13381
13382  if test "x$BOOT_JDK_FOUND" = xno; then
13383    # Now execute the test
13384
13385  if test "x$PROGRAMFILES" != x; then
13386    VIRTUAL_DIR="$PROGRAMFILES/Java"
13387
13388  windows_path="$VIRTUAL_DIR"
13389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13390    unix_path=`$CYGPATH -u "$windows_path"`
13391    VIRTUAL_DIR="$unix_path"
13392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13394    VIRTUAL_DIR="$unix_path"
13395  fi
13396
13397
13398  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13399  BOOT_JDK_SUFFIX=""
13400  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13401  if test "x$ALL_JDKS_FOUND" != x; then
13402    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13403
13404  if test "x$BOOT_JDK_FOUND" = xno; then
13405    # Now execute the test
13406
13407        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13408        if test -d "$BOOT_JDK"; then
13409          BOOT_JDK_FOUND=maybe
13410          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13411$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13412        fi
13413
13414
13415    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13416    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13417      # Do we have a bin/java?
13418      if test ! -x "$BOOT_JDK/bin/java"; then
13419        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13421        BOOT_JDK_FOUND=no
13422      else
13423        # Do we have a bin/javac?
13424        if test ! -x "$BOOT_JDK/bin/javac"; then
13425          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13427          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13428$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13429          BOOT_JDK_FOUND=no
13430        else
13431          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13432          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13433            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13435            BOOT_JDK_FOUND=no
13436          else
13437            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13438            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13439
13440            # Extra M4 quote needed to protect [] in grep expression.
13441            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13442            if test "x$FOUND_VERSION_78" = x; then
13443              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13445              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13446$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13447              BOOT_JDK_FOUND=no
13448            else
13449              # We're done! :-)
13450              BOOT_JDK_FOUND=yes
13451
13452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13453
13454  # Input might be given as Windows format, start by converting to
13455  # unix format.
13456  path="$BOOT_JDK"
13457  new_path=`$CYGPATH -u "$path"`
13458
13459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13462  # "foo.exe" is OK but "foo" is an error.
13463  #
13464  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13465  # It is also a way to make sure we got the proper file name for the real test later on.
13466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13467  if test "x$test_shortpath" = x; then
13468    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13469$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13470    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13471  fi
13472
13473  # Call helper function which possibly converts this using DOS-style short mode.
13474  # If so, the updated path is stored in $new_path.
13475
13476  input_path="$new_path"
13477  # Check if we need to convert this using DOS-style short mode. If the path
13478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13479  # take no chances and rewrite it.
13480  # Note: m4 eats our [], so we need to use [ and ] instead.
13481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13482  if test "x$has_forbidden_chars" != x; then
13483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13487      # Going to short mode and back again did indeed matter. Since short mode is
13488      # case insensitive, let's make it lowercase to improve readability.
13489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13490      # Now convert it back to Unix-stile (cygpath)
13491      input_path=`$CYGPATH -u "$shortmode_path"`
13492      new_path="$input_path"
13493    fi
13494  fi
13495
13496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13497  if test "x$test_cygdrive_prefix" = x; then
13498    # As a simple fix, exclude /usr/bin since it's not a real path.
13499    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13501      # a path prefixed by /cygdrive for fixpath to work.
13502      new_path="$CYGWIN_ROOT_PATH$input_path"
13503    fi
13504  fi
13505
13506
13507  if test "x$path" != "x$new_path"; then
13508    BOOT_JDK="$new_path"
13509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13510$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13511  fi
13512
13513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13514
13515  path="$BOOT_JDK"
13516  has_colon=`$ECHO $path | $GREP ^.:`
13517  new_path="$path"
13518  if test "x$has_colon" = x; then
13519    # Not in mixed or Windows style, start by that.
13520    new_path=`cmd //c echo $path`
13521  fi
13522
13523
13524  input_path="$new_path"
13525  # Check if we need to convert this using DOS-style short mode. If the path
13526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13527  # take no chances and rewrite it.
13528  # Note: m4 eats our [], so we need to use [ and ] instead.
13529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13530  if test "x$has_forbidden_chars" != x; then
13531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13532    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13533  fi
13534
13535
13536  windows_path="$new_path"
13537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13538    unix_path=`$CYGPATH -u "$windows_path"`
13539    new_path="$unix_path"
13540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13542    new_path="$unix_path"
13543  fi
13544
13545  if test "x$path" != "x$new_path"; then
13546    BOOT_JDK="$new_path"
13547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13548$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13549  fi
13550
13551  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13552  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13553
13554  else
13555    # We're on a posix platform. Hooray! :)
13556    path="$BOOT_JDK"
13557    has_space=`$ECHO "$path" | $GREP " "`
13558    if test "x$has_space" != x; then
13559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13561      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13562    fi
13563
13564    # Use eval to expand a potential ~
13565    eval path="$path"
13566    if test ! -f "$path" && test ! -d "$path"; then
13567      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13568    fi
13569
13570    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13571  fi
13572
13573              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13574$as_echo_n "checking for Boot JDK... " >&6; }
13575              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13576$as_echo "$BOOT_JDK" >&6; }
13577              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13578$as_echo_n "checking Boot JDK version... " >&6; }
13579              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13580              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13581$as_echo "$BOOT_JDK_VERSION" >&6; }
13582            fi # end check jdk version
13583          fi # end check rt.jar
13584        fi # end check javac
13585      fi # end check java
13586    fi # end check boot jdk found
13587  fi
13588
13589    done
13590  fi
13591
13592  fi
13593
13594
13595    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13596    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13597      # Do we have a bin/java?
13598      if test ! -x "$BOOT_JDK/bin/java"; then
13599        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13601        BOOT_JDK_FOUND=no
13602      else
13603        # Do we have a bin/javac?
13604        if test ! -x "$BOOT_JDK/bin/javac"; then
13605          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13607          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13608$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13609          BOOT_JDK_FOUND=no
13610        else
13611          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13612          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13613            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13615            BOOT_JDK_FOUND=no
13616          else
13617            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13618            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13619
13620            # Extra M4 quote needed to protect [] in grep expression.
13621            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13622            if test "x$FOUND_VERSION_78" = x; then
13623              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13625              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13626$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13627              BOOT_JDK_FOUND=no
13628            else
13629              # We're done! :-)
13630              BOOT_JDK_FOUND=yes
13631
13632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13633
13634  # Input might be given as Windows format, start by converting to
13635  # unix format.
13636  path="$BOOT_JDK"
13637  new_path=`$CYGPATH -u "$path"`
13638
13639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13642  # "foo.exe" is OK but "foo" is an error.
13643  #
13644  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13645  # It is also a way to make sure we got the proper file name for the real test later on.
13646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13647  if test "x$test_shortpath" = x; then
13648    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13650    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13651  fi
13652
13653  # Call helper function which possibly converts this using DOS-style short mode.
13654  # If so, the updated path is stored in $new_path.
13655
13656  input_path="$new_path"
13657  # Check if we need to convert this using DOS-style short mode. If the path
13658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13659  # take no chances and rewrite it.
13660  # Note: m4 eats our [], so we need to use [ and ] instead.
13661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13662  if test "x$has_forbidden_chars" != x; then
13663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13667      # Going to short mode and back again did indeed matter. Since short mode is
13668      # case insensitive, let's make it lowercase to improve readability.
13669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13670      # Now convert it back to Unix-stile (cygpath)
13671      input_path=`$CYGPATH -u "$shortmode_path"`
13672      new_path="$input_path"
13673    fi
13674  fi
13675
13676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13677  if test "x$test_cygdrive_prefix" = x; then
13678    # As a simple fix, exclude /usr/bin since it's not a real path.
13679    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13681      # a path prefixed by /cygdrive for fixpath to work.
13682      new_path="$CYGWIN_ROOT_PATH$input_path"
13683    fi
13684  fi
13685
13686
13687  if test "x$path" != "x$new_path"; then
13688    BOOT_JDK="$new_path"
13689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13690$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13691  fi
13692
13693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13694
13695  path="$BOOT_JDK"
13696  has_colon=`$ECHO $path | $GREP ^.:`
13697  new_path="$path"
13698  if test "x$has_colon" = x; then
13699    # Not in mixed or Windows style, start by that.
13700    new_path=`cmd //c echo $path`
13701  fi
13702
13703
13704  input_path="$new_path"
13705  # Check if we need to convert this using DOS-style short mode. If the path
13706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13707  # take no chances and rewrite it.
13708  # Note: m4 eats our [], so we need to use [ and ] instead.
13709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13710  if test "x$has_forbidden_chars" != x; then
13711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13713  fi
13714
13715
13716  windows_path="$new_path"
13717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13718    unix_path=`$CYGPATH -u "$windows_path"`
13719    new_path="$unix_path"
13720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13722    new_path="$unix_path"
13723  fi
13724
13725  if test "x$path" != "x$new_path"; then
13726    BOOT_JDK="$new_path"
13727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13729  fi
13730
13731  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13732  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13733
13734  else
13735    # We're on a posix platform. Hooray! :)
13736    path="$BOOT_JDK"
13737    has_space=`$ECHO "$path" | $GREP " "`
13738    if test "x$has_space" != x; then
13739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13740$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13741      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13742    fi
13743
13744    # Use eval to expand a potential ~
13745    eval path="$path"
13746    if test ! -f "$path" && test ! -d "$path"; then
13747      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13748    fi
13749
13750    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13751  fi
13752
13753              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13754$as_echo_n "checking for Boot JDK... " >&6; }
13755              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13756$as_echo "$BOOT_JDK" >&6; }
13757              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13758$as_echo_n "checking Boot JDK version... " >&6; }
13759              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13760              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13761$as_echo "$BOOT_JDK_VERSION" >&6; }
13762            fi # end check jdk version
13763          fi # end check rt.jar
13764        fi # end check javac
13765      fi # end check java
13766    fi # end check boot jdk found
13767  fi
13768
13769
13770  if test "x$BOOT_JDK_FOUND" = xno; then
13771    # Now execute the test
13772
13773  if test "x$ProgramFiles" != x; then
13774    VIRTUAL_DIR="$ProgramFiles/Java"
13775
13776  windows_path="$VIRTUAL_DIR"
13777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13778    unix_path=`$CYGPATH -u "$windows_path"`
13779    VIRTUAL_DIR="$unix_path"
13780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13782    VIRTUAL_DIR="$unix_path"
13783  fi
13784
13785
13786  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13787  BOOT_JDK_SUFFIX=""
13788  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13789  if test "x$ALL_JDKS_FOUND" != x; then
13790    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13791
13792  if test "x$BOOT_JDK_FOUND" = xno; then
13793    # Now execute the test
13794
13795        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13796        if test -d "$BOOT_JDK"; then
13797          BOOT_JDK_FOUND=maybe
13798          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13799$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13800        fi
13801
13802
13803    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13804    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13805      # Do we have a bin/java?
13806      if test ! -x "$BOOT_JDK/bin/java"; then
13807        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13809        BOOT_JDK_FOUND=no
13810      else
13811        # Do we have a bin/javac?
13812        if test ! -x "$BOOT_JDK/bin/javac"; then
13813          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13815          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13816$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13817          BOOT_JDK_FOUND=no
13818        else
13819          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13820          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13821            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13823            BOOT_JDK_FOUND=no
13824          else
13825            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13826            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13827
13828            # Extra M4 quote needed to protect [] in grep expression.
13829            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13830            if test "x$FOUND_VERSION_78" = x; then
13831              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13833              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13834$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13835              BOOT_JDK_FOUND=no
13836            else
13837              # We're done! :-)
13838              BOOT_JDK_FOUND=yes
13839
13840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13841
13842  # Input might be given as Windows format, start by converting to
13843  # unix format.
13844  path="$BOOT_JDK"
13845  new_path=`$CYGPATH -u "$path"`
13846
13847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13850  # "foo.exe" is OK but "foo" is an error.
13851  #
13852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13853  # It is also a way to make sure we got the proper file name for the real test later on.
13854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13855  if test "x$test_shortpath" = x; then
13856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13858    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13859  fi
13860
13861  # Call helper function which possibly converts this using DOS-style short mode.
13862  # If so, the updated path is stored in $new_path.
13863
13864  input_path="$new_path"
13865  # Check if we need to convert this using DOS-style short mode. If the path
13866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13867  # take no chances and rewrite it.
13868  # Note: m4 eats our [], so we need to use [ and ] instead.
13869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13870  if test "x$has_forbidden_chars" != x; then
13871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13875      # Going to short mode and back again did indeed matter. Since short mode is
13876      # case insensitive, let's make it lowercase to improve readability.
13877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13878      # Now convert it back to Unix-stile (cygpath)
13879      input_path=`$CYGPATH -u "$shortmode_path"`
13880      new_path="$input_path"
13881    fi
13882  fi
13883
13884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13885  if test "x$test_cygdrive_prefix" = x; then
13886    # As a simple fix, exclude /usr/bin since it's not a real path.
13887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13889      # a path prefixed by /cygdrive for fixpath to work.
13890      new_path="$CYGWIN_ROOT_PATH$input_path"
13891    fi
13892  fi
13893
13894
13895  if test "x$path" != "x$new_path"; then
13896    BOOT_JDK="$new_path"
13897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13899  fi
13900
13901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13902
13903  path="$BOOT_JDK"
13904  has_colon=`$ECHO $path | $GREP ^.:`
13905  new_path="$path"
13906  if test "x$has_colon" = x; then
13907    # Not in mixed or Windows style, start by that.
13908    new_path=`cmd //c echo $path`
13909  fi
13910
13911
13912  input_path="$new_path"
13913  # Check if we need to convert this using DOS-style short mode. If the path
13914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13915  # take no chances and rewrite it.
13916  # Note: m4 eats our [], so we need to use [ and ] instead.
13917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13918  if test "x$has_forbidden_chars" != x; then
13919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13921  fi
13922
13923
13924  windows_path="$new_path"
13925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13926    unix_path=`$CYGPATH -u "$windows_path"`
13927    new_path="$unix_path"
13928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13930    new_path="$unix_path"
13931  fi
13932
13933  if test "x$path" != "x$new_path"; then
13934    BOOT_JDK="$new_path"
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13937  fi
13938
13939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13941
13942  else
13943    # We're on a posix platform. Hooray! :)
13944    path="$BOOT_JDK"
13945    has_space=`$ECHO "$path" | $GREP " "`
13946    if test "x$has_space" != x; then
13947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13948$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13949      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13950    fi
13951
13952    # Use eval to expand a potential ~
13953    eval path="$path"
13954    if test ! -f "$path" && test ! -d "$path"; then
13955      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13956    fi
13957
13958    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13959  fi
13960
13961              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13962$as_echo_n "checking for Boot JDK... " >&6; }
13963              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13964$as_echo "$BOOT_JDK" >&6; }
13965              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13966$as_echo_n "checking Boot JDK version... " >&6; }
13967              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13968              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13969$as_echo "$BOOT_JDK_VERSION" >&6; }
13970            fi # end check jdk version
13971          fi # end check rt.jar
13972        fi # end check javac
13973      fi # end check java
13974    fi # end check boot jdk found
13975  fi
13976
13977    done
13978  fi
13979
13980  fi
13981
13982
13983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13985      # Do we have a bin/java?
13986      if test ! -x "$BOOT_JDK/bin/java"; then
13987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13989        BOOT_JDK_FOUND=no
13990      else
13991        # Do we have a bin/javac?
13992        if test ! -x "$BOOT_JDK/bin/javac"; then
13993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13997          BOOT_JDK_FOUND=no
13998        else
13999          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14000          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14003            BOOT_JDK_FOUND=no
14004          else
14005            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14006            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14007
14008            # Extra M4 quote needed to protect [] in grep expression.
14009            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14010            if test "x$FOUND_VERSION_78" = x; then
14011              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14013              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14014$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14015              BOOT_JDK_FOUND=no
14016            else
14017              # We're done! :-)
14018              BOOT_JDK_FOUND=yes
14019
14020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14021
14022  # Input might be given as Windows format, start by converting to
14023  # unix format.
14024  path="$BOOT_JDK"
14025  new_path=`$CYGPATH -u "$path"`
14026
14027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14030  # "foo.exe" is OK but "foo" is an error.
14031  #
14032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14033  # It is also a way to make sure we got the proper file name for the real test later on.
14034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14035  if test "x$test_shortpath" = x; then
14036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14038    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14039  fi
14040
14041  # Call helper function which possibly converts this using DOS-style short mode.
14042  # If so, the updated path is stored in $new_path.
14043
14044  input_path="$new_path"
14045  # Check if we need to convert this using DOS-style short mode. If the path
14046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14047  # take no chances and rewrite it.
14048  # Note: m4 eats our [], so we need to use [ and ] instead.
14049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14050  if test "x$has_forbidden_chars" != x; then
14051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14055      # Going to short mode and back again did indeed matter. Since short mode is
14056      # case insensitive, let's make it lowercase to improve readability.
14057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14058      # Now convert it back to Unix-stile (cygpath)
14059      input_path=`$CYGPATH -u "$shortmode_path"`
14060      new_path="$input_path"
14061    fi
14062  fi
14063
14064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14065  if test "x$test_cygdrive_prefix" = x; then
14066    # As a simple fix, exclude /usr/bin since it's not a real path.
14067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14069      # a path prefixed by /cygdrive for fixpath to work.
14070      new_path="$CYGWIN_ROOT_PATH$input_path"
14071    fi
14072  fi
14073
14074
14075  if test "x$path" != "x$new_path"; then
14076    BOOT_JDK="$new_path"
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14079  fi
14080
14081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14082
14083  path="$BOOT_JDK"
14084  has_colon=`$ECHO $path | $GREP ^.:`
14085  new_path="$path"
14086  if test "x$has_colon" = x; then
14087    # Not in mixed or Windows style, start by that.
14088    new_path=`cmd //c echo $path`
14089  fi
14090
14091
14092  input_path="$new_path"
14093  # Check if we need to convert this using DOS-style short mode. If the path
14094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14095  # take no chances and rewrite it.
14096  # Note: m4 eats our [], so we need to use [ and ] instead.
14097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14098  if test "x$has_forbidden_chars" != x; then
14099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14101  fi
14102
14103
14104  windows_path="$new_path"
14105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14106    unix_path=`$CYGPATH -u "$windows_path"`
14107    new_path="$unix_path"
14108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14110    new_path="$unix_path"
14111  fi
14112
14113  if test "x$path" != "x$new_path"; then
14114    BOOT_JDK="$new_path"
14115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14117  fi
14118
14119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14121
14122  else
14123    # We're on a posix platform. Hooray! :)
14124    path="$BOOT_JDK"
14125    has_space=`$ECHO "$path" | $GREP " "`
14126    if test "x$has_space" != x; then
14127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14128$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14129      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14130    fi
14131
14132    # Use eval to expand a potential ~
14133    eval path="$path"
14134    if test ! -f "$path" && test ! -d "$path"; then
14135      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14136    fi
14137
14138    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14139  fi
14140
14141              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14142$as_echo_n "checking for Boot JDK... " >&6; }
14143              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14144$as_echo "$BOOT_JDK" >&6; }
14145              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14146$as_echo_n "checking Boot JDK version... " >&6; }
14147              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14148              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14149$as_echo "$BOOT_JDK_VERSION" >&6; }
14150            fi # end check jdk version
14151          fi # end check rt.jar
14152        fi # end check javac
14153      fi # end check java
14154    fi # end check boot jdk found
14155  fi
14156
14157
14158  if test "x$BOOT_JDK_FOUND" = xno; then
14159    # Now execute the test
14160
14161  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14162  BOOT_JDK_SUFFIX=""
14163  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14164  if test "x$ALL_JDKS_FOUND" != x; then
14165    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14166
14167  if test "x$BOOT_JDK_FOUND" = xno; then
14168    # Now execute the test
14169
14170        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14171        if test -d "$BOOT_JDK"; then
14172          BOOT_JDK_FOUND=maybe
14173          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14174$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14175        fi
14176
14177
14178    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14179    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14180      # Do we have a bin/java?
14181      if test ! -x "$BOOT_JDK/bin/java"; then
14182        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14184        BOOT_JDK_FOUND=no
14185      else
14186        # Do we have a bin/javac?
14187        if test ! -x "$BOOT_JDK/bin/javac"; then
14188          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14190          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14191$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14192          BOOT_JDK_FOUND=no
14193        else
14194          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14195          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14196            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14198            BOOT_JDK_FOUND=no
14199          else
14200            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14201            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14202
14203            # Extra M4 quote needed to protect [] in grep expression.
14204            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14205            if test "x$FOUND_VERSION_78" = x; then
14206              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14208              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14209$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14210              BOOT_JDK_FOUND=no
14211            else
14212              # We're done! :-)
14213              BOOT_JDK_FOUND=yes
14214
14215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14216
14217  # Input might be given as Windows format, start by converting to
14218  # unix format.
14219  path="$BOOT_JDK"
14220  new_path=`$CYGPATH -u "$path"`
14221
14222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14225  # "foo.exe" is OK but "foo" is an error.
14226  #
14227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14228  # It is also a way to make sure we got the proper file name for the real test later on.
14229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14230  if test "x$test_shortpath" = x; then
14231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14234  fi
14235
14236  # Call helper function which possibly converts this using DOS-style short mode.
14237  # If so, the updated path is stored in $new_path.
14238
14239  input_path="$new_path"
14240  # Check if we need to convert this using DOS-style short mode. If the path
14241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14242  # take no chances and rewrite it.
14243  # Note: m4 eats our [], so we need to use [ and ] instead.
14244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14245  if test "x$has_forbidden_chars" != x; then
14246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14250      # Going to short mode and back again did indeed matter. Since short mode is
14251      # case insensitive, let's make it lowercase to improve readability.
14252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14253      # Now convert it back to Unix-stile (cygpath)
14254      input_path=`$CYGPATH -u "$shortmode_path"`
14255      new_path="$input_path"
14256    fi
14257  fi
14258
14259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14260  if test "x$test_cygdrive_prefix" = x; then
14261    # As a simple fix, exclude /usr/bin since it's not a real path.
14262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14264      # a path prefixed by /cygdrive for fixpath to work.
14265      new_path="$CYGWIN_ROOT_PATH$input_path"
14266    fi
14267  fi
14268
14269
14270  if test "x$path" != "x$new_path"; then
14271    BOOT_JDK="$new_path"
14272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14274  fi
14275
14276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14277
14278  path="$BOOT_JDK"
14279  has_colon=`$ECHO $path | $GREP ^.:`
14280  new_path="$path"
14281  if test "x$has_colon" = x; then
14282    # Not in mixed or Windows style, start by that.
14283    new_path=`cmd //c echo $path`
14284  fi
14285
14286
14287  input_path="$new_path"
14288  # Check if we need to convert this using DOS-style short mode. If the path
14289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14290  # take no chances and rewrite it.
14291  # Note: m4 eats our [], so we need to use [ and ] instead.
14292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14293  if test "x$has_forbidden_chars" != x; then
14294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14296  fi
14297
14298
14299  windows_path="$new_path"
14300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14301    unix_path=`$CYGPATH -u "$windows_path"`
14302    new_path="$unix_path"
14303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14305    new_path="$unix_path"
14306  fi
14307
14308  if test "x$path" != "x$new_path"; then
14309    BOOT_JDK="$new_path"
14310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14312  fi
14313
14314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14316
14317  else
14318    # We're on a posix platform. Hooray! :)
14319    path="$BOOT_JDK"
14320    has_space=`$ECHO "$path" | $GREP " "`
14321    if test "x$has_space" != x; then
14322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14324      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14325    fi
14326
14327    # Use eval to expand a potential ~
14328    eval path="$path"
14329    if test ! -f "$path" && test ! -d "$path"; then
14330      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14331    fi
14332
14333    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14334  fi
14335
14336              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14337$as_echo_n "checking for Boot JDK... " >&6; }
14338              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14339$as_echo "$BOOT_JDK" >&6; }
14340              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14341$as_echo_n "checking Boot JDK version... " >&6; }
14342              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14343              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14344$as_echo "$BOOT_JDK_VERSION" >&6; }
14345            fi # end check jdk version
14346          fi # end check rt.jar
14347        fi # end check javac
14348      fi # end check java
14349    fi # end check boot jdk found
14350  fi
14351
14352    done
14353  fi
14354
14355
14356    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14357    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14358      # Do we have a bin/java?
14359      if test ! -x "$BOOT_JDK/bin/java"; then
14360        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14362        BOOT_JDK_FOUND=no
14363      else
14364        # Do we have a bin/javac?
14365        if test ! -x "$BOOT_JDK/bin/javac"; then
14366          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14368          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14369$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14370          BOOT_JDK_FOUND=no
14371        else
14372          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14373          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14374            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14376            BOOT_JDK_FOUND=no
14377          else
14378            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14379            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14380
14381            # Extra M4 quote needed to protect [] in grep expression.
14382            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14383            if test "x$FOUND_VERSION_78" = x; then
14384              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14386              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14387$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14388              BOOT_JDK_FOUND=no
14389            else
14390              # We're done! :-)
14391              BOOT_JDK_FOUND=yes
14392
14393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14394
14395  # Input might be given as Windows format, start by converting to
14396  # unix format.
14397  path="$BOOT_JDK"
14398  new_path=`$CYGPATH -u "$path"`
14399
14400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14403  # "foo.exe" is OK but "foo" is an error.
14404  #
14405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14406  # It is also a way to make sure we got the proper file name for the real test later on.
14407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14408  if test "x$test_shortpath" = x; then
14409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14410$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14411    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14412  fi
14413
14414  # Call helper function which possibly converts this using DOS-style short mode.
14415  # If so, the updated path is stored in $new_path.
14416
14417  input_path="$new_path"
14418  # Check if we need to convert this using DOS-style short mode. If the path
14419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14420  # take no chances and rewrite it.
14421  # Note: m4 eats our [], so we need to use [ and ] instead.
14422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14423  if test "x$has_forbidden_chars" != x; then
14424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14428      # Going to short mode and back again did indeed matter. Since short mode is
14429      # case insensitive, let's make it lowercase to improve readability.
14430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14431      # Now convert it back to Unix-stile (cygpath)
14432      input_path=`$CYGPATH -u "$shortmode_path"`
14433      new_path="$input_path"
14434    fi
14435  fi
14436
14437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14438  if test "x$test_cygdrive_prefix" = x; then
14439    # As a simple fix, exclude /usr/bin since it's not a real path.
14440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14442      # a path prefixed by /cygdrive for fixpath to work.
14443      new_path="$CYGWIN_ROOT_PATH$input_path"
14444    fi
14445  fi
14446
14447
14448  if test "x$path" != "x$new_path"; then
14449    BOOT_JDK="$new_path"
14450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14452  fi
14453
14454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14455
14456  path="$BOOT_JDK"
14457  has_colon=`$ECHO $path | $GREP ^.:`
14458  new_path="$path"
14459  if test "x$has_colon" = x; then
14460    # Not in mixed or Windows style, start by that.
14461    new_path=`cmd //c echo $path`
14462  fi
14463
14464
14465  input_path="$new_path"
14466  # Check if we need to convert this using DOS-style short mode. If the path
14467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14468  # take no chances and rewrite it.
14469  # Note: m4 eats our [], so we need to use [ and ] instead.
14470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14471  if test "x$has_forbidden_chars" != x; then
14472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14474  fi
14475
14476
14477  windows_path="$new_path"
14478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14479    unix_path=`$CYGPATH -u "$windows_path"`
14480    new_path="$unix_path"
14481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14483    new_path="$unix_path"
14484  fi
14485
14486  if test "x$path" != "x$new_path"; then
14487    BOOT_JDK="$new_path"
14488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14490  fi
14491
14492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14494
14495  else
14496    # We're on a posix platform. Hooray! :)
14497    path="$BOOT_JDK"
14498    has_space=`$ECHO "$path" | $GREP " "`
14499    if test "x$has_space" != x; then
14500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14502      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14503    fi
14504
14505    # Use eval to expand a potential ~
14506    eval path="$path"
14507    if test ! -f "$path" && test ! -d "$path"; then
14508      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14509    fi
14510
14511    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14512  fi
14513
14514              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14515$as_echo_n "checking for Boot JDK... " >&6; }
14516              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14517$as_echo "$BOOT_JDK" >&6; }
14518              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14519$as_echo_n "checking Boot JDK version... " >&6; }
14520              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14521              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14522$as_echo "$BOOT_JDK_VERSION" >&6; }
14523            fi # end check jdk version
14524          fi # end check rt.jar
14525        fi # end check javac
14526      fi # end check java
14527    fi # end check boot jdk found
14528  fi
14529
14530  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14531
14532  if test "x$BOOT_JDK_FOUND" = xno; then
14533    # Now execute the test
14534
14535  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14536  BOOT_JDK_SUFFIX="/Contents/Home"
14537  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14538  if test "x$ALL_JDKS_FOUND" != x; then
14539    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14540
14541  if test "x$BOOT_JDK_FOUND" = xno; then
14542    # Now execute the test
14543
14544        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14545        if test -d "$BOOT_JDK"; then
14546          BOOT_JDK_FOUND=maybe
14547          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14548$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14549        fi
14550
14551
14552    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14553    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14554      # Do we have a bin/java?
14555      if test ! -x "$BOOT_JDK/bin/java"; then
14556        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14558        BOOT_JDK_FOUND=no
14559      else
14560        # Do we have a bin/javac?
14561        if test ! -x "$BOOT_JDK/bin/javac"; then
14562          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14564          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14565$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14566          BOOT_JDK_FOUND=no
14567        else
14568          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14569          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14570            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14572            BOOT_JDK_FOUND=no
14573          else
14574            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14575            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14576
14577            # Extra M4 quote needed to protect [] in grep expression.
14578            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14579            if test "x$FOUND_VERSION_78" = x; then
14580              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14582              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14583$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14584              BOOT_JDK_FOUND=no
14585            else
14586              # We're done! :-)
14587              BOOT_JDK_FOUND=yes
14588
14589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14590
14591  # Input might be given as Windows format, start by converting to
14592  # unix format.
14593  path="$BOOT_JDK"
14594  new_path=`$CYGPATH -u "$path"`
14595
14596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14599  # "foo.exe" is OK but "foo" is an error.
14600  #
14601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14602  # It is also a way to make sure we got the proper file name for the real test later on.
14603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14604  if test "x$test_shortpath" = x; then
14605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14607    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14608  fi
14609
14610  # Call helper function which possibly converts this using DOS-style short mode.
14611  # If so, the updated path is stored in $new_path.
14612
14613  input_path="$new_path"
14614  # Check if we need to convert this using DOS-style short mode. If the path
14615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14616  # take no chances and rewrite it.
14617  # Note: m4 eats our [], so we need to use [ and ] instead.
14618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14619  if test "x$has_forbidden_chars" != x; then
14620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14624      # Going to short mode and back again did indeed matter. Since short mode is
14625      # case insensitive, let's make it lowercase to improve readability.
14626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14627      # Now convert it back to Unix-stile (cygpath)
14628      input_path=`$CYGPATH -u "$shortmode_path"`
14629      new_path="$input_path"
14630    fi
14631  fi
14632
14633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14634  if test "x$test_cygdrive_prefix" = x; then
14635    # As a simple fix, exclude /usr/bin since it's not a real path.
14636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14638      # a path prefixed by /cygdrive for fixpath to work.
14639      new_path="$CYGWIN_ROOT_PATH$input_path"
14640    fi
14641  fi
14642
14643
14644  if test "x$path" != "x$new_path"; then
14645    BOOT_JDK="$new_path"
14646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14648  fi
14649
14650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14651
14652  path="$BOOT_JDK"
14653  has_colon=`$ECHO $path | $GREP ^.:`
14654  new_path="$path"
14655  if test "x$has_colon" = x; then
14656    # Not in mixed or Windows style, start by that.
14657    new_path=`cmd //c echo $path`
14658  fi
14659
14660
14661  input_path="$new_path"
14662  # Check if we need to convert this using DOS-style short mode. If the path
14663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14664  # take no chances and rewrite it.
14665  # Note: m4 eats our [], so we need to use [ and ] instead.
14666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14667  if test "x$has_forbidden_chars" != x; then
14668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14670  fi
14671
14672
14673  windows_path="$new_path"
14674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14675    unix_path=`$CYGPATH -u "$windows_path"`
14676    new_path="$unix_path"
14677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14679    new_path="$unix_path"
14680  fi
14681
14682  if test "x$path" != "x$new_path"; then
14683    BOOT_JDK="$new_path"
14684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14686  fi
14687
14688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14690
14691  else
14692    # We're on a posix platform. Hooray! :)
14693    path="$BOOT_JDK"
14694    has_space=`$ECHO "$path" | $GREP " "`
14695    if test "x$has_space" != x; then
14696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14698      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14699    fi
14700
14701    # Use eval to expand a potential ~
14702    eval path="$path"
14703    if test ! -f "$path" && test ! -d "$path"; then
14704      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14705    fi
14706
14707    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14708  fi
14709
14710              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14711$as_echo_n "checking for Boot JDK... " >&6; }
14712              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14713$as_echo "$BOOT_JDK" >&6; }
14714              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14715$as_echo_n "checking Boot JDK version... " >&6; }
14716              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14717              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14718$as_echo "$BOOT_JDK_VERSION" >&6; }
14719            fi # end check jdk version
14720          fi # end check rt.jar
14721        fi # end check javac
14722      fi # end check java
14723    fi # end check boot jdk found
14724  fi
14725
14726    done
14727  fi
14728
14729
14730    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14731    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14732      # Do we have a bin/java?
14733      if test ! -x "$BOOT_JDK/bin/java"; then
14734        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14736        BOOT_JDK_FOUND=no
14737      else
14738        # Do we have a bin/javac?
14739        if test ! -x "$BOOT_JDK/bin/javac"; then
14740          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14742          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14743$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14744          BOOT_JDK_FOUND=no
14745        else
14746          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14747          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14748            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14749$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14750            BOOT_JDK_FOUND=no
14751          else
14752            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14753            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14754
14755            # Extra M4 quote needed to protect [] in grep expression.
14756            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14757            if test "x$FOUND_VERSION_78" = x; then
14758              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14760              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14761$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14762              BOOT_JDK_FOUND=no
14763            else
14764              # We're done! :-)
14765              BOOT_JDK_FOUND=yes
14766
14767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14768
14769  # Input might be given as Windows format, start by converting to
14770  # unix format.
14771  path="$BOOT_JDK"
14772  new_path=`$CYGPATH -u "$path"`
14773
14774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14777  # "foo.exe" is OK but "foo" is an error.
14778  #
14779  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14780  # It is also a way to make sure we got the proper file name for the real test later on.
14781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14782  if test "x$test_shortpath" = x; then
14783    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14785    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14786  fi
14787
14788  # Call helper function which possibly converts this using DOS-style short mode.
14789  # If so, the updated path is stored in $new_path.
14790
14791  input_path="$new_path"
14792  # Check if we need to convert this using DOS-style short mode. If the path
14793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14794  # take no chances and rewrite it.
14795  # Note: m4 eats our [], so we need to use [ and ] instead.
14796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14797  if test "x$has_forbidden_chars" != x; then
14798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14802      # Going to short mode and back again did indeed matter. Since short mode is
14803      # case insensitive, let's make it lowercase to improve readability.
14804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14805      # Now convert it back to Unix-stile (cygpath)
14806      input_path=`$CYGPATH -u "$shortmode_path"`
14807      new_path="$input_path"
14808    fi
14809  fi
14810
14811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14812  if test "x$test_cygdrive_prefix" = x; then
14813    # As a simple fix, exclude /usr/bin since it's not a real path.
14814    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14816      # a path prefixed by /cygdrive for fixpath to work.
14817      new_path="$CYGWIN_ROOT_PATH$input_path"
14818    fi
14819  fi
14820
14821
14822  if test "x$path" != "x$new_path"; then
14823    BOOT_JDK="$new_path"
14824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14826  fi
14827
14828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14829
14830  path="$BOOT_JDK"
14831  has_colon=`$ECHO $path | $GREP ^.:`
14832  new_path="$path"
14833  if test "x$has_colon" = x; then
14834    # Not in mixed or Windows style, start by that.
14835    new_path=`cmd //c echo $path`
14836  fi
14837
14838
14839  input_path="$new_path"
14840  # Check if we need to convert this using DOS-style short mode. If the path
14841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14842  # take no chances and rewrite it.
14843  # Note: m4 eats our [], so we need to use [ and ] instead.
14844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14845  if test "x$has_forbidden_chars" != x; then
14846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14848  fi
14849
14850
14851  windows_path="$new_path"
14852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14853    unix_path=`$CYGPATH -u "$windows_path"`
14854    new_path="$unix_path"
14855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14857    new_path="$unix_path"
14858  fi
14859
14860  if test "x$path" != "x$new_path"; then
14861    BOOT_JDK="$new_path"
14862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14864  fi
14865
14866  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14867  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14868
14869  else
14870    # We're on a posix platform. Hooray! :)
14871    path="$BOOT_JDK"
14872    has_space=`$ECHO "$path" | $GREP " "`
14873    if test "x$has_space" != x; then
14874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14876      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14877    fi
14878
14879    # Use eval to expand a potential ~
14880    eval path="$path"
14881    if test ! -f "$path" && test ! -d "$path"; then
14882      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14883    fi
14884
14885    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14886  fi
14887
14888              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14889$as_echo_n "checking for Boot JDK... " >&6; }
14890              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14891$as_echo "$BOOT_JDK" >&6; }
14892              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14893$as_echo_n "checking Boot JDK version... " >&6; }
14894              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14895              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14896$as_echo "$BOOT_JDK_VERSION" >&6; }
14897            fi # end check jdk version
14898          fi # end check rt.jar
14899        fi # end check javac
14900      fi # end check java
14901    fi # end check boot jdk found
14902  fi
14903
14904
14905  if test "x$BOOT_JDK_FOUND" = xno; then
14906    # Now execute the test
14907
14908  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14909  BOOT_JDK_SUFFIX="/Contents/Home"
14910  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14911  if test "x$ALL_JDKS_FOUND" != x; then
14912    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14913
14914  if test "x$BOOT_JDK_FOUND" = xno; then
14915    # Now execute the test
14916
14917        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14918        if test -d "$BOOT_JDK"; then
14919          BOOT_JDK_FOUND=maybe
14920          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14921$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14922        fi
14923
14924
14925    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14926    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14927      # Do we have a bin/java?
14928      if test ! -x "$BOOT_JDK/bin/java"; then
14929        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14931        BOOT_JDK_FOUND=no
14932      else
14933        # Do we have a bin/javac?
14934        if test ! -x "$BOOT_JDK/bin/javac"; then
14935          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14937          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14938$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14939          BOOT_JDK_FOUND=no
14940        else
14941          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14942          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14943            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14945            BOOT_JDK_FOUND=no
14946          else
14947            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14948            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14949
14950            # Extra M4 quote needed to protect [] in grep expression.
14951            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14952            if test "x$FOUND_VERSION_78" = x; then
14953              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14955              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14956$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14957              BOOT_JDK_FOUND=no
14958            else
14959              # We're done! :-)
14960              BOOT_JDK_FOUND=yes
14961
14962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14963
14964  # Input might be given as Windows format, start by converting to
14965  # unix format.
14966  path="$BOOT_JDK"
14967  new_path=`$CYGPATH -u "$path"`
14968
14969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14972  # "foo.exe" is OK but "foo" is an error.
14973  #
14974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14975  # It is also a way to make sure we got the proper file name for the real test later on.
14976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14977  if test "x$test_shortpath" = x; then
14978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14979$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14980    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14981  fi
14982
14983  # Call helper function which possibly converts this using DOS-style short mode.
14984  # If so, the updated path is stored in $new_path.
14985
14986  input_path="$new_path"
14987  # Check if we need to convert this using DOS-style short mode. If the path
14988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14989  # take no chances and rewrite it.
14990  # Note: m4 eats our [], so we need to use [ and ] instead.
14991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14992  if test "x$has_forbidden_chars" != x; then
14993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14997      # Going to short mode and back again did indeed matter. Since short mode is
14998      # case insensitive, let's make it lowercase to improve readability.
14999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15000      # Now convert it back to Unix-stile (cygpath)
15001      input_path=`$CYGPATH -u "$shortmode_path"`
15002      new_path="$input_path"
15003    fi
15004  fi
15005
15006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15007  if test "x$test_cygdrive_prefix" = x; then
15008    # As a simple fix, exclude /usr/bin since it's not a real path.
15009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15011      # a path prefixed by /cygdrive for fixpath to work.
15012      new_path="$CYGWIN_ROOT_PATH$input_path"
15013    fi
15014  fi
15015
15016
15017  if test "x$path" != "x$new_path"; then
15018    BOOT_JDK="$new_path"
15019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15020$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15021  fi
15022
15023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15024
15025  path="$BOOT_JDK"
15026  has_colon=`$ECHO $path | $GREP ^.:`
15027  new_path="$path"
15028  if test "x$has_colon" = x; then
15029    # Not in mixed or Windows style, start by that.
15030    new_path=`cmd //c echo $path`
15031  fi
15032
15033
15034  input_path="$new_path"
15035  # Check if we need to convert this using DOS-style short mode. If the path
15036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15037  # take no chances and rewrite it.
15038  # Note: m4 eats our [], so we need to use [ and ] instead.
15039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15040  if test "x$has_forbidden_chars" != x; then
15041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15043  fi
15044
15045
15046  windows_path="$new_path"
15047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15048    unix_path=`$CYGPATH -u "$windows_path"`
15049    new_path="$unix_path"
15050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15052    new_path="$unix_path"
15053  fi
15054
15055  if test "x$path" != "x$new_path"; then
15056    BOOT_JDK="$new_path"
15057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15058$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15059  fi
15060
15061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15063
15064  else
15065    # We're on a posix platform. Hooray! :)
15066    path="$BOOT_JDK"
15067    has_space=`$ECHO "$path" | $GREP " "`
15068    if test "x$has_space" != x; then
15069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15071      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15072    fi
15073
15074    # Use eval to expand a potential ~
15075    eval path="$path"
15076    if test ! -f "$path" && test ! -d "$path"; then
15077      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15078    fi
15079
15080    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15081  fi
15082
15083              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15084$as_echo_n "checking for Boot JDK... " >&6; }
15085              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15086$as_echo "$BOOT_JDK" >&6; }
15087              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15088$as_echo_n "checking Boot JDK version... " >&6; }
15089              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15090              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15091$as_echo "$BOOT_JDK_VERSION" >&6; }
15092            fi # end check jdk version
15093          fi # end check rt.jar
15094        fi # end check javac
15095      fi # end check java
15096    fi # end check boot jdk found
15097  fi
15098
15099    done
15100  fi
15101
15102
15103    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15104    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15105      # Do we have a bin/java?
15106      if test ! -x "$BOOT_JDK/bin/java"; then
15107        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15109        BOOT_JDK_FOUND=no
15110      else
15111        # Do we have a bin/javac?
15112        if test ! -x "$BOOT_JDK/bin/javac"; then
15113          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15115          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15116$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15117          BOOT_JDK_FOUND=no
15118        else
15119          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15120          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15121            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15123            BOOT_JDK_FOUND=no
15124          else
15125            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15126            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15127
15128            # Extra M4 quote needed to protect [] in grep expression.
15129            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15130            if test "x$FOUND_VERSION_78" = x; then
15131              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15133              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15134$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15135              BOOT_JDK_FOUND=no
15136            else
15137              # We're done! :-)
15138              BOOT_JDK_FOUND=yes
15139
15140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15141
15142  # Input might be given as Windows format, start by converting to
15143  # unix format.
15144  path="$BOOT_JDK"
15145  new_path=`$CYGPATH -u "$path"`
15146
15147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15150  # "foo.exe" is OK but "foo" is an error.
15151  #
15152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15153  # It is also a way to make sure we got the proper file name for the real test later on.
15154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15155  if test "x$test_shortpath" = x; then
15156    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15157$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15158    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15159  fi
15160
15161  # Call helper function which possibly converts this using DOS-style short mode.
15162  # If so, the updated path is stored in $new_path.
15163
15164  input_path="$new_path"
15165  # Check if we need to convert this using DOS-style short mode. If the path
15166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15167  # take no chances and rewrite it.
15168  # Note: m4 eats our [], so we need to use [ and ] instead.
15169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15170  if test "x$has_forbidden_chars" != x; then
15171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15175      # Going to short mode and back again did indeed matter. Since short mode is
15176      # case insensitive, let's make it lowercase to improve readability.
15177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15178      # Now convert it back to Unix-stile (cygpath)
15179      input_path=`$CYGPATH -u "$shortmode_path"`
15180      new_path="$input_path"
15181    fi
15182  fi
15183
15184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15185  if test "x$test_cygdrive_prefix" = x; then
15186    # As a simple fix, exclude /usr/bin since it's not a real path.
15187    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15189      # a path prefixed by /cygdrive for fixpath to work.
15190      new_path="$CYGWIN_ROOT_PATH$input_path"
15191    fi
15192  fi
15193
15194
15195  if test "x$path" != "x$new_path"; then
15196    BOOT_JDK="$new_path"
15197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15199  fi
15200
15201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15202
15203  path="$BOOT_JDK"
15204  has_colon=`$ECHO $path | $GREP ^.:`
15205  new_path="$path"
15206  if test "x$has_colon" = x; then
15207    # Not in mixed or Windows style, start by that.
15208    new_path=`cmd //c echo $path`
15209  fi
15210
15211
15212  input_path="$new_path"
15213  # Check if we need to convert this using DOS-style short mode. If the path
15214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15215  # take no chances and rewrite it.
15216  # Note: m4 eats our [], so we need to use [ and ] instead.
15217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15218  if test "x$has_forbidden_chars" != x; then
15219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15221  fi
15222
15223
15224  windows_path="$new_path"
15225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15226    unix_path=`$CYGPATH -u "$windows_path"`
15227    new_path="$unix_path"
15228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15230    new_path="$unix_path"
15231  fi
15232
15233  if test "x$path" != "x$new_path"; then
15234    BOOT_JDK="$new_path"
15235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15236$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15237  fi
15238
15239  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15240  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15241
15242  else
15243    # We're on a posix platform. Hooray! :)
15244    path="$BOOT_JDK"
15245    has_space=`$ECHO "$path" | $GREP " "`
15246    if test "x$has_space" != x; then
15247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15248$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15249      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15250    fi
15251
15252    # Use eval to expand a potential ~
15253    eval path="$path"
15254    if test ! -f "$path" && test ! -d "$path"; then
15255      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15256    fi
15257
15258    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15259  fi
15260
15261              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15262$as_echo_n "checking for Boot JDK... " >&6; }
15263              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15264$as_echo "$BOOT_JDK" >&6; }
15265              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15266$as_echo_n "checking Boot JDK version... " >&6; }
15267              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15268              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15269$as_echo "$BOOT_JDK_VERSION" >&6; }
15270            fi # end check jdk version
15271          fi # end check rt.jar
15272        fi # end check javac
15273      fi # end check java
15274    fi # end check boot jdk found
15275  fi
15276
15277  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15278
15279  if test "x$BOOT_JDK_FOUND" = xno; then
15280    # Now execute the test
15281
15282  BOOT_JDK_PREFIX="/usr/lib/jvm"
15283  BOOT_JDK_SUFFIX=""
15284  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15285  if test "x$ALL_JDKS_FOUND" != x; then
15286    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15287
15288  if test "x$BOOT_JDK_FOUND" = xno; then
15289    # Now execute the test
15290
15291        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15292        if test -d "$BOOT_JDK"; then
15293          BOOT_JDK_FOUND=maybe
15294          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15295$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15296        fi
15297
15298
15299    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15300    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15301      # Do we have a bin/java?
15302      if test ! -x "$BOOT_JDK/bin/java"; then
15303        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15305        BOOT_JDK_FOUND=no
15306      else
15307        # Do we have a bin/javac?
15308        if test ! -x "$BOOT_JDK/bin/javac"; then
15309          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15311          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15312$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15313          BOOT_JDK_FOUND=no
15314        else
15315          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15316          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15317            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15319            BOOT_JDK_FOUND=no
15320          else
15321            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15322            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15323
15324            # Extra M4 quote needed to protect [] in grep expression.
15325            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15326            if test "x$FOUND_VERSION_78" = x; then
15327              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15329              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15330$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15331              BOOT_JDK_FOUND=no
15332            else
15333              # We're done! :-)
15334              BOOT_JDK_FOUND=yes
15335
15336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15337
15338  # Input might be given as Windows format, start by converting to
15339  # unix format.
15340  path="$BOOT_JDK"
15341  new_path=`$CYGPATH -u "$path"`
15342
15343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15346  # "foo.exe" is OK but "foo" is an error.
15347  #
15348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15349  # It is also a way to make sure we got the proper file name for the real test later on.
15350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15351  if test "x$test_shortpath" = x; then
15352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15353$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15354    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15355  fi
15356
15357  # Call helper function which possibly converts this using DOS-style short mode.
15358  # If so, the updated path is stored in $new_path.
15359
15360  input_path="$new_path"
15361  # Check if we need to convert this using DOS-style short mode. If the path
15362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15363  # take no chances and rewrite it.
15364  # Note: m4 eats our [], so we need to use [ and ] instead.
15365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15366  if test "x$has_forbidden_chars" != x; then
15367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15371      # Going to short mode and back again did indeed matter. Since short mode is
15372      # case insensitive, let's make it lowercase to improve readability.
15373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15374      # Now convert it back to Unix-stile (cygpath)
15375      input_path=`$CYGPATH -u "$shortmode_path"`
15376      new_path="$input_path"
15377    fi
15378  fi
15379
15380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15381  if test "x$test_cygdrive_prefix" = x; then
15382    # As a simple fix, exclude /usr/bin since it's not a real path.
15383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15385      # a path prefixed by /cygdrive for fixpath to work.
15386      new_path="$CYGWIN_ROOT_PATH$input_path"
15387    fi
15388  fi
15389
15390
15391  if test "x$path" != "x$new_path"; then
15392    BOOT_JDK="$new_path"
15393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15394$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15395  fi
15396
15397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15398
15399  path="$BOOT_JDK"
15400  has_colon=`$ECHO $path | $GREP ^.:`
15401  new_path="$path"
15402  if test "x$has_colon" = x; then
15403    # Not in mixed or Windows style, start by that.
15404    new_path=`cmd //c echo $path`
15405  fi
15406
15407
15408  input_path="$new_path"
15409  # Check if we need to convert this using DOS-style short mode. If the path
15410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15411  # take no chances and rewrite it.
15412  # Note: m4 eats our [], so we need to use [ and ] instead.
15413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15414  if test "x$has_forbidden_chars" != x; then
15415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15417  fi
15418
15419
15420  windows_path="$new_path"
15421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15422    unix_path=`$CYGPATH -u "$windows_path"`
15423    new_path="$unix_path"
15424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15426    new_path="$unix_path"
15427  fi
15428
15429  if test "x$path" != "x$new_path"; then
15430    BOOT_JDK="$new_path"
15431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15432$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15433  fi
15434
15435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15437
15438  else
15439    # We're on a posix platform. Hooray! :)
15440    path="$BOOT_JDK"
15441    has_space=`$ECHO "$path" | $GREP " "`
15442    if test "x$has_space" != x; then
15443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15444$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15445      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15446    fi
15447
15448    # Use eval to expand a potential ~
15449    eval path="$path"
15450    if test ! -f "$path" && test ! -d "$path"; then
15451      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15452    fi
15453
15454    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15455  fi
15456
15457              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15458$as_echo_n "checking for Boot JDK... " >&6; }
15459              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15460$as_echo "$BOOT_JDK" >&6; }
15461              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15462$as_echo_n "checking Boot JDK version... " >&6; }
15463              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15465$as_echo "$BOOT_JDK_VERSION" >&6; }
15466            fi # end check jdk version
15467          fi # end check rt.jar
15468        fi # end check javac
15469      fi # end check java
15470    fi # end check boot jdk found
15471  fi
15472
15473    done
15474  fi
15475
15476
15477    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15478    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15479      # Do we have a bin/java?
15480      if test ! -x "$BOOT_JDK/bin/java"; then
15481        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15483        BOOT_JDK_FOUND=no
15484      else
15485        # Do we have a bin/javac?
15486        if test ! -x "$BOOT_JDK/bin/javac"; then
15487          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15489          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15490$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15491          BOOT_JDK_FOUND=no
15492        else
15493          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15494          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15495            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15497            BOOT_JDK_FOUND=no
15498          else
15499            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15501
15502            # Extra M4 quote needed to protect [] in grep expression.
15503            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15504            if test "x$FOUND_VERSION_78" = x; then
15505              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15507              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15508$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15509              BOOT_JDK_FOUND=no
15510            else
15511              # We're done! :-)
15512              BOOT_JDK_FOUND=yes
15513
15514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15515
15516  # Input might be given as Windows format, start by converting to
15517  # unix format.
15518  path="$BOOT_JDK"
15519  new_path=`$CYGPATH -u "$path"`
15520
15521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15524  # "foo.exe" is OK but "foo" is an error.
15525  #
15526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15527  # It is also a way to make sure we got the proper file name for the real test later on.
15528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15529  if test "x$test_shortpath" = x; then
15530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15532    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15533  fi
15534
15535  # Call helper function which possibly converts this using DOS-style short mode.
15536  # If so, the updated path is stored in $new_path.
15537
15538  input_path="$new_path"
15539  # Check if we need to convert this using DOS-style short mode. If the path
15540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15541  # take no chances and rewrite it.
15542  # Note: m4 eats our [], so we need to use [ and ] instead.
15543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15544  if test "x$has_forbidden_chars" != x; then
15545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15549      # Going to short mode and back again did indeed matter. Since short mode is
15550      # case insensitive, let's make it lowercase to improve readability.
15551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15552      # Now convert it back to Unix-stile (cygpath)
15553      input_path=`$CYGPATH -u "$shortmode_path"`
15554      new_path="$input_path"
15555    fi
15556  fi
15557
15558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15559  if test "x$test_cygdrive_prefix" = x; then
15560    # As a simple fix, exclude /usr/bin since it's not a real path.
15561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15563      # a path prefixed by /cygdrive for fixpath to work.
15564      new_path="$CYGWIN_ROOT_PATH$input_path"
15565    fi
15566  fi
15567
15568
15569  if test "x$path" != "x$new_path"; then
15570    BOOT_JDK="$new_path"
15571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15573  fi
15574
15575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15576
15577  path="$BOOT_JDK"
15578  has_colon=`$ECHO $path | $GREP ^.:`
15579  new_path="$path"
15580  if test "x$has_colon" = x; then
15581    # Not in mixed or Windows style, start by that.
15582    new_path=`cmd //c echo $path`
15583  fi
15584
15585
15586  input_path="$new_path"
15587  # Check if we need to convert this using DOS-style short mode. If the path
15588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15589  # take no chances and rewrite it.
15590  # Note: m4 eats our [], so we need to use [ and ] instead.
15591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15592  if test "x$has_forbidden_chars" != x; then
15593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15595  fi
15596
15597
15598  windows_path="$new_path"
15599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15600    unix_path=`$CYGPATH -u "$windows_path"`
15601    new_path="$unix_path"
15602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15604    new_path="$unix_path"
15605  fi
15606
15607  if test "x$path" != "x$new_path"; then
15608    BOOT_JDK="$new_path"
15609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15611  fi
15612
15613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15615
15616  else
15617    # We're on a posix platform. Hooray! :)
15618    path="$BOOT_JDK"
15619    has_space=`$ECHO "$path" | $GREP " "`
15620    if test "x$has_space" != x; then
15621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15624    fi
15625
15626    # Use eval to expand a potential ~
15627    eval path="$path"
15628    if test ! -f "$path" && test ! -d "$path"; then
15629      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15630    fi
15631
15632    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15633  fi
15634
15635              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15636$as_echo_n "checking for Boot JDK... " >&6; }
15637              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15638$as_echo "$BOOT_JDK" >&6; }
15639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15640$as_echo_n "checking Boot JDK version... " >&6; }
15641              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15642              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15643$as_echo "$BOOT_JDK_VERSION" >&6; }
15644            fi # end check jdk version
15645          fi # end check rt.jar
15646        fi # end check javac
15647      fi # end check java
15648    fi # end check boot jdk found
15649  fi
15650
15651  fi
15652
15653
15654    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15655    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15656      # Do we have a bin/java?
15657      if test ! -x "$BOOT_JDK/bin/java"; then
15658        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15660        BOOT_JDK_FOUND=no
15661      else
15662        # Do we have a bin/javac?
15663        if test ! -x "$BOOT_JDK/bin/javac"; then
15664          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15666          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15667$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15668          BOOT_JDK_FOUND=no
15669        else
15670          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15671          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15672            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15674            BOOT_JDK_FOUND=no
15675          else
15676            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15677            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15678
15679            # Extra M4 quote needed to protect [] in grep expression.
15680            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15681            if test "x$FOUND_VERSION_78" = x; then
15682              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15684              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15685$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15686              BOOT_JDK_FOUND=no
15687            else
15688              # We're done! :-)
15689              BOOT_JDK_FOUND=yes
15690
15691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15692
15693  # Input might be given as Windows format, start by converting to
15694  # unix format.
15695  path="$BOOT_JDK"
15696  new_path=`$CYGPATH -u "$path"`
15697
15698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15701  # "foo.exe" is OK but "foo" is an error.
15702  #
15703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15704  # It is also a way to make sure we got the proper file name for the real test later on.
15705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15706  if test "x$test_shortpath" = x; then
15707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15709    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15710  fi
15711
15712  # Call helper function which possibly converts this using DOS-style short mode.
15713  # If so, the updated path is stored in $new_path.
15714
15715  input_path="$new_path"
15716  # Check if we need to convert this using DOS-style short mode. If the path
15717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15718  # take no chances and rewrite it.
15719  # Note: m4 eats our [], so we need to use [ and ] instead.
15720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15721  if test "x$has_forbidden_chars" != x; then
15722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15726      # Going to short mode and back again did indeed matter. Since short mode is
15727      # case insensitive, let's make it lowercase to improve readability.
15728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15729      # Now convert it back to Unix-stile (cygpath)
15730      input_path=`$CYGPATH -u "$shortmode_path"`
15731      new_path="$input_path"
15732    fi
15733  fi
15734
15735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15736  if test "x$test_cygdrive_prefix" = x; then
15737    # As a simple fix, exclude /usr/bin since it's not a real path.
15738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15740      # a path prefixed by /cygdrive for fixpath to work.
15741      new_path="$CYGWIN_ROOT_PATH$input_path"
15742    fi
15743  fi
15744
15745
15746  if test "x$path" != "x$new_path"; then
15747    BOOT_JDK="$new_path"
15748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15750  fi
15751
15752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15753
15754  path="$BOOT_JDK"
15755  has_colon=`$ECHO $path | $GREP ^.:`
15756  new_path="$path"
15757  if test "x$has_colon" = x; then
15758    # Not in mixed or Windows style, start by that.
15759    new_path=`cmd //c echo $path`
15760  fi
15761
15762
15763  input_path="$new_path"
15764  # Check if we need to convert this using DOS-style short mode. If the path
15765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15766  # take no chances and rewrite it.
15767  # Note: m4 eats our [], so we need to use [ and ] instead.
15768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15769  if test "x$has_forbidden_chars" != x; then
15770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15772  fi
15773
15774
15775  windows_path="$new_path"
15776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15777    unix_path=`$CYGPATH -u "$windows_path"`
15778    new_path="$unix_path"
15779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15781    new_path="$unix_path"
15782  fi
15783
15784  if test "x$path" != "x$new_path"; then
15785    BOOT_JDK="$new_path"
15786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15787$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15788  fi
15789
15790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15792
15793  else
15794    # We're on a posix platform. Hooray! :)
15795    path="$BOOT_JDK"
15796    has_space=`$ECHO "$path" | $GREP " "`
15797    if test "x$has_space" != x; then
15798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15800      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15801    fi
15802
15803    # Use eval to expand a potential ~
15804    eval path="$path"
15805    if test ! -f "$path" && test ! -d "$path"; then
15806      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15807    fi
15808
15809    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15810  fi
15811
15812              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15813$as_echo_n "checking for Boot JDK... " >&6; }
15814              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15815$as_echo "$BOOT_JDK" >&6; }
15816              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15817$as_echo_n "checking Boot JDK version... " >&6; }
15818              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15819              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15820$as_echo "$BOOT_JDK_VERSION" >&6; }
15821            fi # end check jdk version
15822          fi # end check rt.jar
15823        fi # end check javac
15824      fi # end check java
15825    fi # end check boot jdk found
15826  fi
15827
15828
15829  # If we haven't found anything yet, we've truly lost. Give up.
15830  if test "x$BOOT_JDK_FOUND" = xno; then
15831
15832  # Print a helpful message on how to acquire the necessary build dependency.
15833  # openjdk is the help tag: freetype, cups, pulse, alsa etc
15834  MISSING_DEPENDENCY=openjdk
15835
15836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15837    cygwin_help $MISSING_DEPENDENCY
15838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15839    msys_help $MISSING_DEPENDENCY
15840  else
15841    PKGHANDLER_COMMAND=
15842
15843    case $PKGHANDLER in
15844      apt-get)
15845        apt_help     $MISSING_DEPENDENCY ;;
15846      yum)
15847        yum_help     $MISSING_DEPENDENCY ;;
15848      port)
15849        port_help    $MISSING_DEPENDENCY ;;
15850      pkgutil)
15851        pkgutil_help $MISSING_DEPENDENCY ;;
15852      pkgadd)
15853        pkgadd_help  $MISSING_DEPENDENCY ;;
15854      * )
15855        break ;;
15856    esac
15857
15858    if test "x$PKGHANDLER_COMMAND" != x; then
15859      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15860    fi
15861  fi
15862
15863    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15864$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15865    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15866$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15867    as_fn_error $? "Cannot continue" "$LINENO" 5
15868  fi
15869
15870  # Setup proper paths for what we found
15871  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15872  if test ! -f "$BOOT_RTJAR"; then
15873    # On MacOSX it is called classes.jar
15874    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15875    if test -f "$BOOT_RTJAR"; then
15876      # Remove the ..
15877      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15878    fi
15879  fi
15880  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15881  BOOT_JDK="$BOOT_JDK"
15882
15883
15884
15885
15886  # Setup tools from the Boot JDK.
15887
15888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15889$as_echo_n "checking for java in Boot JDK... " >&6; }
15890  JAVA=$BOOT_JDK/bin/java
15891  if test ! -x $JAVA; then
15892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15893$as_echo "not found" >&6; }
15894    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15895$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15896    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15897  fi
15898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15899$as_echo "ok" >&6; }
15900
15901
15902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15903$as_echo_n "checking for javac in Boot JDK... " >&6; }
15904  JAVAC=$BOOT_JDK/bin/javac
15905  if test ! -x $JAVAC; then
15906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15907$as_echo "not found" >&6; }
15908    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15909$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15910    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15911  fi
15912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15913$as_echo "ok" >&6; }
15914
15915
15916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15917$as_echo_n "checking for javah in Boot JDK... " >&6; }
15918  JAVAH=$BOOT_JDK/bin/javah
15919  if test ! -x $JAVAH; then
15920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15921$as_echo "not found" >&6; }
15922    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15923$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15924    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15925  fi
15926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15927$as_echo "ok" >&6; }
15928
15929
15930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15931$as_echo_n "checking for javap in Boot JDK... " >&6; }
15932  JAVAP=$BOOT_JDK/bin/javap
15933  if test ! -x $JAVAP; then
15934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15935$as_echo "not found" >&6; }
15936    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15937$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15938    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15939  fi
15940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15941$as_echo "ok" >&6; }
15942
15943
15944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15945$as_echo_n "checking for jar in Boot JDK... " >&6; }
15946  JAR=$BOOT_JDK/bin/jar
15947  if test ! -x $JAR; then
15948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15949$as_echo "not found" >&6; }
15950    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15951$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15952    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15953  fi
15954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15955$as_echo "ok" >&6; }
15956
15957
15958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15959$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15960  RMIC=$BOOT_JDK/bin/rmic
15961  if test ! -x $RMIC; then
15962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15963$as_echo "not found" >&6; }
15964    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15965$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15966    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15967  fi
15968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15969$as_echo "ok" >&6; }
15970
15971
15972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15973$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15974  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15975  if test ! -x $NATIVE2ASCII; then
15976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15977$as_echo "not found" >&6; }
15978    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15979$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15980    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15981  fi
15982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15983$as_echo "ok" >&6; }
15984
15985
15986  # Finally, set some other options...
15987
15988  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15989  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15990
15991
15992
15993
15994  ##############################################################################
15995  #
15996  # Specify options for anything that is run with the Boot JDK.
15997  #
15998
15999# Check whether --with-boot-jdk-jvmargs was given.
16000if test "${with_boot_jdk_jvmargs+set}" = set; then :
16001  withval=$with_boot_jdk_jvmargs;
16002fi
16003
16004
16005  if test "x$with_boot_jdk_jvmargs" = x; then
16006    # Not all JVM:s accept the same arguments on the command line.
16007    # OpenJDK specific increase in thread stack for JDK build,
16008    # well more specifically, when running javac.
16009    if test "x$BUILD_NUM_BITS" = x32; then
16010      STACK_SIZE=768
16011    else
16012      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
16013      # since 64-bit pointers are pushed on the stach. Apparently, we need
16014      # to increase the stack space when javacing the JDK....
16015      STACK_SIZE=1536
16016    fi
16017
16018    # Minimum amount of heap memory.
16019
16020  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16021  $ECHO "Command: $JAVA -Xms64M -version" >&5
16022  OUTPUT=`$JAVA -Xms64M -version 2>&1`
16023  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16024  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16025  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16026    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
16027    JVM_ARG_OK=true
16028  else
16029    $ECHO "Arg failed:" >&5
16030    $ECHO "$OUTPUT" >&5
16031    JVM_ARG_OK=false
16032  fi
16033
16034    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16035      # Why does macosx need more heap? Its the huge JDK batch.
16036
16037  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
16038  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
16039  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
16040  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16041  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16042  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16043    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
16044    JVM_ARG_OK=true
16045  else
16046    $ECHO "Arg failed:" >&5
16047    $ECHO "$OUTPUT" >&5
16048    JVM_ARG_OK=false
16049  fi
16050
16051    else
16052
16053  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
16054  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
16055  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
16056  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16057  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16058  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16059    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16060    JVM_ARG_OK=true
16061  else
16062    $ECHO "Arg failed:" >&5
16063    $ECHO "$OUTPUT" >&5
16064    JVM_ARG_OK=false
16065  fi
16066
16067    fi
16068    # When is adding -client something that speeds up the JVM?
16069    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16070
16071  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16072  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16073  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16074  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16075  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16076  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16077    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16078    JVM_ARG_OK=true
16079  else
16080    $ECHO "Arg failed:" >&5
16081    $ECHO "$OUTPUT" >&5
16082    JVM_ARG_OK=false
16083  fi
16084
16085
16086  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16087  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16088  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16089  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16090  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16091  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16092    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16093    JVM_ARG_OK=true
16094  else
16095    $ECHO "Arg failed:" >&5
16096    $ECHO "$OUTPUT" >&5
16097    JVM_ARG_OK=false
16098  fi
16099
16100
16101  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16102  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16103  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16104  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16105  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16106  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16107    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16108    JVM_ARG_OK=true
16109  else
16110    $ECHO "Arg failed:" >&5
16111    $ECHO "$OUTPUT" >&5
16112    JVM_ARG_OK=false
16113  fi
16114
16115    # Disable special log output when a debug build is used as Boot JDK...
16116
16117  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16118  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16119  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16120  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16121  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16122  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16123    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16124    JVM_ARG_OK=true
16125  else
16126    $ECHO "Arg failed:" >&5
16127    $ECHO "$OUTPUT" >&5
16128    JVM_ARG_OK=false
16129  fi
16130
16131  fi
16132
16133  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16134
16135
16136
16137###############################################################################
16138#
16139# Configure the sources to use. We can add or override individual directories.
16140#
16141###############################################################################
16142
16143
16144  # Where are the sources. Any of these can be overridden
16145  # using --with-override-corba and the likes.
16146  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16147  CORBA_TOPDIR="$SRC_ROOT/corba"
16148  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16149  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16150  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16151  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16152  JDK_TOPDIR="$SRC_ROOT/jdk"
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163  ###############################################################################
16164  #
16165  # Pickup additional source for a component from outside of the source root
16166  # or override source for a component.
16167  #
16168
16169# Check whether --with-add-source-root was given.
16170if test "${with_add_source_root+set}" = set; then :
16171  withval=$with_add_source_root;
16172fi
16173
16174
16175
16176# Check whether --with-override-source-root was given.
16177if test "${with_override_source_root+set}" = set; then :
16178  withval=$with_override_source_root;
16179fi
16180
16181
16182
16183# Check whether --with-adds-and-overrides was given.
16184if test "${with_adds_and_overrides+set}" = set; then :
16185  withval=$with_adds_and_overrides;
16186fi
16187
16188
16189  if test "x$with_adds_and_overrides" != x; then
16190    with_add_source_root="$with_adds_and_overrides/adds"
16191    with_override_source_root="$with_adds_and_overrides/overrides"
16192  fi
16193
16194  if test "x$with_add_source_root" != x; then
16195    if ! test -d $with_add_source_root; then
16196      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16197    fi
16198    CURDIR="$PWD"
16199    cd "$with_add_source_root"
16200    ADD_SRC_ROOT="`pwd`"
16201    cd "$CURDIR"
16202    # Verify that the addon source root does not have any root makefiles.
16203    # If it does, then it is usually an error, prevent this.
16204    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16205      test -f $with_add_source_root/langtools/make/Makefile; then
16206      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
16207    fi
16208    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16209      test -f $with_add_source_root/corba/make/Makefile; then
16210      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
16211    fi
16212    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16213      test -f $with_add_source_root/jaxp/make/Makefile; then
16214      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
16215    fi
16216    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16217      test -f $with_add_source_root/jaxws/make/Makefile; then
16218      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
16219    fi
16220    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16221      test -f $with_add_source_root/hotspot/make/Makefile; then
16222      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
16223    fi
16224    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16225      test -f $with_add_source_root/nashorn/make/Makefile; then
16226      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
16227    fi
16228    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16229      test -f $with_add_source_root/jdk/make/Makefile; then
16230      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
16231    fi
16232  fi
16233
16234
16235  if test "x$with_override_source_root" != x; then
16236    if ! test -d $with_override_source_root; then
16237      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16238    fi
16239    CURDIR="$PWD"
16240    cd "$with_override_source_root"
16241    OVERRIDE_SRC_ROOT="`pwd`"
16242    cd "$CURDIR"
16243    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16244      test -f $with_override_source_root/langtools/make/Makefile; then
16245      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
16246    fi
16247    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16248      test -f $with_override_source_root/corba/make/Makefile; then
16249      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
16250    fi
16251    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16252      test -f $with_override_source_root/jaxp/make/Makefile; then
16253      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
16254    fi
16255    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16256      test -f $with_override_source_root/jaxws/make/Makefile; then
16257      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
16258    fi
16259    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16260      test -f $with_override_source_root/hotspot/make/Makefile; then
16261      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
16262    fi
16263    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16264      test -f $with_override_source_root/nashorn/make/Makefile; then
16265      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
16266    fi
16267    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16268      test -f $with_override_source_root/jdk/make/Makefile; then
16269      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
16270    fi
16271  fi
16272
16273
16274  ###############################################################################
16275  #
16276  # Override a repo completely, this is used for example when you have 3 small
16277  # development sandboxes of the langtools sources and want to avoid having 3 full
16278  # OpenJDK sources checked out on disk.
16279  #
16280  # Assuming that the 3 langtools sandboxes are located here:
16281  # /home/fredrik/sandbox1/langtools
16282  # /home/fredrik/sandbox2/langtools
16283  # /home/fredrik/sandbox3/langtools
16284  #
16285  # From the source root you create build subdirs manually:
16286  #     mkdir -p build1 build2 build3
16287  # in each build directory run:
16288  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16289  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16290  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16291  #
16292
16293
16294# Check whether --with-override-langtools was given.
16295if test "${with_override_langtools+set}" = set; then :
16296  withval=$with_override_langtools;
16297fi
16298
16299
16300
16301# Check whether --with-override-corba was given.
16302if test "${with_override_corba+set}" = set; then :
16303  withval=$with_override_corba;
16304fi
16305
16306
16307
16308# Check whether --with-override-jaxp was given.
16309if test "${with_override_jaxp+set}" = set; then :
16310  withval=$with_override_jaxp;
16311fi
16312
16313
16314
16315# Check whether --with-override-jaxws was given.
16316if test "${with_override_jaxws+set}" = set; then :
16317  withval=$with_override_jaxws;
16318fi
16319
16320
16321
16322# Check whether --with-override-hotspot was given.
16323if test "${with_override_hotspot+set}" = set; then :
16324  withval=$with_override_hotspot;
16325fi
16326
16327
16328
16329# Check whether --with-override-nashorn was given.
16330if test "${with_override_nashorn+set}" = set; then :
16331  withval=$with_override_nashorn;
16332fi
16333
16334
16335
16336# Check whether --with-override-jdk was given.
16337if test "${with_override_jdk+set}" = set; then :
16338  withval=$with_override_jdk;
16339fi
16340
16341
16342  if test "x$with_override_langtools" != x; then
16343    CURDIR="$PWD"
16344    cd "$with_override_langtools"
16345    LANGTOOLS_TOPDIR="`pwd`"
16346    cd "$CURDIR"
16347    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16348      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16349    fi
16350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16351$as_echo_n "checking if langtools should be overridden... " >&6; }
16352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16353$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16354  fi
16355  if test "x$with_override_corba" != x; then
16356    CURDIR="$PWD"
16357    cd "$with_override_corba"
16358    CORBA_TOPDIR="`pwd`"
16359    cd "$CURDIR"
16360    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16361      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16362    fi
16363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16364$as_echo_n "checking if corba should be overridden... " >&6; }
16365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16366$as_echo "yes with $CORBA_TOPDIR" >&6; }
16367  fi
16368  if test "x$with_override_jaxp" != x; then
16369    CURDIR="$PWD"
16370    cd "$with_override_jaxp"
16371    JAXP_TOPDIR="`pwd`"
16372    cd "$CURDIR"
16373    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16374      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16375    fi
16376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16377$as_echo_n "checking if jaxp should be overridden... " >&6; }
16378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16379$as_echo "yes with $JAXP_TOPDIR" >&6; }
16380  fi
16381  if test "x$with_override_jaxws" != x; then
16382    CURDIR="$PWD"
16383    cd "$with_override_jaxws"
16384    JAXWS_TOPDIR="`pwd`"
16385    cd "$CURDIR"
16386    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16387      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16388    fi
16389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16390$as_echo_n "checking if jaxws should be overridden... " >&6; }
16391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16392$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16393  fi
16394  if test "x$with_override_hotspot" != x; then
16395    CURDIR="$PWD"
16396    cd "$with_override_hotspot"
16397    HOTSPOT_TOPDIR="`pwd`"
16398    cd "$CURDIR"
16399    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16400        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16401      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16402    fi
16403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16404$as_echo_n "checking if hotspot should be overridden... " >&6; }
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16406$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16407  fi
16408  if test "x$with_override_nashorn" != x; then
16409    CURDIR="$PWD"
16410    cd "$with_override_nashorn"
16411    NASHORN_TOPDIR="`pwd`"
16412    cd "$CURDIR"
16413    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16414      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16415    fi
16416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16417$as_echo_n "checking if nashorn should be overridden... " >&6; }
16418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16419$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16420  fi
16421  if test "x$with_override_jdk" != x; then
16422    CURDIR="$PWD"
16423    cd "$with_override_jdk"
16424    JDK_TOPDIR="`pwd`"
16425    cd "$CURDIR"
16426    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16427      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16428    fi
16429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16430$as_echo_n "checking if JDK should be overridden... " >&6; }
16431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16432$as_echo "yes with $JDK_TOPDIR" >&6; }
16433  fi
16434
16435
16436  BUILD_OUTPUT="$OUTPUT_ROOT"
16437
16438
16439  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16440  BUILD_HOTSPOT=true
16441
16442
16443
16444# Check whether --with-import-hotspot was given.
16445if test "${with_import_hotspot+set}" = set; then :
16446  withval=$with_import_hotspot;
16447fi
16448
16449  if test "x$with_import_hotspot" != x; then
16450    CURDIR="$PWD"
16451    cd "$with_import_hotspot"
16452    HOTSPOT_DIST="`pwd`"
16453    cd "$CURDIR"
16454    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16455      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16456    fi
16457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16458$as_echo_n "checking if hotspot should be imported... " >&6; }
16459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16460$as_echo "yes from $HOTSPOT_DIST" >&6; }
16461    BUILD_HOTSPOT=false
16462  fi
16463
16464  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16465
16466
16467###############################################################################
16468#
16469# Setup the toolchain (compilers etc), i.e. the tools that need to be
16470# cross-compilation aware.
16471#
16472###############################################################################
16473
16474
16475  ###############################################################################
16476  #
16477  # Configure the development tool paths and potential sysroot.
16478  #
16479  ac_ext=cpp
16480ac_cpp='$CXXCPP $CPPFLAGS'
16481ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16482ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16483ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16484
16485
16486  # The option used to specify the target .o,.a or .so file.
16487  # When compiling, how to specify the to be created object file.
16488  CC_OUT_OPTION='-o$(SPACE)'
16489  # When linking, how to specify the to be created executable.
16490  EXE_OUT_OPTION='-o$(SPACE)'
16491  # When linking, how to specify the to be created dynamically linkable library.
16492  LD_OUT_OPTION='-o$(SPACE)'
16493  # When archiving, how to specify the to be create static archive for object files.
16494  AR_OUT_OPTION='rcs$(SPACE)'
16495
16496
16497
16498
16499
16500# Locate the actual tools
16501
16502
16503# Check whether --with-jtreg was given.
16504if test "${with_jtreg+set}" = set; then :
16505  withval=$with_jtreg;
16506else
16507  with_jtreg=no
16508fi
16509
16510
16511  if test "x$with_jtreg" = xno; then
16512    # jtreg disabled
16513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16514$as_echo_n "checking for jtreg... " >&6; }
16515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16516$as_echo "no" >&6; }
16517  else
16518    if test "x$with_jtreg" != xyes; then
16519      # with path specified.
16520      JT_HOME="$with_jtreg"
16521    fi
16522
16523    if test "x$JT_HOME" != x; then
16524      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16525$as_echo_n "checking for jtreg... " >&6; }
16526
16527      # use JT_HOME enviroment var.
16528
16529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16530
16531  # Input might be given as Windows format, start by converting to
16532  # unix format.
16533  path="$JT_HOME"
16534  new_path=`$CYGPATH -u "$path"`
16535
16536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16539  # "foo.exe" is OK but "foo" is an error.
16540  #
16541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16542  # It is also a way to make sure we got the proper file name for the real test later on.
16543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16544  if test "x$test_shortpath" = x; then
16545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16546$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16547    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16548  fi
16549
16550  # Call helper function which possibly converts this using DOS-style short mode.
16551  # If so, the updated path is stored in $new_path.
16552
16553  input_path="$new_path"
16554  # Check if we need to convert this using DOS-style short mode. If the path
16555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16556  # take no chances and rewrite it.
16557  # Note: m4 eats our [], so we need to use [ and ] instead.
16558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16559  if test "x$has_forbidden_chars" != x; then
16560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16564      # Going to short mode and back again did indeed matter. Since short mode is
16565      # case insensitive, let's make it lowercase to improve readability.
16566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16567      # Now convert it back to Unix-stile (cygpath)
16568      input_path=`$CYGPATH -u "$shortmode_path"`
16569      new_path="$input_path"
16570    fi
16571  fi
16572
16573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16574  if test "x$test_cygdrive_prefix" = x; then
16575    # As a simple fix, exclude /usr/bin since it's not a real path.
16576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16578      # a path prefixed by /cygdrive for fixpath to work.
16579      new_path="$CYGWIN_ROOT_PATH$input_path"
16580    fi
16581  fi
16582
16583
16584  if test "x$path" != "x$new_path"; then
16585    JT_HOME="$new_path"
16586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16587$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16588  fi
16589
16590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16591
16592  path="$JT_HOME"
16593  has_colon=`$ECHO $path | $GREP ^.:`
16594  new_path="$path"
16595  if test "x$has_colon" = x; then
16596    # Not in mixed or Windows style, start by that.
16597    new_path=`cmd //c echo $path`
16598  fi
16599
16600
16601  input_path="$new_path"
16602  # Check if we need to convert this using DOS-style short mode. If the path
16603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16604  # take no chances and rewrite it.
16605  # Note: m4 eats our [], so we need to use [ and ] instead.
16606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16607  if test "x$has_forbidden_chars" != x; then
16608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16610  fi
16611
16612
16613  windows_path="$new_path"
16614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16615    unix_path=`$CYGPATH -u "$windows_path"`
16616    new_path="$unix_path"
16617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16619    new_path="$unix_path"
16620  fi
16621
16622  if test "x$path" != "x$new_path"; then
16623    JT_HOME="$new_path"
16624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16625$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16626  fi
16627
16628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16630
16631  else
16632    # We're on a posix platform. Hooray! :)
16633    path="$JT_HOME"
16634    has_space=`$ECHO "$path" | $GREP " "`
16635    if test "x$has_space" != x; then
16636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16637$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16638      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16639    fi
16640
16641    # Use eval to expand a potential ~
16642    eval path="$path"
16643    if test ! -f "$path" && test ! -d "$path"; then
16644      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16645    fi
16646
16647    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16648  fi
16649
16650
16651      # jtreg win32 script works for everybody
16652      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16653
16654      if test ! -f "$JTREGEXE"; then
16655        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16656      fi
16657
16658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16659$as_echo "$JTREGEXE" >&6; }
16660    else
16661      # try to find jtreg on path
16662
16663  for ac_prog in jtreg
16664do
16665  # Extract the first word of "$ac_prog", so it can be a program name with args.
16666set dummy $ac_prog; ac_word=$2
16667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16668$as_echo_n "checking for $ac_word... " >&6; }
16669if ${ac_cv_path_JTREGEXE+:} false; then :
16670  $as_echo_n "(cached) " >&6
16671else
16672  case $JTREGEXE in
16673  [\\/]* | ?:[\\/]*)
16674  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16675  ;;
16676  *)
16677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16678for as_dir in $PATH
16679do
16680  IFS=$as_save_IFS
16681  test -z "$as_dir" && as_dir=.
16682    for ac_exec_ext in '' $ac_executable_extensions; do
16683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16684    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16686    break 2
16687  fi
16688done
16689  done
16690IFS=$as_save_IFS
16691
16692  ;;
16693esac
16694fi
16695JTREGEXE=$ac_cv_path_JTREGEXE
16696if test -n "$JTREGEXE"; then
16697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16698$as_echo "$JTREGEXE" >&6; }
16699else
16700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16701$as_echo "no" >&6; }
16702fi
16703
16704
16705  test -n "$JTREGEXE" && break
16706done
16707
16708
16709  if test "x$JTREGEXE" = x; then
16710    if test "xjtreg" = x; then
16711      PROG_NAME=jtregexe
16712    else
16713      PROG_NAME=jtreg
16714    fi
16715    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16716$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16717    as_fn_error $? "Cannot continue" "$LINENO" 5
16718  fi
16719
16720
16721      JT_HOME="`$DIRNAME $JTREGEXE`"
16722    fi
16723  fi
16724
16725
16726
16727
16728
16729  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16730
16731  # Store path to cygwin link.exe to help excluding it when searching for
16732  # VS linker. This must be done before changing the PATH when looking for VS.
16733  # Extract the first word of "link", so it can be a program name with args.
16734set dummy link; ac_word=$2
16735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16736$as_echo_n "checking for $ac_word... " >&6; }
16737if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16738  $as_echo_n "(cached) " >&6
16739else
16740  case $CYGWIN_LINK in
16741  [\\/]* | ?:[\\/]*)
16742  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16743  ;;
16744  *)
16745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16746for as_dir in $PATH
16747do
16748  IFS=$as_save_IFS
16749  test -z "$as_dir" && as_dir=.
16750    for ac_exec_ext in '' $ac_executable_extensions; do
16751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16752    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16754    break 2
16755  fi
16756done
16757  done
16758IFS=$as_save_IFS
16759
16760  ;;
16761esac
16762fi
16763CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16764if test -n "$CYGWIN_LINK"; then
16765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16766$as_echo "$CYGWIN_LINK" >&6; }
16767else
16768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16769$as_echo "no" >&6; }
16770fi
16771
16772
16773  if test "x$CYGWIN_LINK" != x; then
16774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16775$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16776    "$CYGWIN_LINK" --version > /dev/null
16777    if test $? -eq 0 ; then
16778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16779$as_echo "yes" >&6; }
16780    else
16781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16782$as_echo "no" >&6; }
16783      # This might be the VS linker. Don't exclude it later on.
16784      CYGWIN_LINK=""
16785    fi
16786  fi
16787
16788  # First-hand choice is to locate and run the vsvars bat file.
16789
16790  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16791    VCVARSFILE="vc/bin/vcvars32.bat"
16792  else
16793    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16794  fi
16795
16796  VS_ENV_CMD=""
16797  VS_ENV_ARGS=""
16798  if test "x$with_toolsdir" != x; then
16799
16800  if test "x$VS_ENV_CMD" = x; then
16801    VS100BASE="$with_toolsdir/../.."
16802    METHOD="--with-tools-dir"
16803
16804  windows_path="$VS100BASE"
16805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16806    unix_path=`$CYGPATH -u "$windows_path"`
16807    VS100BASE="$unix_path"
16808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16810    VS100BASE="$unix_path"
16811  fi
16812
16813    if test -d "$VS100BASE"; then
16814      if test -f "$VS100BASE/$VCVARSFILE"; then
16815        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16816$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16817        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16818      else
16819        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16820$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16821        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16822$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16823      fi
16824    fi
16825  fi
16826
16827  fi
16828
16829  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16830    # Having specified an argument which is incorrect will produce an instant failure;
16831    # we should not go on looking
16832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16833$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16834    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16835$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16836    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16837  fi
16838
16839  if test "x$VS100COMNTOOLS" != x; then
16840
16841  if test "x$VS_ENV_CMD" = x; then
16842    VS100BASE="$VS100COMNTOOLS/../.."
16843    METHOD="VS100COMNTOOLS variable"
16844
16845  windows_path="$VS100BASE"
16846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16847    unix_path=`$CYGPATH -u "$windows_path"`
16848    VS100BASE="$unix_path"
16849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16851    VS100BASE="$unix_path"
16852  fi
16853
16854    if test -d "$VS100BASE"; then
16855      if test -f "$VS100BASE/$VCVARSFILE"; then
16856        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16857$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16858        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16859      else
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16861$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16862        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16863$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16864      fi
16865    fi
16866  fi
16867
16868  fi
16869  if test "x$PROGRAMFILES" != x; then
16870
16871  if test "x$VS_ENV_CMD" = x; then
16872    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16873    METHOD="well-known name"
16874
16875  windows_path="$VS100BASE"
16876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16877    unix_path=`$CYGPATH -u "$windows_path"`
16878    VS100BASE="$unix_path"
16879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16881    VS100BASE="$unix_path"
16882  fi
16883
16884    if test -d "$VS100BASE"; then
16885      if test -f "$VS100BASE/$VCVARSFILE"; then
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16887$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16888        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16889      else
16890        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16891$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16892        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16893$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16894      fi
16895    fi
16896  fi
16897
16898  fi
16899
16900  if test "x$VS_ENV_CMD" = x; then
16901    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16902    METHOD="well-known name"
16903
16904  windows_path="$VS100BASE"
16905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16906    unix_path=`$CYGPATH -u "$windows_path"`
16907    VS100BASE="$unix_path"
16908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16910    VS100BASE="$unix_path"
16911  fi
16912
16913    if test -d "$VS100BASE"; then
16914      if test -f "$VS100BASE/$VCVARSFILE"; then
16915        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16916$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16917        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16918      else
16919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16920$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16922$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16923      fi
16924    fi
16925  fi
16926
16927
16928  if test "x$VS_ENV_CMD" = x; then
16929    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16930    METHOD="well-known name"
16931
16932  windows_path="$VS100BASE"
16933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16934    unix_path=`$CYGPATH -u "$windows_path"`
16935    VS100BASE="$unix_path"
16936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16938    VS100BASE="$unix_path"
16939  fi
16940
16941    if test -d "$VS100BASE"; then
16942      if test -f "$VS100BASE/$VCVARSFILE"; then
16943        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16944$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16945        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16946      else
16947        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16948$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16949        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16950$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16951      fi
16952    fi
16953  fi
16954
16955
16956  if test "x$ProgramW6432" != x; then
16957
16958  if test "x$VS_ENV_CMD" = x; then
16959    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16960    METHOD="well-known name"
16961
16962  windows_path="$WIN_SDK_BASE"
16963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16964    unix_path=`$CYGPATH -u "$windows_path"`
16965    WIN_SDK_BASE="$unix_path"
16966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16968    WIN_SDK_BASE="$unix_path"
16969  fi
16970
16971    if test -d "$WIN_SDK_BASE"; then
16972      # There have been cases of partial or broken SDK installations. A missing
16973      # lib dir is not going to work.
16974      if test ! -d "$WIN_SDK_BASE/../lib"; then
16975        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16976$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16977        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16978$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16979      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16981$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16982        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16983        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16984          VS_ENV_ARGS="/x86"
16985        else
16986          VS_ENV_ARGS="/x64"
16987        fi
16988      else
16989        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16990$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16991        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16992$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16993      fi
16994    fi
16995  fi
16996
16997  fi
16998  if test "x$PROGRAMW6432" != x; then
16999
17000  if test "x$VS_ENV_CMD" = x; then
17001    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17002    METHOD="well-known name"
17003
17004  windows_path="$WIN_SDK_BASE"
17005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17006    unix_path=`$CYGPATH -u "$windows_path"`
17007    WIN_SDK_BASE="$unix_path"
17008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17010    WIN_SDK_BASE="$unix_path"
17011  fi
17012
17013    if test -d "$WIN_SDK_BASE"; then
17014      # There have been cases of partial or broken SDK installations. A missing
17015      # lib dir is not going to work.
17016      if test ! -d "$WIN_SDK_BASE/../lib"; then
17017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17018$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17019        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17020$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17021      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17025        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17026          VS_ENV_ARGS="/x86"
17027        else
17028          VS_ENV_ARGS="/x64"
17029        fi
17030      else
17031        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17032$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17034$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17035      fi
17036    fi
17037  fi
17038
17039  fi
17040  if test "x$PROGRAMFILES" != x; then
17041
17042  if test "x$VS_ENV_CMD" = x; then
17043    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17044    METHOD="well-known name"
17045
17046  windows_path="$WIN_SDK_BASE"
17047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17048    unix_path=`$CYGPATH -u "$windows_path"`
17049    WIN_SDK_BASE="$unix_path"
17050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17052    WIN_SDK_BASE="$unix_path"
17053  fi
17054
17055    if test -d "$WIN_SDK_BASE"; then
17056      # There have been cases of partial or broken SDK installations. A missing
17057      # lib dir is not going to work.
17058      if test ! -d "$WIN_SDK_BASE/../lib"; then
17059        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17060$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17061        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17062$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17063      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17066        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17067        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17068          VS_ENV_ARGS="/x86"
17069        else
17070          VS_ENV_ARGS="/x64"
17071        fi
17072      else
17073        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17074$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17075        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17076$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17077      fi
17078    fi
17079  fi
17080
17081  fi
17082
17083  if test "x$VS_ENV_CMD" = x; then
17084    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17085    METHOD="well-known name"
17086
17087  windows_path="$WIN_SDK_BASE"
17088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17089    unix_path=`$CYGPATH -u "$windows_path"`
17090    WIN_SDK_BASE="$unix_path"
17091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17093    WIN_SDK_BASE="$unix_path"
17094  fi
17095
17096    if test -d "$WIN_SDK_BASE"; then
17097      # There have been cases of partial or broken SDK installations. A missing
17098      # lib dir is not going to work.
17099      if test ! -d "$WIN_SDK_BASE/../lib"; then
17100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17101$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17102        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17103$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17104      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17106$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17107        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17108        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17109          VS_ENV_ARGS="/x86"
17110        else
17111          VS_ENV_ARGS="/x64"
17112        fi
17113      else
17114        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17115$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17116        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17117$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17118      fi
17119    fi
17120  fi
17121
17122
17123  if test "x$VS_ENV_CMD" = x; then
17124    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17125    METHOD="well-known name"
17126
17127  windows_path="$WIN_SDK_BASE"
17128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17129    unix_path=`$CYGPATH -u "$windows_path"`
17130    WIN_SDK_BASE="$unix_path"
17131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17133    WIN_SDK_BASE="$unix_path"
17134  fi
17135
17136    if test -d "$WIN_SDK_BASE"; then
17137      # There have been cases of partial or broken SDK installations. A missing
17138      # lib dir is not going to work.
17139      if test ! -d "$WIN_SDK_BASE/../lib"; then
17140        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17141$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17142        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17143$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17144      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17145        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17146$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17147        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17148        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17149          VS_ENV_ARGS="/x86"
17150        else
17151          VS_ENV_ARGS="/x64"
17152        fi
17153      else
17154        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17155$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17156        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17157$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17158      fi
17159    fi
17160  fi
17161
17162
17163  if test "x$VS_ENV_CMD" != x; then
17164    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17165
17166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17167
17168  # First separate the path from the arguments. This will split at the first
17169  # space.
17170  complete="$VS_ENV_CMD"
17171  path="${complete%% *}"
17172  tmp="$complete EOL"
17173  arguments="${tmp#* }"
17174
17175  # Input might be given as Windows format, start by converting to
17176  # unix format.
17177  new_path=`$CYGPATH -u "$path"`
17178
17179  # Now try to locate executable using which
17180  new_path=`$WHICH "$new_path" 2> /dev/null`
17181  # bat and cmd files are not always considered executable in cygwin causing which
17182  # to not find them
17183  if test "x$new_path" = x \
17184      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17185      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17186    new_path=`$CYGPATH -u "$path"`
17187  fi
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=`$CYGPATH -u "$path"`
17196    new_path=`$WHICH "$new_path" 2> /dev/null`
17197    # bat and cmd files are not always considered executable in cygwin causing which
17198    # to not find them
17199    if test "x$new_path" = x \
17200        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17201        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17202      new_path=`$CYGPATH -u "$path"`
17203    fi
17204    if test "x$new_path" = x; then
17205      # It's still not found. Now this is an unrecoverable error.
17206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17207$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17208      has_space=`$ECHO "$complete" | $GREP " "`
17209      if test "x$has_space" != x; then
17210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17212      fi
17213      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17214    fi
17215  fi
17216
17217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17220  # "foo.exe" is OK but "foo" is an error.
17221  #
17222  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17223  # It is also a way to make sure we got the proper file name for the real test later on.
17224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17225  if test "x$test_shortpath" = x; then
17226    # Short path failed, file does not exist as specified.
17227    # Try adding .exe or .cmd
17228    if test -f "${new_path}.exe"; then
17229      input_to_shortpath="${new_path}.exe"
17230    elif test -f "${new_path}.cmd"; then
17231      input_to_shortpath="${new_path}.cmd"
17232    else
17233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17234$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17235      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17236$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17237      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17238    fi
17239  else
17240    input_to_shortpath="$new_path"
17241  fi
17242
17243  # Call helper function which possibly converts this using DOS-style short mode.
17244  # If so, the updated path is stored in $new_path.
17245  new_path="$input_to_shortpath"
17246
17247  input_path="$input_to_shortpath"
17248  # Check if we need to convert this using DOS-style short mode. If the path
17249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17250  # take no chances and rewrite it.
17251  # Note: m4 eats our [], so we need to use [ and ] instead.
17252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17253  if test "x$has_forbidden_chars" != x; then
17254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17258      # Going to short mode and back again did indeed matter. Since short mode is
17259      # case insensitive, let's make it lowercase to improve readability.
17260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17261      # Now convert it back to Unix-stile (cygpath)
17262      input_path=`$CYGPATH -u "$shortmode_path"`
17263      new_path="$input_path"
17264    fi
17265  fi
17266
17267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17268  if test "x$test_cygdrive_prefix" = x; then
17269    # As a simple fix, exclude /usr/bin since it's not a real path.
17270    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17272      # a path prefixed by /cygdrive for fixpath to work.
17273      new_path="$CYGWIN_ROOT_PATH$input_path"
17274    fi
17275  fi
17276
17277  # remove trailing .exe if any
17278  new_path="${new_path/%.exe/}"
17279
17280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17281
17282  # First separate the path from the arguments. This will split at the first
17283  # space.
17284  complete="$VS_ENV_CMD"
17285  path="${complete%% *}"
17286  tmp="$complete EOL"
17287  arguments="${tmp#* }"
17288
17289  # Input might be given as Windows format, start by converting to
17290  # unix format.
17291  new_path="$path"
17292
17293  windows_path="$new_path"
17294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17295    unix_path=`$CYGPATH -u "$windows_path"`
17296    new_path="$unix_path"
17297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17299    new_path="$unix_path"
17300  fi
17301
17302
17303  # Now try to locate executable using which
17304  new_path=`$WHICH "$new_path" 2> /dev/null`
17305
17306  if test "x$new_path" = x; then
17307    # Oops. Which didn't find the executable.
17308    # The splitting of arguments from the executable at a space might have been incorrect,
17309    # since paths with space are more likely in Windows. Give it another try with the whole
17310    # argument.
17311    path="$complete"
17312    arguments="EOL"
17313    new_path="$path"
17314
17315  windows_path="$new_path"
17316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17317    unix_path=`$CYGPATH -u "$windows_path"`
17318    new_path="$unix_path"
17319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17321    new_path="$unix_path"
17322  fi
17323
17324
17325    new_path=`$WHICH "$new_path" 2> /dev/null`
17326
17327    if test "x$new_path" = x; then
17328      # It's still not found. Now this is an unrecoverable error.
17329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17330$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17331      has_space=`$ECHO "$complete" | $GREP " "`
17332      if test "x$has_space" != x; then
17333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17335      fi
17336      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17337    fi
17338  fi
17339
17340  # Now new_path has a complete unix path to the binary
17341  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17342    # Keep paths in /bin as-is, but remove trailing .exe if any
17343    new_path="${new_path/%.exe/}"
17344    # Do not save /bin paths to all_fixpath_prefixes!
17345  else
17346    # Not in mixed or Windows style, start by that.
17347    new_path=`cmd //c echo $new_path`
17348
17349  input_path="$new_path"
17350  # Check if we need to convert this using DOS-style short mode. If the path
17351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17352  # take no chances and rewrite it.
17353  # Note: m4 eats our [], so we need to use [ and ] instead.
17354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17355  if test "x$has_forbidden_chars" != x; then
17356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17358  fi
17359
17360    # Output is in $new_path
17361
17362  windows_path="$new_path"
17363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17364    unix_path=`$CYGPATH -u "$windows_path"`
17365    new_path="$unix_path"
17366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17368    new_path="$unix_path"
17369  fi
17370
17371    # remove trailing .exe if any
17372    new_path="${new_path/%.exe/}"
17373
17374    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17375    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17376  fi
17377
17378  else
17379    # We're on a posix platform. Hooray! :)
17380    # First separate the path from the arguments. This will split at the first
17381    # space.
17382    complete="$VS_ENV_CMD"
17383    path="${complete%% *}"
17384    tmp="$complete EOL"
17385    arguments="${tmp#* }"
17386
17387    # Cannot rely on the command "which" here since it doesn't always work.
17388    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17389    if test -z "$is_absolute_path"; then
17390      # Path to executable is not absolute. Find it.
17391      IFS_save="$IFS"
17392      IFS=:
17393      for p in $PATH; do
17394        if test -f "$p/$path" && test -x "$p/$path"; then
17395          new_path="$p/$path"
17396          break
17397        fi
17398      done
17399      IFS="$IFS_save"
17400    else
17401      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17402$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17403      new_path="$path"
17404    fi
17405
17406    if test "x$new_path" = x; then
17407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17408$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17409      has_space=`$ECHO "$complete" | $GREP " "`
17410      if test "x$has_space" != x; then
17411        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17412$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17413      fi
17414      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17415    fi
17416  fi
17417
17418  # Now join together the path and the arguments once again
17419  if test "x$arguments" != xEOL; then
17420    new_complete="$new_path ${arguments% *}"
17421  else
17422    new_complete="$new_path"
17423  fi
17424
17425  if test "x$complete" != "x$new_complete"; then
17426    VS_ENV_CMD="$new_complete"
17427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17428$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17429  fi
17430
17431
17432    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17433    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17434$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17435    cd $OUTPUT_ROOT
17436    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17437    # to autoconf standards.
17438
17439    #----
17440
17441    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17442    # but calculate the difference in Cygwin environment before/after running it and then
17443    # apply the diff.
17444
17445    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17446      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17447      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17448      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17449    else
17450      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17451      _dosbash=`cmd //c echo \`which bash\``
17452    fi
17453
17454    # generate the set of exported vars before/after the vs10 setup
17455    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17456    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17457    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17458    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17459
17460    # Now execute the newly created bat file.
17461    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17462    cmd /c localdevenvtmp.bat | cat
17463
17464    # apply the diff (less some non-vs10 vars named by "!")
17465    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17466    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17467    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17468
17469    # cleanup
17470    $RM localdevenvtmp*
17471    #----
17472    cd $CURDIR
17473    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17475$as_echo "no" >&6; }
17476      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17477$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17478      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17479$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17480      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17481$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17482      as_fn_error $? "Cannot continue" "$LINENO" 5
17483    fi
17484
17485    # Now set all paths and other env variables. This will allow the rest of
17486    # the configure script to find and run the compiler in the proper way.
17487    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17488$as_echo "$as_me: Setting extracted environment variables" >&6;}
17489    . $OUTPUT_ROOT/localdevenv.sh
17490  else
17491    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17492    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17493$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17494  fi
17495
17496  # At this point, we should have corrent variables in the environment, or we can't continue.
17497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17498$as_echo_n "checking for Visual Studio variables... " >&6; }
17499
17500  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17501    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17503$as_echo "present but broken" >&6; }
17504      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17505    else
17506      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17507$as_echo "ok" >&6; }
17508      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17509      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17510      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17511      # Remove any paths containing # (typically F#) as that messes up make
17512      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17513      VS_PATH="$PATH"
17514
17515
17516
17517    fi
17518  else
17519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17520$as_echo "not found" >&6; }
17521
17522    if test "x$VS_ENV_CMD" = x; then
17523      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17524$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17525      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17526$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17527    else
17528      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17529$as_echo "$as_me: Running the extraction script failed." >&6;}
17530    fi
17531    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17532$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17533    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17534$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17535    as_fn_error $? "Cannot continue" "$LINENO" 5
17536  fi
17537
17538
17539
17540# Check whether --with-msvcr-dll was given.
17541if test "${with_msvcr_dll+set}" = set; then :
17542  withval=$with_msvcr_dll;
17543fi
17544
17545
17546  if test "x$with_msvcr_dll" != x; then
17547    # If given explicitely by user, do not probe. If not present, fail directly.
17548
17549  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17550  METHOD="--with-msvcr-dll"
17551  if test -e "$POSSIBLE_MSVCR_DLL"; then
17552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17553$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17554
17555    # Need to check if the found msvcr is correct architecture
17556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17557$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17558    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17559    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17560      CORRECT_MSVCR_ARCH=386
17561    else
17562      CORRECT_MSVCR_ARCH=x86-64
17563    fi
17564    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17566$as_echo "ok" >&6; }
17567      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17568      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17569$as_echo_n "checking for msvcr100.dll... " >&6; }
17570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17571$as_echo "$MSVCR_DLL" >&6; }
17572    else
17573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17574$as_echo "incorrect, ignoring" >&6; }
17575      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17576$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17577    fi
17578  fi
17579
17580    if test "x$MSVCR_DLL" = x; then
17581      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17582    fi
17583  fi
17584
17585  if test "x$MSVCR_DLL" = x; then
17586    # Probe: Using well-known location from Visual Studio 10.0
17587    if test "x$VCINSTALLDIR" != x; then
17588      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17589
17590  windows_path="$CYGWIN_VC_INSTALL_DIR"
17591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17592    unix_path=`$CYGPATH -u "$windows_path"`
17593    CYGWIN_VC_INSTALL_DIR="$unix_path"
17594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17596    CYGWIN_VC_INSTALL_DIR="$unix_path"
17597  fi
17598
17599      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17600        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17601      else
17602        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17603      fi
17604
17605  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17606  METHOD="well-known location in VCINSTALLDIR"
17607  if test -e "$POSSIBLE_MSVCR_DLL"; then
17608    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17609$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17610
17611    # Need to check if the found msvcr is correct architecture
17612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17613$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17614    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17615    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17616      CORRECT_MSVCR_ARCH=386
17617    else
17618      CORRECT_MSVCR_ARCH=x86-64
17619    fi
17620    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17622$as_echo "ok" >&6; }
17623      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17624      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17625$as_echo_n "checking for msvcr100.dll... " >&6; }
17626      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17627$as_echo "$MSVCR_DLL" >&6; }
17628    else
17629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17630$as_echo "incorrect, ignoring" >&6; }
17631      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17632$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17633    fi
17634  fi
17635
17636    fi
17637  fi
17638
17639  if test "x$MSVCR_DLL" = x; then
17640    # Probe: Check in the Boot JDK directory.
17641    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17642
17643  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17644  METHOD="well-known location in Boot JDK"
17645  if test -e "$POSSIBLE_MSVCR_DLL"; then
17646    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17647$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17648
17649    # Need to check if the found msvcr is correct architecture
17650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17651$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17652    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17653    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17654      CORRECT_MSVCR_ARCH=386
17655    else
17656      CORRECT_MSVCR_ARCH=x86-64
17657    fi
17658    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17660$as_echo "ok" >&6; }
17661      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17662      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17663$as_echo_n "checking for msvcr100.dll... " >&6; }
17664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17665$as_echo "$MSVCR_DLL" >&6; }
17666    else
17667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17668$as_echo "incorrect, ignoring" >&6; }
17669      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17670$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17671    fi
17672  fi
17673
17674  fi
17675
17676  if test "x$MSVCR_DLL" = x; then
17677    # Probe: Look in the Windows system32 directory
17678    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17679
17680  windows_path="$CYGWIN_SYSTEMROOT"
17681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17682    unix_path=`$CYGPATH -u "$windows_path"`
17683    CYGWIN_SYSTEMROOT="$unix_path"
17684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17686    CYGWIN_SYSTEMROOT="$unix_path"
17687  fi
17688
17689    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17690
17691  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17692  METHOD="well-known location in SYSTEMROOT"
17693  if test -e "$POSSIBLE_MSVCR_DLL"; then
17694    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17695$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17696
17697    # Need to check if the found msvcr is correct architecture
17698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17699$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17700    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17701    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17702      CORRECT_MSVCR_ARCH=386
17703    else
17704      CORRECT_MSVCR_ARCH=x86-64
17705    fi
17706    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17708$as_echo "ok" >&6; }
17709      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17711$as_echo_n "checking for msvcr100.dll... " >&6; }
17712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17713$as_echo "$MSVCR_DLL" >&6; }
17714    else
17715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17716$as_echo "incorrect, ignoring" >&6; }
17717      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17718$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17719    fi
17720  fi
17721
17722  fi
17723
17724  if test "x$MSVCR_DLL" = x; then
17725    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17726    if test "x$VS100COMNTOOLS" != x; then
17727      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17728
17729  windows_path="$CYGWIN_VS_TOOLS_DIR"
17730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17731    unix_path=`$CYGPATH -u "$windows_path"`
17732    CYGWIN_VS_TOOLS_DIR="$unix_path"
17733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17735    CYGWIN_VS_TOOLS_DIR="$unix_path"
17736  fi
17737
17738      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17739        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17740      else
17741        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17742      fi
17743
17744  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17745  METHOD="search of VS100COMNTOOLS"
17746  if test -e "$POSSIBLE_MSVCR_DLL"; then
17747    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17748$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17749
17750    # Need to check if the found msvcr is correct architecture
17751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17752$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17753    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17754    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17755      CORRECT_MSVCR_ARCH=386
17756    else
17757      CORRECT_MSVCR_ARCH=x86-64
17758    fi
17759    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17761$as_echo "ok" >&6; }
17762      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17763      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17764$as_echo_n "checking for msvcr100.dll... " >&6; }
17765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17766$as_echo "$MSVCR_DLL" >&6; }
17767    else
17768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17769$as_echo "incorrect, ignoring" >&6; }
17770      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17771$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17772    fi
17773  fi
17774
17775    fi
17776  fi
17777
17778  if test "x$MSVCR_DLL" = x; then
17779    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17780    # (This was the original behaviour; kept since it might turn up something)
17781    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17782      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17783        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17784      else
17785        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17786        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17787          # We're grasping at straws now...
17788          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17789        fi
17790      fi
17791
17792
17793  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17794  METHOD="search of VCINSTALLDIR"
17795  if test -e "$POSSIBLE_MSVCR_DLL"; then
17796    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17797$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17798
17799    # Need to check if the found msvcr is correct architecture
17800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17801$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17802    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17803    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17804      CORRECT_MSVCR_ARCH=386
17805    else
17806      CORRECT_MSVCR_ARCH=x86-64
17807    fi
17808    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17810$as_echo "ok" >&6; }
17811      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17813$as_echo_n "checking for msvcr100.dll... " >&6; }
17814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17815$as_echo "$MSVCR_DLL" >&6; }
17816    else
17817      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17818$as_echo "incorrect, ignoring" >&6; }
17819      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17820$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17821    fi
17822  fi
17823
17824    fi
17825  fi
17826
17827  if test "x$MSVCR_DLL" = x; then
17828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17829$as_echo_n "checking for msvcr100.dll... " >&6; }
17830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17831$as_echo "no" >&6; }
17832    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17833  fi
17834
17835
17836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17837
17838  # Input might be given as Windows format, start by converting to
17839  # unix format.
17840  path="$MSVCR_DLL"
17841  new_path=`$CYGPATH -u "$path"`
17842
17843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17846  # "foo.exe" is OK but "foo" is an error.
17847  #
17848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17849  # It is also a way to make sure we got the proper file name for the real test later on.
17850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17851  if test "x$test_shortpath" = x; then
17852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17853$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17854    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17855  fi
17856
17857  # Call helper function which possibly converts this using DOS-style short mode.
17858  # If so, the updated path is stored in $new_path.
17859
17860  input_path="$new_path"
17861  # Check if we need to convert this using DOS-style short mode. If the path
17862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17863  # take no chances and rewrite it.
17864  # Note: m4 eats our [], so we need to use [ and ] instead.
17865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17866  if test "x$has_forbidden_chars" != x; then
17867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17871      # Going to short mode and back again did indeed matter. Since short mode is
17872      # case insensitive, let's make it lowercase to improve readability.
17873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17874      # Now convert it back to Unix-stile (cygpath)
17875      input_path=`$CYGPATH -u "$shortmode_path"`
17876      new_path="$input_path"
17877    fi
17878  fi
17879
17880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17881  if test "x$test_cygdrive_prefix" = x; then
17882    # As a simple fix, exclude /usr/bin since it's not a real path.
17883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17885      # a path prefixed by /cygdrive for fixpath to work.
17886      new_path="$CYGWIN_ROOT_PATH$input_path"
17887    fi
17888  fi
17889
17890
17891  if test "x$path" != "x$new_path"; then
17892    MSVCR_DLL="$new_path"
17893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17894$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17895  fi
17896
17897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17898
17899  path="$MSVCR_DLL"
17900  has_colon=`$ECHO $path | $GREP ^.:`
17901  new_path="$path"
17902  if test "x$has_colon" = x; then
17903    # Not in mixed or Windows style, start by that.
17904    new_path=`cmd //c echo $path`
17905  fi
17906
17907
17908  input_path="$new_path"
17909  # Check if we need to convert this using DOS-style short mode. If the path
17910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17911  # take no chances and rewrite it.
17912  # Note: m4 eats our [], so we need to use [ and ] instead.
17913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17914  if test "x$has_forbidden_chars" != x; then
17915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17917  fi
17918
17919
17920  windows_path="$new_path"
17921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17922    unix_path=`$CYGPATH -u "$windows_path"`
17923    new_path="$unix_path"
17924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17926    new_path="$unix_path"
17927  fi
17928
17929  if test "x$path" != "x$new_path"; then
17930    MSVCR_DLL="$new_path"
17931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17932$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17933  fi
17934
17935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17937
17938  else
17939    # We're on a posix platform. Hooray! :)
17940    path="$MSVCR_DLL"
17941    has_space=`$ECHO "$path" | $GREP " "`
17942    if test "x$has_space" != x; then
17943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17944$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17945      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17946    fi
17947
17948    # Use eval to expand a potential ~
17949    eval path="$path"
17950    if test ! -f "$path" && test ! -d "$path"; then
17951      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17952    fi
17953
17954    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17955  fi
17956
17957
17958
17959
17960# Check whether --with-dxsdk was given.
17961if test "${with_dxsdk+set}" = set; then :
17962  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17963$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17964fi
17965
17966
17967
17968
17969# Check whether --with-dxsdk-lib was given.
17970if test "${with_dxsdk_lib+set}" = set; then :
17971  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17972$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17973fi
17974
17975
17976
17977
17978# Check whether --with-dxsdk-include was given.
17979if test "${with_dxsdk_include+set}" = set; then :
17980  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17981$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17982fi
17983
17984
17985  fi
17986
17987
17988
17989  # If --build AND --host is set, then the configure script will find any
17990  # cross compilation tools in the PATH. Cross compilation tools
17991  # follows the cross compilation standard where they are prefixed with ${host}.
17992  # For example the binary i686-sun-solaris2.10-gcc
17993  # will cross compile for i686-sun-solaris2.10
17994  # If neither of build and host is not set, then build=host and the
17995  # default compiler found in the path will be used.
17996  # Setting only --host, does not seem to be really supported.
17997  # Please set both --build and --host if you want to cross compile.
17998
17999  if test "x$COMPILE_TYPE" = "xcross"; then
18000    # Now we to find a C/C++ compiler that can build executables for the build
18001    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18002    # once. Also, we need to do this before adding a tools dir to the path,
18003    # otherwise we might pick up cross-compilers which don't use standard naming.
18004    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18005    # to wait until they are properly discovered.
18006    for ac_prog in cl cc gcc
18007do
18008  # Extract the first word of "$ac_prog", so it can be a program name with args.
18009set dummy $ac_prog; ac_word=$2
18010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18011$as_echo_n "checking for $ac_word... " >&6; }
18012if ${ac_cv_path_BUILD_CC+:} false; then :
18013  $as_echo_n "(cached) " >&6
18014else
18015  case $BUILD_CC in
18016  [\\/]* | ?:[\\/]*)
18017  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18018  ;;
18019  *)
18020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18021for as_dir in $PATH
18022do
18023  IFS=$as_save_IFS
18024  test -z "$as_dir" && as_dir=.
18025    for ac_exec_ext in '' $ac_executable_extensions; do
18026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18027    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18029    break 2
18030  fi
18031done
18032  done
18033IFS=$as_save_IFS
18034
18035  ;;
18036esac
18037fi
18038BUILD_CC=$ac_cv_path_BUILD_CC
18039if test -n "$BUILD_CC"; then
18040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18041$as_echo "$BUILD_CC" >&6; }
18042else
18043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18044$as_echo "no" >&6; }
18045fi
18046
18047
18048  test -n "$BUILD_CC" && break
18049done
18050
18051
18052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18053
18054  # First separate the path from the arguments. This will split at the first
18055  # space.
18056  complete="$BUILD_CC"
18057  path="${complete%% *}"
18058  tmp="$complete EOL"
18059  arguments="${tmp#* }"
18060
18061  # Input might be given as Windows format, start by converting to
18062  # unix format.
18063  new_path=`$CYGPATH -u "$path"`
18064
18065  # Now try to locate executable using which
18066  new_path=`$WHICH "$new_path" 2> /dev/null`
18067  # bat and cmd files are not always considered executable in cygwin causing which
18068  # to not find them
18069  if test "x$new_path" = x \
18070      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18071      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18072    new_path=`$CYGPATH -u "$path"`
18073  fi
18074  if test "x$new_path" = x; then
18075    # Oops. Which didn't find the executable.
18076    # The splitting of arguments from the executable at a space might have been incorrect,
18077    # since paths with space are more likely in Windows. Give it another try with the whole
18078    # argument.
18079    path="$complete"
18080    arguments="EOL"
18081    new_path=`$CYGPATH -u "$path"`
18082    new_path=`$WHICH "$new_path" 2> /dev/null`
18083    # bat and cmd files are not always considered executable in cygwin causing which
18084    # to not find them
18085    if test "x$new_path" = x \
18086        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18087        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18088      new_path=`$CYGPATH -u "$path"`
18089    fi
18090    if test "x$new_path" = x; then
18091      # It's still not found. Now this is an unrecoverable error.
18092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18093$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18094      has_space=`$ECHO "$complete" | $GREP " "`
18095      if test "x$has_space" != x; then
18096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18098      fi
18099      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18100    fi
18101  fi
18102
18103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18106  # "foo.exe" is OK but "foo" is an error.
18107  #
18108  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18109  # It is also a way to make sure we got the proper file name for the real test later on.
18110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18111  if test "x$test_shortpath" = x; then
18112    # Short path failed, file does not exist as specified.
18113    # Try adding .exe or .cmd
18114    if test -f "${new_path}.exe"; then
18115      input_to_shortpath="${new_path}.exe"
18116    elif test -f "${new_path}.cmd"; then
18117      input_to_shortpath="${new_path}.cmd"
18118    else
18119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18120$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18121      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18122$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18123      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18124    fi
18125  else
18126    input_to_shortpath="$new_path"
18127  fi
18128
18129  # Call helper function which possibly converts this using DOS-style short mode.
18130  # If so, the updated path is stored in $new_path.
18131  new_path="$input_to_shortpath"
18132
18133  input_path="$input_to_shortpath"
18134  # Check if we need to convert this using DOS-style short mode. If the path
18135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18136  # take no chances and rewrite it.
18137  # Note: m4 eats our [], so we need to use [ and ] instead.
18138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18139  if test "x$has_forbidden_chars" != x; then
18140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18144      # Going to short mode and back again did indeed matter. Since short mode is
18145      # case insensitive, let's make it lowercase to improve readability.
18146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18147      # Now convert it back to Unix-stile (cygpath)
18148      input_path=`$CYGPATH -u "$shortmode_path"`
18149      new_path="$input_path"
18150    fi
18151  fi
18152
18153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18154  if test "x$test_cygdrive_prefix" = x; then
18155    # As a simple fix, exclude /usr/bin since it's not a real path.
18156    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18158      # a path prefixed by /cygdrive for fixpath to work.
18159      new_path="$CYGWIN_ROOT_PATH$input_path"
18160    fi
18161  fi
18162
18163  # remove trailing .exe if any
18164  new_path="${new_path/%.exe/}"
18165
18166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18167
18168  # First separate the path from the arguments. This will split at the first
18169  # space.
18170  complete="$BUILD_CC"
18171  path="${complete%% *}"
18172  tmp="$complete EOL"
18173  arguments="${tmp#* }"
18174
18175  # Input might be given as Windows format, start by converting to
18176  # unix format.
18177  new_path="$path"
18178
18179  windows_path="$new_path"
18180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18181    unix_path=`$CYGPATH -u "$windows_path"`
18182    new_path="$unix_path"
18183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18185    new_path="$unix_path"
18186  fi
18187
18188
18189  # Now try to locate executable using which
18190  new_path=`$WHICH "$new_path" 2> /dev/null`
18191
18192  if test "x$new_path" = x; then
18193    # Oops. Which didn't find the executable.
18194    # The splitting of arguments from the executable at a space might have been incorrect,
18195    # since paths with space are more likely in Windows. Give it another try with the whole
18196    # argument.
18197    path="$complete"
18198    arguments="EOL"
18199    new_path="$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
18211    new_path=`$WHICH "$new_path" 2> /dev/null`
18212
18213    if test "x$new_path" = x; then
18214      # It's still not found. Now this is an unrecoverable error.
18215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18216$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18217      has_space=`$ECHO "$complete" | $GREP " "`
18218      if test "x$has_space" != x; then
18219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18221      fi
18222      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18223    fi
18224  fi
18225
18226  # Now new_path has a complete unix path to the binary
18227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18228    # Keep paths in /bin as-is, but remove trailing .exe if any
18229    new_path="${new_path/%.exe/}"
18230    # Do not save /bin paths to all_fixpath_prefixes!
18231  else
18232    # Not in mixed or Windows style, start by that.
18233    new_path=`cmd //c echo $new_path`
18234
18235  input_path="$new_path"
18236  # Check if we need to convert this using DOS-style short mode. If the path
18237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18238  # take no chances and rewrite it.
18239  # Note: m4 eats our [], so we need to use [ and ] instead.
18240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18241  if test "x$has_forbidden_chars" != x; then
18242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18244  fi
18245
18246    # Output is in $new_path
18247
18248  windows_path="$new_path"
18249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18250    unix_path=`$CYGPATH -u "$windows_path"`
18251    new_path="$unix_path"
18252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18254    new_path="$unix_path"
18255  fi
18256
18257    # remove trailing .exe if any
18258    new_path="${new_path/%.exe/}"
18259
18260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18262  fi
18263
18264  else
18265    # We're on a posix platform. Hooray! :)
18266    # First separate the path from the arguments. This will split at the first
18267    # space.
18268    complete="$BUILD_CC"
18269    path="${complete%% *}"
18270    tmp="$complete EOL"
18271    arguments="${tmp#* }"
18272
18273    # Cannot rely on the command "which" here since it doesn't always work.
18274    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18275    if test -z "$is_absolute_path"; then
18276      # Path to executable is not absolute. Find it.
18277      IFS_save="$IFS"
18278      IFS=:
18279      for p in $PATH; do
18280        if test -f "$p/$path" && test -x "$p/$path"; then
18281          new_path="$p/$path"
18282          break
18283        fi
18284      done
18285      IFS="$IFS_save"
18286    else
18287      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18288$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18289      new_path="$path"
18290    fi
18291
18292    if test "x$new_path" = x; then
18293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18294$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18295      has_space=`$ECHO "$complete" | $GREP " "`
18296      if test "x$has_space" != x; then
18297        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18298$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18299      fi
18300      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18301    fi
18302  fi
18303
18304  # Now join together the path and the arguments once again
18305  if test "x$arguments" != xEOL; then
18306    new_complete="$new_path ${arguments% *}"
18307  else
18308    new_complete="$new_path"
18309  fi
18310
18311  if test "x$complete" != "x$new_complete"; then
18312    BUILD_CC="$new_complete"
18313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18314$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18315  fi
18316
18317    for ac_prog in cl CC g++
18318do
18319  # Extract the first word of "$ac_prog", so it can be a program name with args.
18320set dummy $ac_prog; ac_word=$2
18321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18322$as_echo_n "checking for $ac_word... " >&6; }
18323if ${ac_cv_path_BUILD_CXX+:} false; then :
18324  $as_echo_n "(cached) " >&6
18325else
18326  case $BUILD_CXX in
18327  [\\/]* | ?:[\\/]*)
18328  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18329  ;;
18330  *)
18331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18332for as_dir in $PATH
18333do
18334  IFS=$as_save_IFS
18335  test -z "$as_dir" && as_dir=.
18336    for ac_exec_ext in '' $ac_executable_extensions; do
18337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18338    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18340    break 2
18341  fi
18342done
18343  done
18344IFS=$as_save_IFS
18345
18346  ;;
18347esac
18348fi
18349BUILD_CXX=$ac_cv_path_BUILD_CXX
18350if test -n "$BUILD_CXX"; then
18351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18352$as_echo "$BUILD_CXX" >&6; }
18353else
18354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18355$as_echo "no" >&6; }
18356fi
18357
18358
18359  test -n "$BUILD_CXX" && break
18360done
18361
18362
18363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18364
18365  # First separate the path from the arguments. This will split at the first
18366  # space.
18367  complete="$BUILD_CXX"
18368  path="${complete%% *}"
18369  tmp="$complete EOL"
18370  arguments="${tmp#* }"
18371
18372  # Input might be given as Windows format, start by converting to
18373  # unix format.
18374  new_path=`$CYGPATH -u "$path"`
18375
18376  # Now try to locate executable using which
18377  new_path=`$WHICH "$new_path" 2> /dev/null`
18378  # bat and cmd files are not always considered executable in cygwin causing which
18379  # to not find them
18380  if test "x$new_path" = x \
18381      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18382      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18383    new_path=`$CYGPATH -u "$path"`
18384  fi
18385  if test "x$new_path" = x; then
18386    # Oops. Which didn't find the executable.
18387    # The splitting of arguments from the executable at a space might have been incorrect,
18388    # since paths with space are more likely in Windows. Give it another try with the whole
18389    # argument.
18390    path="$complete"
18391    arguments="EOL"
18392    new_path=`$CYGPATH -u "$path"`
18393    new_path=`$WHICH "$new_path" 2> /dev/null`
18394    # bat and cmd files are not always considered executable in cygwin causing which
18395    # to not find them
18396    if test "x$new_path" = x \
18397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18399      new_path=`$CYGPATH -u "$path"`
18400    fi
18401    if test "x$new_path" = x; then
18402      # It's still not found. Now this is an unrecoverable error.
18403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18404$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18405      has_space=`$ECHO "$complete" | $GREP " "`
18406      if test "x$has_space" != x; then
18407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18409      fi
18410      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18411    fi
18412  fi
18413
18414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18417  # "foo.exe" is OK but "foo" is an error.
18418  #
18419  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18420  # It is also a way to make sure we got the proper file name for the real test later on.
18421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18422  if test "x$test_shortpath" = x; then
18423    # Short path failed, file does not exist as specified.
18424    # Try adding .exe or .cmd
18425    if test -f "${new_path}.exe"; then
18426      input_to_shortpath="${new_path}.exe"
18427    elif test -f "${new_path}.cmd"; then
18428      input_to_shortpath="${new_path}.cmd"
18429    else
18430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18431$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18432      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18433$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18434      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18435    fi
18436  else
18437    input_to_shortpath="$new_path"
18438  fi
18439
18440  # Call helper function which possibly converts this using DOS-style short mode.
18441  # If so, the updated path is stored in $new_path.
18442  new_path="$input_to_shortpath"
18443
18444  input_path="$input_to_shortpath"
18445  # Check if we need to convert this using DOS-style short mode. If the path
18446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18447  # take no chances and rewrite it.
18448  # Note: m4 eats our [], so we need to use [ and ] instead.
18449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18450  if test "x$has_forbidden_chars" != x; then
18451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18455      # Going to short mode and back again did indeed matter. Since short mode is
18456      # case insensitive, let's make it lowercase to improve readability.
18457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18458      # Now convert it back to Unix-stile (cygpath)
18459      input_path=`$CYGPATH -u "$shortmode_path"`
18460      new_path="$input_path"
18461    fi
18462  fi
18463
18464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18465  if test "x$test_cygdrive_prefix" = x; then
18466    # As a simple fix, exclude /usr/bin since it's not a real path.
18467    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18469      # a path prefixed by /cygdrive for fixpath to work.
18470      new_path="$CYGWIN_ROOT_PATH$input_path"
18471    fi
18472  fi
18473
18474  # remove trailing .exe if any
18475  new_path="${new_path/%.exe/}"
18476
18477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18478
18479  # First separate the path from the arguments. This will split at the first
18480  # space.
18481  complete="$BUILD_CXX"
18482  path="${complete%% *}"
18483  tmp="$complete EOL"
18484  arguments="${tmp#* }"
18485
18486  # Input might be given as Windows format, start by converting to
18487  # unix format.
18488  new_path="$path"
18489
18490  windows_path="$new_path"
18491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18492    unix_path=`$CYGPATH -u "$windows_path"`
18493    new_path="$unix_path"
18494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18496    new_path="$unix_path"
18497  fi
18498
18499
18500  # Now try to locate executable using which
18501  new_path=`$WHICH "$new_path" 2> /dev/null`
18502
18503  if test "x$new_path" = x; then
18504    # Oops. Which didn't find the executable.
18505    # The splitting of arguments from the executable at a space might have been incorrect,
18506    # since paths with space are more likely in Windows. Give it another try with the whole
18507    # argument.
18508    path="$complete"
18509    arguments="EOL"
18510    new_path="$path"
18511
18512  windows_path="$new_path"
18513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18514    unix_path=`$CYGPATH -u "$windows_path"`
18515    new_path="$unix_path"
18516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18518    new_path="$unix_path"
18519  fi
18520
18521
18522    new_path=`$WHICH "$new_path" 2> /dev/null`
18523
18524    if test "x$new_path" = x; then
18525      # It's still not found. Now this is an unrecoverable error.
18526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18527$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18528      has_space=`$ECHO "$complete" | $GREP " "`
18529      if test "x$has_space" != x; then
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18532      fi
18533      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18534    fi
18535  fi
18536
18537  # Now new_path has a complete unix path to the binary
18538  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18539    # Keep paths in /bin as-is, but remove trailing .exe if any
18540    new_path="${new_path/%.exe/}"
18541    # Do not save /bin paths to all_fixpath_prefixes!
18542  else
18543    # Not in mixed or Windows style, start by that.
18544    new_path=`cmd //c echo $new_path`
18545
18546  input_path="$new_path"
18547  # Check if we need to convert this using DOS-style short mode. If the path
18548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18549  # take no chances and rewrite it.
18550  # Note: m4 eats our [], so we need to use [ and ] instead.
18551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18552  if test "x$has_forbidden_chars" != x; then
18553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18555  fi
18556
18557    # Output is in $new_path
18558
18559  windows_path="$new_path"
18560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18561    unix_path=`$CYGPATH -u "$windows_path"`
18562    new_path="$unix_path"
18563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18565    new_path="$unix_path"
18566  fi
18567
18568    # remove trailing .exe if any
18569    new_path="${new_path/%.exe/}"
18570
18571    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18572    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18573  fi
18574
18575  else
18576    # We're on a posix platform. Hooray! :)
18577    # First separate the path from the arguments. This will split at the first
18578    # space.
18579    complete="$BUILD_CXX"
18580    path="${complete%% *}"
18581    tmp="$complete EOL"
18582    arguments="${tmp#* }"
18583
18584    # Cannot rely on the command "which" here since it doesn't always work.
18585    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18586    if test -z "$is_absolute_path"; then
18587      # Path to executable is not absolute. Find it.
18588      IFS_save="$IFS"
18589      IFS=:
18590      for p in $PATH; do
18591        if test -f "$p/$path" && test -x "$p/$path"; then
18592          new_path="$p/$path"
18593          break
18594        fi
18595      done
18596      IFS="$IFS_save"
18597    else
18598      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18599$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18600      new_path="$path"
18601    fi
18602
18603    if test "x$new_path" = x; then
18604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18605$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18606      has_space=`$ECHO "$complete" | $GREP " "`
18607      if test "x$has_space" != x; then
18608        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18609$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18610      fi
18611      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18612    fi
18613  fi
18614
18615  # Now join together the path and the arguments once again
18616  if test "x$arguments" != xEOL; then
18617    new_complete="$new_path ${arguments% *}"
18618  else
18619    new_complete="$new_path"
18620  fi
18621
18622  if test "x$complete" != "x$new_complete"; then
18623    BUILD_CXX="$new_complete"
18624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18625$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18626  fi
18627
18628    # Extract the first word of "ld", so it can be a program name with args.
18629set dummy ld; ac_word=$2
18630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18631$as_echo_n "checking for $ac_word... " >&6; }
18632if ${ac_cv_path_BUILD_LD+:} false; then :
18633  $as_echo_n "(cached) " >&6
18634else
18635  case $BUILD_LD in
18636  [\\/]* | ?:[\\/]*)
18637  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18638  ;;
18639  *)
18640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18641for as_dir in $PATH
18642do
18643  IFS=$as_save_IFS
18644  test -z "$as_dir" && as_dir=.
18645    for ac_exec_ext in '' $ac_executable_extensions; do
18646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18647    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18649    break 2
18650  fi
18651done
18652  done
18653IFS=$as_save_IFS
18654
18655  ;;
18656esac
18657fi
18658BUILD_LD=$ac_cv_path_BUILD_LD
18659if test -n "$BUILD_LD"; then
18660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18661$as_echo "$BUILD_LD" >&6; }
18662else
18663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18664$as_echo "no" >&6; }
18665fi
18666
18667
18668
18669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18670
18671  # First separate the path from the arguments. This will split at the first
18672  # space.
18673  complete="$BUILD_LD"
18674  path="${complete%% *}"
18675  tmp="$complete EOL"
18676  arguments="${tmp#* }"
18677
18678  # Input might be given as Windows format, start by converting to
18679  # unix format.
18680  new_path=`$CYGPATH -u "$path"`
18681
18682  # Now try to locate executable using which
18683  new_path=`$WHICH "$new_path" 2> /dev/null`
18684  # bat and cmd files are not always considered executable in cygwin causing which
18685  # to not find them
18686  if test "x$new_path" = x \
18687      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18688      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18689    new_path=`$CYGPATH -u "$path"`
18690  fi
18691  if test "x$new_path" = x; then
18692    # Oops. Which didn't find the executable.
18693    # The splitting of arguments from the executable at a space might have been incorrect,
18694    # since paths with space are more likely in Windows. Give it another try with the whole
18695    # argument.
18696    path="$complete"
18697    arguments="EOL"
18698    new_path=`$CYGPATH -u "$path"`
18699    new_path=`$WHICH "$new_path" 2> /dev/null`
18700    # bat and cmd files are not always considered executable in cygwin causing which
18701    # to not find them
18702    if test "x$new_path" = x \
18703        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18704        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18705      new_path=`$CYGPATH -u "$path"`
18706    fi
18707    if test "x$new_path" = x; then
18708      # It's still not found. Now this is an unrecoverable error.
18709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18710$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18711      has_space=`$ECHO "$complete" | $GREP " "`
18712      if test "x$has_space" != x; then
18713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18715      fi
18716      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18717    fi
18718  fi
18719
18720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18723  # "foo.exe" is OK but "foo" is an error.
18724  #
18725  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18726  # It is also a way to make sure we got the proper file name for the real test later on.
18727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18728  if test "x$test_shortpath" = x; then
18729    # Short path failed, file does not exist as specified.
18730    # Try adding .exe or .cmd
18731    if test -f "${new_path}.exe"; then
18732      input_to_shortpath="${new_path}.exe"
18733    elif test -f "${new_path}.cmd"; then
18734      input_to_shortpath="${new_path}.cmd"
18735    else
18736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18737$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18738      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18739$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18740      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18741    fi
18742  else
18743    input_to_shortpath="$new_path"
18744  fi
18745
18746  # Call helper function which possibly converts this using DOS-style short mode.
18747  # If so, the updated path is stored in $new_path.
18748  new_path="$input_to_shortpath"
18749
18750  input_path="$input_to_shortpath"
18751  # Check if we need to convert this using DOS-style short mode. If the path
18752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18753  # take no chances and rewrite it.
18754  # Note: m4 eats our [], so we need to use [ and ] instead.
18755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18756  if test "x$has_forbidden_chars" != x; then
18757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18761      # Going to short mode and back again did indeed matter. Since short mode is
18762      # case insensitive, let's make it lowercase to improve readability.
18763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18764      # Now convert it back to Unix-stile (cygpath)
18765      input_path=`$CYGPATH -u "$shortmode_path"`
18766      new_path="$input_path"
18767    fi
18768  fi
18769
18770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18771  if test "x$test_cygdrive_prefix" = x; then
18772    # As a simple fix, exclude /usr/bin since it's not a real path.
18773    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18775      # a path prefixed by /cygdrive for fixpath to work.
18776      new_path="$CYGWIN_ROOT_PATH$input_path"
18777    fi
18778  fi
18779
18780  # remove trailing .exe if any
18781  new_path="${new_path/%.exe/}"
18782
18783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18784
18785  # First separate the path from the arguments. This will split at the first
18786  # space.
18787  complete="$BUILD_LD"
18788  path="${complete%% *}"
18789  tmp="$complete EOL"
18790  arguments="${tmp#* }"
18791
18792  # Input might be given as Windows format, start by converting to
18793  # unix format.
18794  new_path="$path"
18795
18796  windows_path="$new_path"
18797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18798    unix_path=`$CYGPATH -u "$windows_path"`
18799    new_path="$unix_path"
18800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18802    new_path="$unix_path"
18803  fi
18804
18805
18806  # Now try to locate executable using which
18807  new_path=`$WHICH "$new_path" 2> /dev/null`
18808
18809  if test "x$new_path" = x; then
18810    # Oops. Which didn't find the executable.
18811    # The splitting of arguments from the executable at a space might have been incorrect,
18812    # since paths with space are more likely in Windows. Give it another try with the whole
18813    # argument.
18814    path="$complete"
18815    arguments="EOL"
18816    new_path="$path"
18817
18818  windows_path="$new_path"
18819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18820    unix_path=`$CYGPATH -u "$windows_path"`
18821    new_path="$unix_path"
18822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18824    new_path="$unix_path"
18825  fi
18826
18827
18828    new_path=`$WHICH "$new_path" 2> /dev/null`
18829
18830    if test "x$new_path" = x; then
18831      # It's still not found. Now this is an unrecoverable error.
18832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18833$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18834      has_space=`$ECHO "$complete" | $GREP " "`
18835      if test "x$has_space" != x; then
18836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18838      fi
18839      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18840    fi
18841  fi
18842
18843  # Now new_path has a complete unix path to the binary
18844  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18845    # Keep paths in /bin as-is, but remove trailing .exe if any
18846    new_path="${new_path/%.exe/}"
18847    # Do not save /bin paths to all_fixpath_prefixes!
18848  else
18849    # Not in mixed or Windows style, start by that.
18850    new_path=`cmd //c echo $new_path`
18851
18852  input_path="$new_path"
18853  # Check if we need to convert this using DOS-style short mode. If the path
18854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18855  # take no chances and rewrite it.
18856  # Note: m4 eats our [], so we need to use [ and ] instead.
18857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18858  if test "x$has_forbidden_chars" != x; then
18859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18861  fi
18862
18863    # Output is in $new_path
18864
18865  windows_path="$new_path"
18866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18867    unix_path=`$CYGPATH -u "$windows_path"`
18868    new_path="$unix_path"
18869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18871    new_path="$unix_path"
18872  fi
18873
18874    # remove trailing .exe if any
18875    new_path="${new_path/%.exe/}"
18876
18877    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18878    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18879  fi
18880
18881  else
18882    # We're on a posix platform. Hooray! :)
18883    # First separate the path from the arguments. This will split at the first
18884    # space.
18885    complete="$BUILD_LD"
18886    path="${complete%% *}"
18887    tmp="$complete EOL"
18888    arguments="${tmp#* }"
18889
18890    # Cannot rely on the command "which" here since it doesn't always work.
18891    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18892    if test -z "$is_absolute_path"; then
18893      # Path to executable is not absolute. Find it.
18894      IFS_save="$IFS"
18895      IFS=:
18896      for p in $PATH; do
18897        if test -f "$p/$path" && test -x "$p/$path"; then
18898          new_path="$p/$path"
18899          break
18900        fi
18901      done
18902      IFS="$IFS_save"
18903    else
18904      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18905$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18906      new_path="$path"
18907    fi
18908
18909    if test "x$new_path" = x; then
18910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18911$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18912      has_space=`$ECHO "$complete" | $GREP " "`
18913      if test "x$has_space" != x; then
18914        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18915$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18916      fi
18917      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18918    fi
18919  fi
18920
18921  # Now join together the path and the arguments once again
18922  if test "x$arguments" != xEOL; then
18923    new_complete="$new_path ${arguments% *}"
18924  else
18925    new_complete="$new_path"
18926  fi
18927
18928  if test "x$complete" != "x$new_complete"; then
18929    BUILD_LD="$new_complete"
18930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18931$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18932  fi
18933
18934  fi
18935
18936
18937
18938
18939  # If a devkit is found on the builddeps server, then prepend its path to the
18940  # PATH variable. If there are cross compilers available in the devkit, these
18941  # will be found by AC_PROG_CC et al.
18942  DEVKIT=
18943
18944
18945  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18946    # Source the builddeps file again, to make sure it uses the latest variables!
18947    . $builddepsfile
18948    # Look for a target and build machine specific resource!
18949    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18950    if test "x$resource" = x; then
18951      # Ok, lets instead look for a target specific resource
18952      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18953    fi
18954    if test "x$resource" = x; then
18955      # Ok, lets instead look for a build specific resource
18956      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18957    fi
18958    if test "x$resource" = x; then
18959      # Ok, lets instead look for a generic resource
18960      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18961      resource=${builddep_devkit}
18962    fi
18963    if test "x$resource" != x; then
18964      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18965$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18966      # If the resource in the builddeps.conf file is an existing directory,
18967      # for example /java/linux/cups
18968      if test -d ${resource}; then
18969        depdir=${resource}
18970      else
18971
18972  # devkit is for example mymodule
18973  # $resource is for example libs/general/libmymod_1_2_3.zip
18974  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18975  # $with_builddeps_dir is for example /localhome/builddeps
18976  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18977  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18978  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18979  filename=`basename $resource`
18980  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18981  filebase=${filename%%.*}
18982  extension=${filename#*.}
18983  installdir=$with_builddeps_dir/$filebase
18984  if test ! -f $installdir/$filename.unpacked; then
18985    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18986$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18987    if test ! -d $installdir; then
18988      mkdir -p $installdir
18989    fi
18990    if test ! -d $installdir; then
18991      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18992    fi
18993    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18994    touch $tmpfile
18995    if test ! -f $tmpfile; then
18996      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18997    fi
18998
18999  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19000  # $tmpfile is the local file name for the downloaded file.
19001  VALID_TOOL=no
19002  if test "x$BDEPS_FTP" = xwget; then
19003    VALID_TOOL=yes
19004    wget -O $tmpfile $with_builddeps_server/$resource
19005  fi
19006  if test "x$BDEPS_FTP" = xlftp; then
19007    VALID_TOOL=yes
19008    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19009  fi
19010  if test "x$BDEPS_FTP" = xftp; then
19011    VALID_TOOL=yes
19012    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19013    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19014    FTPUSERPWD=${FTPSERVER%%@*}
19015    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19016      FTPUSER=${userpwd%%:*}
19017      FTPPWD=${userpwd#*@}
19018      FTPSERVER=${FTPSERVER#*@}
19019    else
19020      FTPUSER=ftp
19021      FTPPWD=ftp
19022    fi
19023    # the "pass" command does not work on some
19024    # ftp clients (read ftp.exe) but if it works,
19025    # passive mode is better!
19026    ( \
19027        echo "user $FTPUSER $FTPPWD"        ; \
19028        echo "pass"                         ; \
19029        echo "bin"                          ; \
19030        echo "get $FTPPATH $tmpfile"              ; \
19031    ) | ftp -in $FTPSERVER
19032  fi
19033  if test "x$VALID_TOOL" != xyes; then
19034    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19035  fi
19036
19037    mv $tmpfile $installdir/$filename
19038    if test ! -s $installdir/$filename; then
19039      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19040    fi
19041    case "$extension" in
19042      zip)  echo "Unzipping $installdir/$filename..."
19043        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19044        ;;
19045      tar.gz) echo "Untaring $installdir/$filename..."
19046        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19047        ;;
19048      tgz) echo "Untaring $installdir/$filename..."
19049        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19050        ;;
19051      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19052        ;;
19053    esac
19054  fi
19055  if test -f $installdir/$filename.unpacked; then
19056    depdir=$installdir
19057  fi
19058
19059      fi
19060      # Source the builddeps file again, because in the previous command, the depdir
19061      # was updated to point at the current build dependency install directory.
19062      . $builddepsfile
19063      # Now extract variables from the builddeps.conf files.
19064      theroot=${builddep_devkit_ROOT}
19065      thecflags=${builddep_devkit_CFLAGS}
19066      thelibs=${builddep_devkit_LIBS}
19067      if test "x$depdir" = x; then
19068        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19069      fi
19070      DEVKIT=$depdir
19071      if test "x$theroot" != x; then
19072        DEVKIT="$theroot"
19073      fi
19074      if test "x$thecflags" != x; then
19075        DEVKIT_CFLAGS="$thecflags"
19076      fi
19077      if test "x$thelibs" != x; then
19078        DEVKIT_LIBS="$thelibs"
19079      fi
19080
19081        # Found devkit
19082        PATH="$DEVKIT/bin:$PATH"
19083        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19084        if test "x$x_includes" = "xNONE"; then
19085          x_includes="$SYS_ROOT/usr/include/X11"
19086        fi
19087        if test "x$x_libraries" = "xNONE"; then
19088          x_libraries="$SYS_ROOT/usr/lib"
19089        fi
19090
19091
19092    fi
19093
19094  fi
19095
19096
19097  # Store the CFLAGS etal passed to the configure script.
19098  ORG_CFLAGS="$CFLAGS"
19099  ORG_CXXFLAGS="$CXXFLAGS"
19100  ORG_OBJCFLAGS="$OBJCFLAGS"
19101
19102  # autoconf magic only relies on PATH, so update it if tools dir is specified
19103  OLD_PATH="$PATH"
19104  if test "x$TOOLS_DIR" != x; then
19105    PATH=$TOOLS_DIR:$PATH
19106  fi
19107
19108
19109  ### Locate C compiler (CC)
19110
19111  # On windows, only cl.exe is supported.
19112  # On Solaris, cc is preferred to gcc.
19113  # Elsewhere, gcc is preferred to cc.
19114
19115  if test "x$CC" != x; then
19116    COMPILER_CHECK_LIST="$CC"
19117  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19118    COMPILER_CHECK_LIST="cl"
19119  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19120    COMPILER_CHECK_LIST="cc gcc"
19121  else
19122    COMPILER_CHECK_LIST="gcc cc"
19123  fi
19124
19125
19126  COMPILER_NAME=C
19127
19128  CC=
19129  # If TOOLS_DIR is set, check for all compiler names in there first
19130  # before checking the rest of the PATH.
19131  if test -n "$TOOLS_DIR"; then
19132    PATH_save="$PATH"
19133    PATH="$TOOLS_DIR"
19134    for ac_prog in $COMPILER_CHECK_LIST
19135do
19136  # Extract the first word of "$ac_prog", so it can be a program name with args.
19137set dummy $ac_prog; ac_word=$2
19138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19139$as_echo_n "checking for $ac_word... " >&6; }
19140if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19141  $as_echo_n "(cached) " >&6
19142else
19143  case $TOOLS_DIR_CC in
19144  [\\/]* | ?:[\\/]*)
19145  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19146  ;;
19147  *)
19148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19149for as_dir in $PATH
19150do
19151  IFS=$as_save_IFS
19152  test -z "$as_dir" && as_dir=.
19153    for ac_exec_ext in '' $ac_executable_extensions; do
19154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19155    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19157    break 2
19158  fi
19159done
19160  done
19161IFS=$as_save_IFS
19162
19163  ;;
19164esac
19165fi
19166TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19167if test -n "$TOOLS_DIR_CC"; then
19168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19169$as_echo "$TOOLS_DIR_CC" >&6; }
19170else
19171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19172$as_echo "no" >&6; }
19173fi
19174
19175
19176  test -n "$TOOLS_DIR_CC" && break
19177done
19178
19179    CC=$TOOLS_DIR_CC
19180    PATH="$PATH_save"
19181  fi
19182
19183  # AC_PATH_PROGS can't be run multiple times with the same variable,
19184  # so create a new name for this run.
19185  if test "x$CC" = x; then
19186    for ac_prog in $COMPILER_CHECK_LIST
19187do
19188  # Extract the first word of "$ac_prog", so it can be a program name with args.
19189set dummy $ac_prog; ac_word=$2
19190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19191$as_echo_n "checking for $ac_word... " >&6; }
19192if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19193  $as_echo_n "(cached) " >&6
19194else
19195  case $POTENTIAL_CC in
19196  [\\/]* | ?:[\\/]*)
19197  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19198  ;;
19199  *)
19200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19201for as_dir in $PATH
19202do
19203  IFS=$as_save_IFS
19204  test -z "$as_dir" && as_dir=.
19205    for ac_exec_ext in '' $ac_executable_extensions; do
19206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19207    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19209    break 2
19210  fi
19211done
19212  done
19213IFS=$as_save_IFS
19214
19215  ;;
19216esac
19217fi
19218POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19219if test -n "$POTENTIAL_CC"; then
19220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19221$as_echo "$POTENTIAL_CC" >&6; }
19222else
19223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19224$as_echo "no" >&6; }
19225fi
19226
19227
19228  test -n "$POTENTIAL_CC" && break
19229done
19230
19231    CC=$POTENTIAL_CC
19232  fi
19233
19234  if test "x$CC" = x; then
19235
19236  # Print a helpful message on how to acquire the necessary build dependency.
19237  # devkit is the help tag: freetype, cups, pulse, alsa etc
19238  MISSING_DEPENDENCY=devkit
19239
19240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19241    cygwin_help $MISSING_DEPENDENCY
19242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19243    msys_help $MISSING_DEPENDENCY
19244  else
19245    PKGHANDLER_COMMAND=
19246
19247    case $PKGHANDLER in
19248      apt-get)
19249        apt_help     $MISSING_DEPENDENCY ;;
19250      yum)
19251        yum_help     $MISSING_DEPENDENCY ;;
19252      port)
19253        port_help    $MISSING_DEPENDENCY ;;
19254      pkgutil)
19255        pkgutil_help $MISSING_DEPENDENCY ;;
19256      pkgadd)
19257        pkgadd_help  $MISSING_DEPENDENCY ;;
19258      * )
19259        break ;;
19260    esac
19261
19262    if test "x$PKGHANDLER_COMMAND" != x; then
19263      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19264    fi
19265  fi
19266
19267    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19268  fi
19269
19270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19271
19272  # First separate the path from the arguments. This will split at the first
19273  # space.
19274  complete="$CC"
19275  path="${complete%% *}"
19276  tmp="$complete EOL"
19277  arguments="${tmp#* }"
19278
19279  # Input might be given as Windows format, start by converting to
19280  # unix format.
19281  new_path=`$CYGPATH -u "$path"`
19282
19283  # Now try to locate executable using which
19284  new_path=`$WHICH "$new_path" 2> /dev/null`
19285  # bat and cmd files are not always considered executable in cygwin causing which
19286  # to not find them
19287  if test "x$new_path" = x \
19288      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19289      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19290    new_path=`$CYGPATH -u "$path"`
19291  fi
19292  if test "x$new_path" = x; then
19293    # Oops. Which didn't find the executable.
19294    # The splitting of arguments from the executable at a space might have been incorrect,
19295    # since paths with space are more likely in Windows. Give it another try with the whole
19296    # argument.
19297    path="$complete"
19298    arguments="EOL"
19299    new_path=`$CYGPATH -u "$path"`
19300    new_path=`$WHICH "$new_path" 2> /dev/null`
19301    # bat and cmd files are not always considered executable in cygwin causing which
19302    # to not find them
19303    if test "x$new_path" = x \
19304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19306      new_path=`$CYGPATH -u "$path"`
19307    fi
19308    if test "x$new_path" = x; then
19309      # It's still not found. Now this is an unrecoverable error.
19310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19311$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19312      has_space=`$ECHO "$complete" | $GREP " "`
19313      if test "x$has_space" != x; then
19314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19316      fi
19317      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19318    fi
19319  fi
19320
19321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19324  # "foo.exe" is OK but "foo" is an error.
19325  #
19326  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19327  # It is also a way to make sure we got the proper file name for the real test later on.
19328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19329  if test "x$test_shortpath" = x; then
19330    # Short path failed, file does not exist as specified.
19331    # Try adding .exe or .cmd
19332    if test -f "${new_path}.exe"; then
19333      input_to_shortpath="${new_path}.exe"
19334    elif test -f "${new_path}.cmd"; then
19335      input_to_shortpath="${new_path}.cmd"
19336    else
19337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19338$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19339      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19341      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19342    fi
19343  else
19344    input_to_shortpath="$new_path"
19345  fi
19346
19347  # Call helper function which possibly converts this using DOS-style short mode.
19348  # If so, the updated path is stored in $new_path.
19349  new_path="$input_to_shortpath"
19350
19351  input_path="$input_to_shortpath"
19352  # Check if we need to convert this using DOS-style short mode. If the path
19353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19354  # take no chances and rewrite it.
19355  # Note: m4 eats our [], so we need to use [ and ] instead.
19356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19357  if test "x$has_forbidden_chars" != x; then
19358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19362      # Going to short mode and back again did indeed matter. Since short mode is
19363      # case insensitive, let's make it lowercase to improve readability.
19364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19365      # Now convert it back to Unix-stile (cygpath)
19366      input_path=`$CYGPATH -u "$shortmode_path"`
19367      new_path="$input_path"
19368    fi
19369  fi
19370
19371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19372  if test "x$test_cygdrive_prefix" = x; then
19373    # As a simple fix, exclude /usr/bin since it's not a real path.
19374    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19376      # a path prefixed by /cygdrive for fixpath to work.
19377      new_path="$CYGWIN_ROOT_PATH$input_path"
19378    fi
19379  fi
19380
19381  # remove trailing .exe if any
19382  new_path="${new_path/%.exe/}"
19383
19384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19385
19386  # First separate the path from the arguments. This will split at the first
19387  # space.
19388  complete="$CC"
19389  path="${complete%% *}"
19390  tmp="$complete EOL"
19391  arguments="${tmp#* }"
19392
19393  # Input might be given as Windows format, start by converting to
19394  # unix format.
19395  new_path="$path"
19396
19397  windows_path="$new_path"
19398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19399    unix_path=`$CYGPATH -u "$windows_path"`
19400    new_path="$unix_path"
19401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19403    new_path="$unix_path"
19404  fi
19405
19406
19407  # Now try to locate executable using which
19408  new_path=`$WHICH "$new_path" 2> /dev/null`
19409
19410  if test "x$new_path" = x; then
19411    # Oops. Which didn't find the executable.
19412    # The splitting of arguments from the executable at a space might have been incorrect,
19413    # since paths with space are more likely in Windows. Give it another try with the whole
19414    # argument.
19415    path="$complete"
19416    arguments="EOL"
19417    new_path="$path"
19418
19419  windows_path="$new_path"
19420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19421    unix_path=`$CYGPATH -u "$windows_path"`
19422    new_path="$unix_path"
19423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19425    new_path="$unix_path"
19426  fi
19427
19428
19429    new_path=`$WHICH "$new_path" 2> /dev/null`
19430
19431    if test "x$new_path" = x; then
19432      # It's still not found. Now this is an unrecoverable error.
19433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19434$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19435      has_space=`$ECHO "$complete" | $GREP " "`
19436      if test "x$has_space" != x; then
19437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19439      fi
19440      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19441    fi
19442  fi
19443
19444  # Now new_path has a complete unix path to the binary
19445  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19446    # Keep paths in /bin as-is, but remove trailing .exe if any
19447    new_path="${new_path/%.exe/}"
19448    # Do not save /bin paths to all_fixpath_prefixes!
19449  else
19450    # Not in mixed or Windows style, start by that.
19451    new_path=`cmd //c echo $new_path`
19452
19453  input_path="$new_path"
19454  # Check if we need to convert this using DOS-style short mode. If the path
19455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19456  # take no chances and rewrite it.
19457  # Note: m4 eats our [], so we need to use [ and ] instead.
19458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19459  if test "x$has_forbidden_chars" != x; then
19460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19462  fi
19463
19464    # Output is in $new_path
19465
19466  windows_path="$new_path"
19467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19468    unix_path=`$CYGPATH -u "$windows_path"`
19469    new_path="$unix_path"
19470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19472    new_path="$unix_path"
19473  fi
19474
19475    # remove trailing .exe if any
19476    new_path="${new_path/%.exe/}"
19477
19478    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19479    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19480  fi
19481
19482  else
19483    # We're on a posix platform. Hooray! :)
19484    # First separate the path from the arguments. This will split at the first
19485    # space.
19486    complete="$CC"
19487    path="${complete%% *}"
19488    tmp="$complete EOL"
19489    arguments="${tmp#* }"
19490
19491    # Cannot rely on the command "which" here since it doesn't always work.
19492    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19493    if test -z "$is_absolute_path"; then
19494      # Path to executable is not absolute. Find it.
19495      IFS_save="$IFS"
19496      IFS=:
19497      for p in $PATH; do
19498        if test -f "$p/$path" && test -x "$p/$path"; then
19499          new_path="$p/$path"
19500          break
19501        fi
19502      done
19503      IFS="$IFS_save"
19504    else
19505      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19506$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19507      new_path="$path"
19508    fi
19509
19510    if test "x$new_path" = x; then
19511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19512$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19513      has_space=`$ECHO "$complete" | $GREP " "`
19514      if test "x$has_space" != x; then
19515        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19517      fi
19518      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19519    fi
19520  fi
19521
19522  # Now join together the path and the arguments once again
19523  if test "x$arguments" != xEOL; then
19524    new_complete="$new_path ${arguments% *}"
19525  else
19526    new_complete="$new_path"
19527  fi
19528
19529  if test "x$complete" != "x$new_complete"; then
19530    CC="$new_complete"
19531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19532$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19533  fi
19534
19535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19536$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19537  TEST_COMPILER="$CC"
19538
19539  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19540    # Follow a chain of symbolic links. Use readlink
19541    # where it exists, else fall back to horribly
19542    # complicated shell code.
19543    if test "x$READLINK_TESTED" != yes; then
19544      # On MacOSX there is a readlink tool with a different
19545      # purpose than the GNU readlink tool. Check the found readlink.
19546      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19547      if test "x$ISGNU" = x; then
19548        # A readlink that we do not know how to use.
19549        # Are there other non-GNU readlinks out there?
19550        READLINK_TESTED=yes
19551        READLINK=
19552      fi
19553    fi
19554
19555    if test "x$READLINK" != x; then
19556      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19557    else
19558      # Save the current directory for restoring afterwards
19559      STARTDIR=$PWD
19560      COUNTER=0
19561      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19562      sym_link_file=`$BASENAME $TEST_COMPILER`
19563      cd $sym_link_dir
19564      # Use -P flag to resolve symlinks in directories.
19565      cd `$THEPWDCMD -P`
19566      sym_link_dir=`$THEPWDCMD -P`
19567      # Resolve file symlinks
19568      while test $COUNTER -lt 20; do
19569        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19570        if test "x$ISLINK" == x; then
19571          # This is not a symbolic link! We are done!
19572          break
19573        fi
19574        # Again resolve directory symlinks since the target of the just found
19575        # link could be in a different directory
19576        cd `$DIRNAME $ISLINK`
19577        sym_link_dir=`$THEPWDCMD -P`
19578        sym_link_file=`$BASENAME $ISLINK`
19579        let COUNTER=COUNTER+1
19580      done
19581      cd $STARTDIR
19582      TEST_COMPILER=$sym_link_dir/$sym_link_file
19583    fi
19584  fi
19585
19586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19587$as_echo "$TEST_COMPILER" >&6; }
19588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19589$as_echo_n "checking if CC is disguised ccache... " >&6; }
19590
19591  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19592  if test "x$COMPILER_BASENAME" = "xccache"; then
19593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19594$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19595    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19596    # We want to control ccache invocation ourselves, so ignore this cc and try
19597    # searching again.
19598
19599    # Remove the path to the fake ccache cc from the PATH
19600    RETRY_COMPILER_SAVED_PATH="$PATH"
19601    COMPILER_DIRNAME=`$DIRNAME $CC`
19602    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19603
19604    # Try again looking for our compiler
19605    if test -n "$ac_tool_prefix"; then
19606  for ac_prog in $COMPILER_CHECK_LIST
19607  do
19608    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19609set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19611$as_echo_n "checking for $ac_word... " >&6; }
19612if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19613  $as_echo_n "(cached) " >&6
19614else
19615  if test -n "$PROPER_COMPILER_CC"; then
19616  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19617else
19618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19619for as_dir in $PATH
19620do
19621  IFS=$as_save_IFS
19622  test -z "$as_dir" && as_dir=.
19623    for ac_exec_ext in '' $ac_executable_extensions; do
19624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19625    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19627    break 2
19628  fi
19629done
19630  done
19631IFS=$as_save_IFS
19632
19633fi
19634fi
19635PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19636if test -n "$PROPER_COMPILER_CC"; then
19637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19638$as_echo "$PROPER_COMPILER_CC" >&6; }
19639else
19640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19641$as_echo "no" >&6; }
19642fi
19643
19644
19645    test -n "$PROPER_COMPILER_CC" && break
19646  done
19647fi
19648if test -z "$PROPER_COMPILER_CC"; then
19649  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19650  for ac_prog in $COMPILER_CHECK_LIST
19651do
19652  # Extract the first word of "$ac_prog", so it can be a program name with args.
19653set dummy $ac_prog; ac_word=$2
19654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19655$as_echo_n "checking for $ac_word... " >&6; }
19656if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19657  $as_echo_n "(cached) " >&6
19658else
19659  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19660  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19661else
19662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19663for as_dir in $PATH
19664do
19665  IFS=$as_save_IFS
19666  test -z "$as_dir" && as_dir=.
19667    for ac_exec_ext in '' $ac_executable_extensions; do
19668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19669    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19671    break 2
19672  fi
19673done
19674  done
19675IFS=$as_save_IFS
19676
19677fi
19678fi
19679ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19680if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19682$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19683else
19684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19685$as_echo "no" >&6; }
19686fi
19687
19688
19689  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19690done
19691
19692  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19693    PROPER_COMPILER_CC=""
19694  else
19695    case $cross_compiling:$ac_tool_warned in
19696yes:)
19697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19699ac_tool_warned=yes ;;
19700esac
19701    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19702  fi
19703fi
19704
19705
19706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19707
19708  # First separate the path from the arguments. This will split at the first
19709  # space.
19710  complete="$PROPER_COMPILER_CC"
19711  path="${complete%% *}"
19712  tmp="$complete EOL"
19713  arguments="${tmp#* }"
19714
19715  # Input might be given as Windows format, start by converting to
19716  # unix format.
19717  new_path=`$CYGPATH -u "$path"`
19718
19719  # Now try to locate executable using which
19720  new_path=`$WHICH "$new_path" 2> /dev/null`
19721  # bat and cmd files are not always considered executable in cygwin causing which
19722  # to not find them
19723  if test "x$new_path" = x \
19724      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19725      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19726    new_path=`$CYGPATH -u "$path"`
19727  fi
19728  if test "x$new_path" = x; then
19729    # Oops. Which didn't find the executable.
19730    # The splitting of arguments from the executable at a space might have been incorrect,
19731    # since paths with space are more likely in Windows. Give it another try with the whole
19732    # argument.
19733    path="$complete"
19734    arguments="EOL"
19735    new_path=`$CYGPATH -u "$path"`
19736    new_path=`$WHICH "$new_path" 2> /dev/null`
19737    # bat and cmd files are not always considered executable in cygwin causing which
19738    # to not find them
19739    if test "x$new_path" = x \
19740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19742      new_path=`$CYGPATH -u "$path"`
19743    fi
19744    if test "x$new_path" = x; then
19745      # It's still not found. Now this is an unrecoverable error.
19746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19747$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19748      has_space=`$ECHO "$complete" | $GREP " "`
19749      if test "x$has_space" != x; then
19750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19752      fi
19753      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19754    fi
19755  fi
19756
19757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19760  # "foo.exe" is OK but "foo" is an error.
19761  #
19762  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19763  # It is also a way to make sure we got the proper file name for the real test later on.
19764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19765  if test "x$test_shortpath" = x; then
19766    # Short path failed, file does not exist as specified.
19767    # Try adding .exe or .cmd
19768    if test -f "${new_path}.exe"; then
19769      input_to_shortpath="${new_path}.exe"
19770    elif test -f "${new_path}.cmd"; then
19771      input_to_shortpath="${new_path}.cmd"
19772    else
19773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19774$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19777      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19778    fi
19779  else
19780    input_to_shortpath="$new_path"
19781  fi
19782
19783  # Call helper function which possibly converts this using DOS-style short mode.
19784  # If so, the updated path is stored in $new_path.
19785  new_path="$input_to_shortpath"
19786
19787  input_path="$input_to_shortpath"
19788  # Check if we need to convert this using DOS-style short mode. If the path
19789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19790  # take no chances and rewrite it.
19791  # Note: m4 eats our [], so we need to use [ and ] instead.
19792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19793  if test "x$has_forbidden_chars" != x; then
19794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19798      # Going to short mode and back again did indeed matter. Since short mode is
19799      # case insensitive, let's make it lowercase to improve readability.
19800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19801      # Now convert it back to Unix-stile (cygpath)
19802      input_path=`$CYGPATH -u "$shortmode_path"`
19803      new_path="$input_path"
19804    fi
19805  fi
19806
19807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19808  if test "x$test_cygdrive_prefix" = x; then
19809    # As a simple fix, exclude /usr/bin since it's not a real path.
19810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19812      # a path prefixed by /cygdrive for fixpath to work.
19813      new_path="$CYGWIN_ROOT_PATH$input_path"
19814    fi
19815  fi
19816
19817  # remove trailing .exe if any
19818  new_path="${new_path/%.exe/}"
19819
19820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19821
19822  # First separate the path from the arguments. This will split at the first
19823  # space.
19824  complete="$PROPER_COMPILER_CC"
19825  path="${complete%% *}"
19826  tmp="$complete EOL"
19827  arguments="${tmp#* }"
19828
19829  # Input might be given as Windows format, start by converting to
19830  # unix format.
19831  new_path="$path"
19832
19833  windows_path="$new_path"
19834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19835    unix_path=`$CYGPATH -u "$windows_path"`
19836    new_path="$unix_path"
19837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19839    new_path="$unix_path"
19840  fi
19841
19842
19843  # Now try to locate executable using which
19844  new_path=`$WHICH "$new_path" 2> /dev/null`
19845
19846  if test "x$new_path" = x; then
19847    # Oops. Which didn't find the executable.
19848    # The splitting of arguments from the executable at a space might have been incorrect,
19849    # since paths with space are more likely in Windows. Give it another try with the whole
19850    # argument.
19851    path="$complete"
19852    arguments="EOL"
19853    new_path="$path"
19854
19855  windows_path="$new_path"
19856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19857    unix_path=`$CYGPATH -u "$windows_path"`
19858    new_path="$unix_path"
19859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19861    new_path="$unix_path"
19862  fi
19863
19864
19865    new_path=`$WHICH "$new_path" 2> /dev/null`
19866
19867    if test "x$new_path" = x; then
19868      # It's still not found. Now this is an unrecoverable error.
19869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19870$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19871      has_space=`$ECHO "$complete" | $GREP " "`
19872      if test "x$has_space" != x; then
19873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19875      fi
19876      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19877    fi
19878  fi
19879
19880  # Now new_path has a complete unix path to the binary
19881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19882    # Keep paths in /bin as-is, but remove trailing .exe if any
19883    new_path="${new_path/%.exe/}"
19884    # Do not save /bin paths to all_fixpath_prefixes!
19885  else
19886    # Not in mixed or Windows style, start by that.
19887    new_path=`cmd //c echo $new_path`
19888
19889  input_path="$new_path"
19890  # Check if we need to convert this using DOS-style short mode. If the path
19891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19892  # take no chances and rewrite it.
19893  # Note: m4 eats our [], so we need to use [ and ] instead.
19894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19895  if test "x$has_forbidden_chars" != x; then
19896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19898  fi
19899
19900    # Output is in $new_path
19901
19902  windows_path="$new_path"
19903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19904    unix_path=`$CYGPATH -u "$windows_path"`
19905    new_path="$unix_path"
19906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19908    new_path="$unix_path"
19909  fi
19910
19911    # remove trailing .exe if any
19912    new_path="${new_path/%.exe/}"
19913
19914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19916  fi
19917
19918  else
19919    # We're on a posix platform. Hooray! :)
19920    # First separate the path from the arguments. This will split at the first
19921    # space.
19922    complete="$PROPER_COMPILER_CC"
19923    path="${complete%% *}"
19924    tmp="$complete EOL"
19925    arguments="${tmp#* }"
19926
19927    # Cannot rely on the command "which" here since it doesn't always work.
19928    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19929    if test -z "$is_absolute_path"; then
19930      # Path to executable is not absolute. Find it.
19931      IFS_save="$IFS"
19932      IFS=:
19933      for p in $PATH; do
19934        if test -f "$p/$path" && test -x "$p/$path"; then
19935          new_path="$p/$path"
19936          break
19937        fi
19938      done
19939      IFS="$IFS_save"
19940    else
19941      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19942$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19943      new_path="$path"
19944    fi
19945
19946    if test "x$new_path" = x; then
19947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19948$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19949      has_space=`$ECHO "$complete" | $GREP " "`
19950      if test "x$has_space" != x; then
19951        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19952$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19953      fi
19954      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19955    fi
19956  fi
19957
19958  # Now join together the path and the arguments once again
19959  if test "x$arguments" != xEOL; then
19960    new_complete="$new_path ${arguments% *}"
19961  else
19962    new_complete="$new_path"
19963  fi
19964
19965  if test "x$complete" != "x$new_complete"; then
19966    PROPER_COMPILER_CC="$new_complete"
19967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19968$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19969  fi
19970
19971    PATH="$RETRY_COMPILER_SAVED_PATH"
19972
19973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19974$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19975
19976  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19977    # Follow a chain of symbolic links. Use readlink
19978    # where it exists, else fall back to horribly
19979    # complicated shell code.
19980    if test "x$READLINK_TESTED" != yes; then
19981      # On MacOSX there is a readlink tool with a different
19982      # purpose than the GNU readlink tool. Check the found readlink.
19983      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19984      if test "x$ISGNU" = x; then
19985        # A readlink that we do not know how to use.
19986        # Are there other non-GNU readlinks out there?
19987        READLINK_TESTED=yes
19988        READLINK=
19989      fi
19990    fi
19991
19992    if test "x$READLINK" != x; then
19993      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19994    else
19995      # Save the current directory for restoring afterwards
19996      STARTDIR=$PWD
19997      COUNTER=0
19998      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19999      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20000      cd $sym_link_dir
20001      # Use -P flag to resolve symlinks in directories.
20002      cd `$THEPWDCMD -P`
20003      sym_link_dir=`$THEPWDCMD -P`
20004      # Resolve file symlinks
20005      while test $COUNTER -lt 20; do
20006        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20007        if test "x$ISLINK" == x; then
20008          # This is not a symbolic link! We are done!
20009          break
20010        fi
20011        # Again resolve directory symlinks since the target of the just found
20012        # link could be in a different directory
20013        cd `$DIRNAME $ISLINK`
20014        sym_link_dir=`$THEPWDCMD -P`
20015        sym_link_file=`$BASENAME $ISLINK`
20016        let COUNTER=COUNTER+1
20017      done
20018      cd $STARTDIR
20019      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20020    fi
20021  fi
20022
20023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20024$as_echo "$PROPER_COMPILER_CC" >&6; }
20025    CC="$PROPER_COMPILER_CC"
20026  else
20027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20028$as_echo "no, keeping CC" >&6; }
20029    CC="$TEST_COMPILER"
20030  fi
20031
20032  COMPILER=$CC
20033  COMPILER_NAME=$COMPILER_NAME
20034
20035  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20036    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20037    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20038    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20039    if test $? -ne 0; then
20040      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20041
20042      { $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
20043$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20044      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20045$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20046      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20047    else
20048      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20049      COMPILER_VENDOR="Sun Studio"
20050    fi
20051  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20052    # First line typically looks something like:
20053    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20054    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20055    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20056    COMPILER_VENDOR="Microsoft CL.EXE"
20057    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20058    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20059      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20060        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20061      fi
20062    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20063      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20064        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20065      fi
20066    fi
20067  else
20068    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20069    # Check that this is likely to be GCC.
20070    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20071    if test $? -ne 0; then
20072      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20073$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20074      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20075$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20076      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20077    fi
20078
20079    # First line typically looks something like:
20080    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20081    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20082    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20083  fi
20084  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20085  CC_VERSION="$COMPILER_VERSION"
20086  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20087  CC_VENDOR="$COMPILER_VENDOR"
20088
20089  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20090$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20091
20092
20093  # Now that we have resolved CC ourself, let autoconf have its go at it
20094  ac_ext=c
20095ac_cpp='$CPP $CPPFLAGS'
20096ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20097ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20098ac_compiler_gnu=$ac_cv_c_compiler_gnu
20099if test -n "$ac_tool_prefix"; then
20100  for ac_prog in $CC
20101  do
20102    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20103set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20105$as_echo_n "checking for $ac_word... " >&6; }
20106if ${ac_cv_prog_CC+:} false; then :
20107  $as_echo_n "(cached) " >&6
20108else
20109  if test -n "$CC"; then
20110  ac_cv_prog_CC="$CC" # Let the user override the test.
20111else
20112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20113for as_dir in $PATH
20114do
20115  IFS=$as_save_IFS
20116  test -z "$as_dir" && as_dir=.
20117    for ac_exec_ext in '' $ac_executable_extensions; do
20118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20119    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20121    break 2
20122  fi
20123done
20124  done
20125IFS=$as_save_IFS
20126
20127fi
20128fi
20129CC=$ac_cv_prog_CC
20130if test -n "$CC"; then
20131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20132$as_echo "$CC" >&6; }
20133else
20134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20135$as_echo "no" >&6; }
20136fi
20137
20138
20139    test -n "$CC" && break
20140  done
20141fi
20142if test -z "$CC"; then
20143  ac_ct_CC=$CC
20144  for ac_prog in $CC
20145do
20146  # Extract the first word of "$ac_prog", so it can be a program name with args.
20147set dummy $ac_prog; ac_word=$2
20148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20149$as_echo_n "checking for $ac_word... " >&6; }
20150if ${ac_cv_prog_ac_ct_CC+:} false; then :
20151  $as_echo_n "(cached) " >&6
20152else
20153  if test -n "$ac_ct_CC"; then
20154  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20155else
20156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20157for as_dir in $PATH
20158do
20159  IFS=$as_save_IFS
20160  test -z "$as_dir" && as_dir=.
20161    for ac_exec_ext in '' $ac_executable_extensions; do
20162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20163    ac_cv_prog_ac_ct_CC="$ac_prog"
20164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20165    break 2
20166  fi
20167done
20168  done
20169IFS=$as_save_IFS
20170
20171fi
20172fi
20173ac_ct_CC=$ac_cv_prog_ac_ct_CC
20174if test -n "$ac_ct_CC"; then
20175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20176$as_echo "$ac_ct_CC" >&6; }
20177else
20178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20179$as_echo "no" >&6; }
20180fi
20181
20182
20183  test -n "$ac_ct_CC" && break
20184done
20185
20186  if test "x$ac_ct_CC" = x; then
20187    CC=""
20188  else
20189    case $cross_compiling:$ac_tool_warned in
20190yes:)
20191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20193ac_tool_warned=yes ;;
20194esac
20195    CC=$ac_ct_CC
20196  fi
20197fi
20198
20199
20200test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20202as_fn_error $? "no acceptable C compiler found in \$PATH
20203See \`config.log' for more details" "$LINENO" 5; }
20204
20205# Provide some information about the compiler.
20206$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20207set X $ac_compile
20208ac_compiler=$2
20209for ac_option in --version -v -V -qversion; do
20210  { { ac_try="$ac_compiler $ac_option >&5"
20211case "(($ac_try" in
20212  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20213  *) ac_try_echo=$ac_try;;
20214esac
20215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20216$as_echo "$ac_try_echo"; } >&5
20217  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20218  ac_status=$?
20219  if test -s conftest.err; then
20220    sed '10a\
20221... rest of stderr output deleted ...
20222         10q' conftest.err >conftest.er1
20223    cat conftest.er1 >&5
20224  fi
20225  rm -f conftest.er1 conftest.err
20226  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20227  test $ac_status = 0; }
20228done
20229
20230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20231/* end confdefs.h.  */
20232
20233int
20234main ()
20235{
20236
20237  ;
20238  return 0;
20239}
20240_ACEOF
20241ac_clean_files_save=$ac_clean_files
20242ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20243# Try to create an executable without -o first, disregard a.out.
20244# It will help us diagnose broken compilers, and finding out an intuition
20245# of exeext.
20246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20247$as_echo_n "checking whether the C compiler works... " >&6; }
20248ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20249
20250# The possible output files:
20251ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20252
20253ac_rmfiles=
20254for ac_file in $ac_files
20255do
20256  case $ac_file in
20257    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20258    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20259  esac
20260done
20261rm -f $ac_rmfiles
20262
20263if { { ac_try="$ac_link_default"
20264case "(($ac_try" in
20265  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20266  *) ac_try_echo=$ac_try;;
20267esac
20268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20269$as_echo "$ac_try_echo"; } >&5
20270  (eval "$ac_link_default") 2>&5
20271  ac_status=$?
20272  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20273  test $ac_status = 0; }; then :
20274  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20275# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20276# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20277# so that the user can short-circuit this test for compilers unknown to
20278# Autoconf.
20279for ac_file in $ac_files ''
20280do
20281  test -f "$ac_file" || continue
20282  case $ac_file in
20283    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20284	;;
20285    [ab].out )
20286	# We found the default executable, but exeext='' is most
20287	# certainly right.
20288	break;;
20289    *.* )
20290	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20291	then :; else
20292	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20293	fi
20294	# We set ac_cv_exeext here because the later test for it is not
20295	# safe: cross compilers may not add the suffix if given an `-o'
20296	# argument, so we may need to know it at that point already.
20297	# Even if this section looks crufty: it has the advantage of
20298	# actually working.
20299	break;;
20300    * )
20301	break;;
20302  esac
20303done
20304test "$ac_cv_exeext" = no && ac_cv_exeext=
20305
20306else
20307  ac_file=''
20308fi
20309if test -z "$ac_file"; then :
20310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20311$as_echo "no" >&6; }
20312$as_echo "$as_me: failed program was:" >&5
20313sed 's/^/| /' conftest.$ac_ext >&5
20314
20315{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20316$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20317as_fn_error 77 "C compiler cannot create executables
20318See \`config.log' for more details" "$LINENO" 5; }
20319else
20320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20321$as_echo "yes" >&6; }
20322fi
20323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20324$as_echo_n "checking for C compiler default output file name... " >&6; }
20325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20326$as_echo "$ac_file" >&6; }
20327ac_exeext=$ac_cv_exeext
20328
20329rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20330ac_clean_files=$ac_clean_files_save
20331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20332$as_echo_n "checking for suffix of executables... " >&6; }
20333if { { ac_try="$ac_link"
20334case "(($ac_try" in
20335  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20336  *) ac_try_echo=$ac_try;;
20337esac
20338eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20339$as_echo "$ac_try_echo"; } >&5
20340  (eval "$ac_link") 2>&5
20341  ac_status=$?
20342  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20343  test $ac_status = 0; }; then :
20344  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20345# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20346# work properly (i.e., refer to `conftest.exe'), while it won't with
20347# `rm'.
20348for ac_file in conftest.exe conftest conftest.*; do
20349  test -f "$ac_file" || continue
20350  case $ac_file in
20351    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20352    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20353	  break;;
20354    * ) break;;
20355  esac
20356done
20357else
20358  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20360as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20361See \`config.log' for more details" "$LINENO" 5; }
20362fi
20363rm -f conftest conftest$ac_cv_exeext
20364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20365$as_echo "$ac_cv_exeext" >&6; }
20366
20367rm -f conftest.$ac_ext
20368EXEEXT=$ac_cv_exeext
20369ac_exeext=$EXEEXT
20370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20371/* end confdefs.h.  */
20372#include <stdio.h>
20373int
20374main ()
20375{
20376FILE *f = fopen ("conftest.out", "w");
20377 return ferror (f) || fclose (f) != 0;
20378
20379  ;
20380  return 0;
20381}
20382_ACEOF
20383ac_clean_files="$ac_clean_files conftest.out"
20384# Check that the compiler produces executables we can run.  If not, either
20385# the compiler is broken, or we cross compile.
20386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20387$as_echo_n "checking whether we are cross compiling... " >&6; }
20388if test "$cross_compiling" != yes; then
20389  { { ac_try="$ac_link"
20390case "(($ac_try" in
20391  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20392  *) ac_try_echo=$ac_try;;
20393esac
20394eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20395$as_echo "$ac_try_echo"; } >&5
20396  (eval "$ac_link") 2>&5
20397  ac_status=$?
20398  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20399  test $ac_status = 0; }
20400  if { ac_try='./conftest$ac_cv_exeext'
20401  { { case "(($ac_try" in
20402  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20403  *) ac_try_echo=$ac_try;;
20404esac
20405eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20406$as_echo "$ac_try_echo"; } >&5
20407  (eval "$ac_try") 2>&5
20408  ac_status=$?
20409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20410  test $ac_status = 0; }; }; then
20411    cross_compiling=no
20412  else
20413    if test "$cross_compiling" = maybe; then
20414	cross_compiling=yes
20415    else
20416	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20418as_fn_error $? "cannot run C compiled programs.
20419If you meant to cross compile, use \`--host'.
20420See \`config.log' for more details" "$LINENO" 5; }
20421    fi
20422  fi
20423fi
20424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20425$as_echo "$cross_compiling" >&6; }
20426
20427rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20428ac_clean_files=$ac_clean_files_save
20429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20430$as_echo_n "checking for suffix of object files... " >&6; }
20431if ${ac_cv_objext+:} false; then :
20432  $as_echo_n "(cached) " >&6
20433else
20434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20435/* end confdefs.h.  */
20436
20437int
20438main ()
20439{
20440
20441  ;
20442  return 0;
20443}
20444_ACEOF
20445rm -f conftest.o conftest.obj
20446if { { ac_try="$ac_compile"
20447case "(($ac_try" in
20448  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20449  *) ac_try_echo=$ac_try;;
20450esac
20451eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20452$as_echo "$ac_try_echo"; } >&5
20453  (eval "$ac_compile") 2>&5
20454  ac_status=$?
20455  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20456  test $ac_status = 0; }; then :
20457  for ac_file in conftest.o conftest.obj conftest.*; do
20458  test -f "$ac_file" || continue;
20459  case $ac_file in
20460    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20461    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20462       break;;
20463  esac
20464done
20465else
20466  $as_echo "$as_me: failed program was:" >&5
20467sed 's/^/| /' conftest.$ac_ext >&5
20468
20469{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20471as_fn_error $? "cannot compute suffix of object files: cannot compile
20472See \`config.log' for more details" "$LINENO" 5; }
20473fi
20474rm -f conftest.$ac_cv_objext conftest.$ac_ext
20475fi
20476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20477$as_echo "$ac_cv_objext" >&6; }
20478OBJEXT=$ac_cv_objext
20479ac_objext=$OBJEXT
20480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20481$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20482if ${ac_cv_c_compiler_gnu+:} false; then :
20483  $as_echo_n "(cached) " >&6
20484else
20485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20486/* end confdefs.h.  */
20487
20488int
20489main ()
20490{
20491#ifndef __GNUC__
20492       choke me
20493#endif
20494
20495  ;
20496  return 0;
20497}
20498_ACEOF
20499if ac_fn_c_try_compile "$LINENO"; then :
20500  ac_compiler_gnu=yes
20501else
20502  ac_compiler_gnu=no
20503fi
20504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20505ac_cv_c_compiler_gnu=$ac_compiler_gnu
20506
20507fi
20508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20509$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20510if test $ac_compiler_gnu = yes; then
20511  GCC=yes
20512else
20513  GCC=
20514fi
20515ac_test_CFLAGS=${CFLAGS+set}
20516ac_save_CFLAGS=$CFLAGS
20517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20518$as_echo_n "checking whether $CC accepts -g... " >&6; }
20519if ${ac_cv_prog_cc_g+:} false; then :
20520  $as_echo_n "(cached) " >&6
20521else
20522  ac_save_c_werror_flag=$ac_c_werror_flag
20523   ac_c_werror_flag=yes
20524   ac_cv_prog_cc_g=no
20525   CFLAGS="-g"
20526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20527/* end confdefs.h.  */
20528
20529int
20530main ()
20531{
20532
20533  ;
20534  return 0;
20535}
20536_ACEOF
20537if ac_fn_c_try_compile "$LINENO"; then :
20538  ac_cv_prog_cc_g=yes
20539else
20540  CFLAGS=""
20541      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20542/* end confdefs.h.  */
20543
20544int
20545main ()
20546{
20547
20548  ;
20549  return 0;
20550}
20551_ACEOF
20552if ac_fn_c_try_compile "$LINENO"; then :
20553
20554else
20555  ac_c_werror_flag=$ac_save_c_werror_flag
20556	 CFLAGS="-g"
20557	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20558/* end confdefs.h.  */
20559
20560int
20561main ()
20562{
20563
20564  ;
20565  return 0;
20566}
20567_ACEOF
20568if ac_fn_c_try_compile "$LINENO"; then :
20569  ac_cv_prog_cc_g=yes
20570fi
20571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20572fi
20573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20574fi
20575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20576   ac_c_werror_flag=$ac_save_c_werror_flag
20577fi
20578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20579$as_echo "$ac_cv_prog_cc_g" >&6; }
20580if test "$ac_test_CFLAGS" = set; then
20581  CFLAGS=$ac_save_CFLAGS
20582elif test $ac_cv_prog_cc_g = yes; then
20583  if test "$GCC" = yes; then
20584    CFLAGS="-g -O2"
20585  else
20586    CFLAGS="-g"
20587  fi
20588else
20589  if test "$GCC" = yes; then
20590    CFLAGS="-O2"
20591  else
20592    CFLAGS=
20593  fi
20594fi
20595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20596$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20597if ${ac_cv_prog_cc_c89+:} false; then :
20598  $as_echo_n "(cached) " >&6
20599else
20600  ac_cv_prog_cc_c89=no
20601ac_save_CC=$CC
20602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20603/* end confdefs.h.  */
20604#include <stdarg.h>
20605#include <stdio.h>
20606struct stat;
20607/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20608struct buf { int x; };
20609FILE * (*rcsopen) (struct buf *, struct stat *, int);
20610static char *e (p, i)
20611     char **p;
20612     int i;
20613{
20614  return p[i];
20615}
20616static char *f (char * (*g) (char **, int), char **p, ...)
20617{
20618  char *s;
20619  va_list v;
20620  va_start (v,p);
20621  s = g (p, va_arg (v,int));
20622  va_end (v);
20623  return s;
20624}
20625
20626/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20627   function prototypes and stuff, but not '\xHH' hex character constants.
20628   These don't provoke an error unfortunately, instead are silently treated
20629   as 'x'.  The following induces an error, until -std is added to get
20630   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20631   array size at least.  It's necessary to write '\x00'==0 to get something
20632   that's true only with -std.  */
20633int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20634
20635/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20636   inside strings and character constants.  */
20637#define FOO(x) 'x'
20638int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20639
20640int test (int i, double x);
20641struct s1 {int (*f) (int a);};
20642struct s2 {int (*f) (double a);};
20643int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20644int argc;
20645char **argv;
20646int
20647main ()
20648{
20649return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20650  ;
20651  return 0;
20652}
20653_ACEOF
20654for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20655	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20656do
20657  CC="$ac_save_CC $ac_arg"
20658  if ac_fn_c_try_compile "$LINENO"; then :
20659  ac_cv_prog_cc_c89=$ac_arg
20660fi
20661rm -f core conftest.err conftest.$ac_objext
20662  test "x$ac_cv_prog_cc_c89" != "xno" && break
20663done
20664rm -f conftest.$ac_ext
20665CC=$ac_save_CC
20666
20667fi
20668# AC_CACHE_VAL
20669case "x$ac_cv_prog_cc_c89" in
20670  x)
20671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20672$as_echo "none needed" >&6; } ;;
20673  xno)
20674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20675$as_echo "unsupported" >&6; } ;;
20676  *)
20677    CC="$CC $ac_cv_prog_cc_c89"
20678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20679$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20680esac
20681if test "x$ac_cv_prog_cc_c89" != xno; then :
20682
20683fi
20684
20685ac_ext=cpp
20686ac_cpp='$CXXCPP $CPPFLAGS'
20687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20690
20691
20692  ### Locate C++ compiler (CXX)
20693
20694  if test "x$CXX" != x; then
20695    COMPILER_CHECK_LIST="$CXX"
20696  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20697    COMPILER_CHECK_LIST="cl"
20698  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20699    COMPILER_CHECK_LIST="CC g++"
20700  else
20701    COMPILER_CHECK_LIST="g++ CC"
20702  fi
20703
20704
20705  COMPILER_NAME=C++
20706
20707  CXX=
20708  # If TOOLS_DIR is set, check for all compiler names in there first
20709  # before checking the rest of the PATH.
20710  if test -n "$TOOLS_DIR"; then
20711    PATH_save="$PATH"
20712    PATH="$TOOLS_DIR"
20713    for ac_prog in $COMPILER_CHECK_LIST
20714do
20715  # Extract the first word of "$ac_prog", so it can be a program name with args.
20716set dummy $ac_prog; ac_word=$2
20717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20718$as_echo_n "checking for $ac_word... " >&6; }
20719if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20720  $as_echo_n "(cached) " >&6
20721else
20722  case $TOOLS_DIR_CXX in
20723  [\\/]* | ?:[\\/]*)
20724  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20725  ;;
20726  *)
20727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20728for as_dir in $PATH
20729do
20730  IFS=$as_save_IFS
20731  test -z "$as_dir" && as_dir=.
20732    for ac_exec_ext in '' $ac_executable_extensions; do
20733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20734    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20736    break 2
20737  fi
20738done
20739  done
20740IFS=$as_save_IFS
20741
20742  ;;
20743esac
20744fi
20745TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20746if test -n "$TOOLS_DIR_CXX"; then
20747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20748$as_echo "$TOOLS_DIR_CXX" >&6; }
20749else
20750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20751$as_echo "no" >&6; }
20752fi
20753
20754
20755  test -n "$TOOLS_DIR_CXX" && break
20756done
20757
20758    CXX=$TOOLS_DIR_CXX
20759    PATH="$PATH_save"
20760  fi
20761
20762  # AC_PATH_PROGS can't be run multiple times with the same variable,
20763  # so create a new name for this run.
20764  if test "x$CXX" = x; then
20765    for ac_prog in $COMPILER_CHECK_LIST
20766do
20767  # Extract the first word of "$ac_prog", so it can be a program name with args.
20768set dummy $ac_prog; ac_word=$2
20769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20770$as_echo_n "checking for $ac_word... " >&6; }
20771if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20772  $as_echo_n "(cached) " >&6
20773else
20774  case $POTENTIAL_CXX in
20775  [\\/]* | ?:[\\/]*)
20776  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20777  ;;
20778  *)
20779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20780for as_dir in $PATH
20781do
20782  IFS=$as_save_IFS
20783  test -z "$as_dir" && as_dir=.
20784    for ac_exec_ext in '' $ac_executable_extensions; do
20785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20786    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20788    break 2
20789  fi
20790done
20791  done
20792IFS=$as_save_IFS
20793
20794  ;;
20795esac
20796fi
20797POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20798if test -n "$POTENTIAL_CXX"; then
20799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20800$as_echo "$POTENTIAL_CXX" >&6; }
20801else
20802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20803$as_echo "no" >&6; }
20804fi
20805
20806
20807  test -n "$POTENTIAL_CXX" && break
20808done
20809
20810    CXX=$POTENTIAL_CXX
20811  fi
20812
20813  if test "x$CXX" = x; then
20814
20815  # Print a helpful message on how to acquire the necessary build dependency.
20816  # devkit is the help tag: freetype, cups, pulse, alsa etc
20817  MISSING_DEPENDENCY=devkit
20818
20819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20820    cygwin_help $MISSING_DEPENDENCY
20821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20822    msys_help $MISSING_DEPENDENCY
20823  else
20824    PKGHANDLER_COMMAND=
20825
20826    case $PKGHANDLER in
20827      apt-get)
20828        apt_help     $MISSING_DEPENDENCY ;;
20829      yum)
20830        yum_help     $MISSING_DEPENDENCY ;;
20831      port)
20832        port_help    $MISSING_DEPENDENCY ;;
20833      pkgutil)
20834        pkgutil_help $MISSING_DEPENDENCY ;;
20835      pkgadd)
20836        pkgadd_help  $MISSING_DEPENDENCY ;;
20837      * )
20838        break ;;
20839    esac
20840
20841    if test "x$PKGHANDLER_COMMAND" != x; then
20842      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20843    fi
20844  fi
20845
20846    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20847  fi
20848
20849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20850
20851  # First separate the path from the arguments. This will split at the first
20852  # space.
20853  complete="$CXX"
20854  path="${complete%% *}"
20855  tmp="$complete EOL"
20856  arguments="${tmp#* }"
20857
20858  # Input might be given as Windows format, start by converting to
20859  # unix format.
20860  new_path=`$CYGPATH -u "$path"`
20861
20862  # Now try to locate executable using which
20863  new_path=`$WHICH "$new_path" 2> /dev/null`
20864  # bat and cmd files are not always considered executable in cygwin causing which
20865  # to not find them
20866  if test "x$new_path" = x \
20867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20869    new_path=`$CYGPATH -u "$path"`
20870  fi
20871  if test "x$new_path" = x; then
20872    # Oops. Which didn't find the executable.
20873    # The splitting of arguments from the executable at a space might have been incorrect,
20874    # since paths with space are more likely in Windows. Give it another try with the whole
20875    # argument.
20876    path="$complete"
20877    arguments="EOL"
20878    new_path=`$CYGPATH -u "$path"`
20879    new_path=`$WHICH "$new_path" 2> /dev/null`
20880    # bat and cmd files are not always considered executable in cygwin causing which
20881    # to not find them
20882    if test "x$new_path" = x \
20883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20885      new_path=`$CYGPATH -u "$path"`
20886    fi
20887    if test "x$new_path" = x; then
20888      # It's still not found. Now this is an unrecoverable error.
20889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20890$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20891      has_space=`$ECHO "$complete" | $GREP " "`
20892      if test "x$has_space" != x; then
20893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20895      fi
20896      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20897    fi
20898  fi
20899
20900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20903  # "foo.exe" is OK but "foo" is an error.
20904  #
20905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20906  # It is also a way to make sure we got the proper file name for the real test later on.
20907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20908  if test "x$test_shortpath" = x; then
20909    # Short path failed, file does not exist as specified.
20910    # Try adding .exe or .cmd
20911    if test -f "${new_path}.exe"; then
20912      input_to_shortpath="${new_path}.exe"
20913    elif test -f "${new_path}.cmd"; then
20914      input_to_shortpath="${new_path}.cmd"
20915    else
20916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20917$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20920      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20921    fi
20922  else
20923    input_to_shortpath="$new_path"
20924  fi
20925
20926  # Call helper function which possibly converts this using DOS-style short mode.
20927  # If so, the updated path is stored in $new_path.
20928  new_path="$input_to_shortpath"
20929
20930  input_path="$input_to_shortpath"
20931  # Check if we need to convert this using DOS-style short mode. If the path
20932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20933  # take no chances and rewrite it.
20934  # Note: m4 eats our [], so we need to use [ and ] instead.
20935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20936  if test "x$has_forbidden_chars" != x; then
20937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20941      # Going to short mode and back again did indeed matter. Since short mode is
20942      # case insensitive, let's make it lowercase to improve readability.
20943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20944      # Now convert it back to Unix-stile (cygpath)
20945      input_path=`$CYGPATH -u "$shortmode_path"`
20946      new_path="$input_path"
20947    fi
20948  fi
20949
20950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20951  if test "x$test_cygdrive_prefix" = x; then
20952    # As a simple fix, exclude /usr/bin since it's not a real path.
20953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20955      # a path prefixed by /cygdrive for fixpath to work.
20956      new_path="$CYGWIN_ROOT_PATH$input_path"
20957    fi
20958  fi
20959
20960  # remove trailing .exe if any
20961  new_path="${new_path/%.exe/}"
20962
20963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20964
20965  # First separate the path from the arguments. This will split at the first
20966  # space.
20967  complete="$CXX"
20968  path="${complete%% *}"
20969  tmp="$complete EOL"
20970  arguments="${tmp#* }"
20971
20972  # Input might be given as Windows format, start by converting to
20973  # unix format.
20974  new_path="$path"
20975
20976  windows_path="$new_path"
20977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20978    unix_path=`$CYGPATH -u "$windows_path"`
20979    new_path="$unix_path"
20980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20982    new_path="$unix_path"
20983  fi
20984
20985
20986  # Now try to locate executable using which
20987  new_path=`$WHICH "$new_path" 2> /dev/null`
20988
20989  if test "x$new_path" = x; then
20990    # Oops. Which didn't find the executable.
20991    # The splitting of arguments from the executable at a space might have been incorrect,
20992    # since paths with space are more likely in Windows. Give it another try with the whole
20993    # argument.
20994    path="$complete"
20995    arguments="EOL"
20996    new_path="$path"
20997
20998  windows_path="$new_path"
20999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21000    unix_path=`$CYGPATH -u "$windows_path"`
21001    new_path="$unix_path"
21002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21004    new_path="$unix_path"
21005  fi
21006
21007
21008    new_path=`$WHICH "$new_path" 2> /dev/null`
21009
21010    if test "x$new_path" = x; then
21011      # It's still not found. Now this is an unrecoverable error.
21012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21013$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21014      has_space=`$ECHO "$complete" | $GREP " "`
21015      if test "x$has_space" != x; then
21016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21018      fi
21019      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21020    fi
21021  fi
21022
21023  # Now new_path has a complete unix path to the binary
21024  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21025    # Keep paths in /bin as-is, but remove trailing .exe if any
21026    new_path="${new_path/%.exe/}"
21027    # Do not save /bin paths to all_fixpath_prefixes!
21028  else
21029    # Not in mixed or Windows style, start by that.
21030    new_path=`cmd //c echo $new_path`
21031
21032  input_path="$new_path"
21033  # Check if we need to convert this using DOS-style short mode. If the path
21034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21035  # take no chances and rewrite it.
21036  # Note: m4 eats our [], so we need to use [ and ] instead.
21037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21038  if test "x$has_forbidden_chars" != x; then
21039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21041  fi
21042
21043    # Output is in $new_path
21044
21045  windows_path="$new_path"
21046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21047    unix_path=`$CYGPATH -u "$windows_path"`
21048    new_path="$unix_path"
21049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21051    new_path="$unix_path"
21052  fi
21053
21054    # remove trailing .exe if any
21055    new_path="${new_path/%.exe/}"
21056
21057    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21058    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21059  fi
21060
21061  else
21062    # We're on a posix platform. Hooray! :)
21063    # First separate the path from the arguments. This will split at the first
21064    # space.
21065    complete="$CXX"
21066    path="${complete%% *}"
21067    tmp="$complete EOL"
21068    arguments="${tmp#* }"
21069
21070    # Cannot rely on the command "which" here since it doesn't always work.
21071    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21072    if test -z "$is_absolute_path"; then
21073      # Path to executable is not absolute. Find it.
21074      IFS_save="$IFS"
21075      IFS=:
21076      for p in $PATH; do
21077        if test -f "$p/$path" && test -x "$p/$path"; then
21078          new_path="$p/$path"
21079          break
21080        fi
21081      done
21082      IFS="$IFS_save"
21083    else
21084      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21085$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21086      new_path="$path"
21087    fi
21088
21089    if test "x$new_path" = x; then
21090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21091$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21092      has_space=`$ECHO "$complete" | $GREP " "`
21093      if test "x$has_space" != x; then
21094        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21096      fi
21097      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21098    fi
21099  fi
21100
21101  # Now join together the path and the arguments once again
21102  if test "x$arguments" != xEOL; then
21103    new_complete="$new_path ${arguments% *}"
21104  else
21105    new_complete="$new_path"
21106  fi
21107
21108  if test "x$complete" != "x$new_complete"; then
21109    CXX="$new_complete"
21110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21111$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21112  fi
21113
21114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21115$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21116  TEST_COMPILER="$CXX"
21117
21118  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21119    # Follow a chain of symbolic links. Use readlink
21120    # where it exists, else fall back to horribly
21121    # complicated shell code.
21122    if test "x$READLINK_TESTED" != yes; then
21123      # On MacOSX there is a readlink tool with a different
21124      # purpose than the GNU readlink tool. Check the found readlink.
21125      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21126      if test "x$ISGNU" = x; then
21127        # A readlink that we do not know how to use.
21128        # Are there other non-GNU readlinks out there?
21129        READLINK_TESTED=yes
21130        READLINK=
21131      fi
21132    fi
21133
21134    if test "x$READLINK" != x; then
21135      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21136    else
21137      # Save the current directory for restoring afterwards
21138      STARTDIR=$PWD
21139      COUNTER=0
21140      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21141      sym_link_file=`$BASENAME $TEST_COMPILER`
21142      cd $sym_link_dir
21143      # Use -P flag to resolve symlinks in directories.
21144      cd `$THEPWDCMD -P`
21145      sym_link_dir=`$THEPWDCMD -P`
21146      # Resolve file symlinks
21147      while test $COUNTER -lt 20; do
21148        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21149        if test "x$ISLINK" == x; then
21150          # This is not a symbolic link! We are done!
21151          break
21152        fi
21153        # Again resolve directory symlinks since the target of the just found
21154        # link could be in a different directory
21155        cd `$DIRNAME $ISLINK`
21156        sym_link_dir=`$THEPWDCMD -P`
21157        sym_link_file=`$BASENAME $ISLINK`
21158        let COUNTER=COUNTER+1
21159      done
21160      cd $STARTDIR
21161      TEST_COMPILER=$sym_link_dir/$sym_link_file
21162    fi
21163  fi
21164
21165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21166$as_echo "$TEST_COMPILER" >&6; }
21167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21168$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21169
21170  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21171  if test "x$COMPILER_BASENAME" = "xccache"; then
21172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21173$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21174    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21175    # We want to control ccache invocation ourselves, so ignore this cc and try
21176    # searching again.
21177
21178    # Remove the path to the fake ccache cc from the PATH
21179    RETRY_COMPILER_SAVED_PATH="$PATH"
21180    COMPILER_DIRNAME=`$DIRNAME $CXX`
21181    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21182
21183    # Try again looking for our compiler
21184    if test -n "$ac_tool_prefix"; then
21185  for ac_prog in $COMPILER_CHECK_LIST
21186  do
21187    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21188set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21190$as_echo_n "checking for $ac_word... " >&6; }
21191if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21192  $as_echo_n "(cached) " >&6
21193else
21194  if test -n "$PROPER_COMPILER_CXX"; then
21195  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21196else
21197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21198for as_dir in $PATH
21199do
21200  IFS=$as_save_IFS
21201  test -z "$as_dir" && as_dir=.
21202    for ac_exec_ext in '' $ac_executable_extensions; do
21203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21204    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21206    break 2
21207  fi
21208done
21209  done
21210IFS=$as_save_IFS
21211
21212fi
21213fi
21214PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21215if test -n "$PROPER_COMPILER_CXX"; then
21216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21217$as_echo "$PROPER_COMPILER_CXX" >&6; }
21218else
21219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21220$as_echo "no" >&6; }
21221fi
21222
21223
21224    test -n "$PROPER_COMPILER_CXX" && break
21225  done
21226fi
21227if test -z "$PROPER_COMPILER_CXX"; then
21228  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21229  for ac_prog in $COMPILER_CHECK_LIST
21230do
21231  # Extract the first word of "$ac_prog", so it can be a program name with args.
21232set dummy $ac_prog; ac_word=$2
21233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21234$as_echo_n "checking for $ac_word... " >&6; }
21235if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21236  $as_echo_n "(cached) " >&6
21237else
21238  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21239  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21240else
21241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21242for as_dir in $PATH
21243do
21244  IFS=$as_save_IFS
21245  test -z "$as_dir" && as_dir=.
21246    for ac_exec_ext in '' $ac_executable_extensions; do
21247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21248    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21250    break 2
21251  fi
21252done
21253  done
21254IFS=$as_save_IFS
21255
21256fi
21257fi
21258ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21259if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21261$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21262else
21263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21264$as_echo "no" >&6; }
21265fi
21266
21267
21268  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21269done
21270
21271  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21272    PROPER_COMPILER_CXX=""
21273  else
21274    case $cross_compiling:$ac_tool_warned in
21275yes:)
21276{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21277$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21278ac_tool_warned=yes ;;
21279esac
21280    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21281  fi
21282fi
21283
21284
21285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21286
21287  # First separate the path from the arguments. This will split at the first
21288  # space.
21289  complete="$PROPER_COMPILER_CXX"
21290  path="${complete%% *}"
21291  tmp="$complete EOL"
21292  arguments="${tmp#* }"
21293
21294  # Input might be given as Windows format, start by converting to
21295  # unix format.
21296  new_path=`$CYGPATH -u "$path"`
21297
21298  # Now try to locate executable using which
21299  new_path=`$WHICH "$new_path" 2> /dev/null`
21300  # bat and cmd files are not always considered executable in cygwin causing which
21301  # to not find them
21302  if test "x$new_path" = x \
21303      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21304      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21305    new_path=`$CYGPATH -u "$path"`
21306  fi
21307  if test "x$new_path" = x; then
21308    # Oops. Which didn't find the executable.
21309    # The splitting of arguments from the executable at a space might have been incorrect,
21310    # since paths with space are more likely in Windows. Give it another try with the whole
21311    # argument.
21312    path="$complete"
21313    arguments="EOL"
21314    new_path=`$CYGPATH -u "$path"`
21315    new_path=`$WHICH "$new_path" 2> /dev/null`
21316    # bat and cmd files are not always considered executable in cygwin causing which
21317    # to not find them
21318    if test "x$new_path" = x \
21319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21321      new_path=`$CYGPATH -u "$path"`
21322    fi
21323    if test "x$new_path" = x; then
21324      # It's still not found. Now this is an unrecoverable error.
21325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21326$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21327      has_space=`$ECHO "$complete" | $GREP " "`
21328      if test "x$has_space" != x; then
21329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21331      fi
21332      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21333    fi
21334  fi
21335
21336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21339  # "foo.exe" is OK but "foo" is an error.
21340  #
21341  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21342  # It is also a way to make sure we got the proper file name for the real test later on.
21343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21344  if test "x$test_shortpath" = x; then
21345    # Short path failed, file does not exist as specified.
21346    # Try adding .exe or .cmd
21347    if test -f "${new_path}.exe"; then
21348      input_to_shortpath="${new_path}.exe"
21349    elif test -f "${new_path}.cmd"; then
21350      input_to_shortpath="${new_path}.cmd"
21351    else
21352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21353$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21354      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21355$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21356      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21357    fi
21358  else
21359    input_to_shortpath="$new_path"
21360  fi
21361
21362  # Call helper function which possibly converts this using DOS-style short mode.
21363  # If so, the updated path is stored in $new_path.
21364  new_path="$input_to_shortpath"
21365
21366  input_path="$input_to_shortpath"
21367  # Check if we need to convert this using DOS-style short mode. If the path
21368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21369  # take no chances and rewrite it.
21370  # Note: m4 eats our [], so we need to use [ and ] instead.
21371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21372  if test "x$has_forbidden_chars" != x; then
21373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21377      # Going to short mode and back again did indeed matter. Since short mode is
21378      # case insensitive, let's make it lowercase to improve readability.
21379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21380      # Now convert it back to Unix-stile (cygpath)
21381      input_path=`$CYGPATH -u "$shortmode_path"`
21382      new_path="$input_path"
21383    fi
21384  fi
21385
21386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21387  if test "x$test_cygdrive_prefix" = x; then
21388    # As a simple fix, exclude /usr/bin since it's not a real path.
21389    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21391      # a path prefixed by /cygdrive for fixpath to work.
21392      new_path="$CYGWIN_ROOT_PATH$input_path"
21393    fi
21394  fi
21395
21396  # remove trailing .exe if any
21397  new_path="${new_path/%.exe/}"
21398
21399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21400
21401  # First separate the path from the arguments. This will split at the first
21402  # space.
21403  complete="$PROPER_COMPILER_CXX"
21404  path="${complete%% *}"
21405  tmp="$complete EOL"
21406  arguments="${tmp#* }"
21407
21408  # Input might be given as Windows format, start by converting to
21409  # unix format.
21410  new_path="$path"
21411
21412  windows_path="$new_path"
21413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21414    unix_path=`$CYGPATH -u "$windows_path"`
21415    new_path="$unix_path"
21416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21418    new_path="$unix_path"
21419  fi
21420
21421
21422  # Now try to locate executable using which
21423  new_path=`$WHICH "$new_path" 2> /dev/null`
21424
21425  if test "x$new_path" = x; then
21426    # Oops. Which didn't find the executable.
21427    # The splitting of arguments from the executable at a space might have been incorrect,
21428    # since paths with space are more likely in Windows. Give it another try with the whole
21429    # argument.
21430    path="$complete"
21431    arguments="EOL"
21432    new_path="$path"
21433
21434  windows_path="$new_path"
21435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21436    unix_path=`$CYGPATH -u "$windows_path"`
21437    new_path="$unix_path"
21438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21440    new_path="$unix_path"
21441  fi
21442
21443
21444    new_path=`$WHICH "$new_path" 2> /dev/null`
21445
21446    if test "x$new_path" = x; then
21447      # It's still not found. Now this is an unrecoverable error.
21448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21449$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21450      has_space=`$ECHO "$complete" | $GREP " "`
21451      if test "x$has_space" != x; then
21452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21454      fi
21455      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21456    fi
21457  fi
21458
21459  # Now new_path has a complete unix path to the binary
21460  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21461    # Keep paths in /bin as-is, but remove trailing .exe if any
21462    new_path="${new_path/%.exe/}"
21463    # Do not save /bin paths to all_fixpath_prefixes!
21464  else
21465    # Not in mixed or Windows style, start by that.
21466    new_path=`cmd //c echo $new_path`
21467
21468  input_path="$new_path"
21469  # Check if we need to convert this using DOS-style short mode. If the path
21470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21471  # take no chances and rewrite it.
21472  # Note: m4 eats our [], so we need to use [ and ] instead.
21473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21474  if test "x$has_forbidden_chars" != x; then
21475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21477  fi
21478
21479    # Output is in $new_path
21480
21481  windows_path="$new_path"
21482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21483    unix_path=`$CYGPATH -u "$windows_path"`
21484    new_path="$unix_path"
21485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21487    new_path="$unix_path"
21488  fi
21489
21490    # remove trailing .exe if any
21491    new_path="${new_path/%.exe/}"
21492
21493    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21494    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21495  fi
21496
21497  else
21498    # We're on a posix platform. Hooray! :)
21499    # First separate the path from the arguments. This will split at the first
21500    # space.
21501    complete="$PROPER_COMPILER_CXX"
21502    path="${complete%% *}"
21503    tmp="$complete EOL"
21504    arguments="${tmp#* }"
21505
21506    # Cannot rely on the command "which" here since it doesn't always work.
21507    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21508    if test -z "$is_absolute_path"; then
21509      # Path to executable is not absolute. Find it.
21510      IFS_save="$IFS"
21511      IFS=:
21512      for p in $PATH; do
21513        if test -f "$p/$path" && test -x "$p/$path"; then
21514          new_path="$p/$path"
21515          break
21516        fi
21517      done
21518      IFS="$IFS_save"
21519    else
21520      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21521$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21522      new_path="$path"
21523    fi
21524
21525    if test "x$new_path" = x; then
21526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21527$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21528      has_space=`$ECHO "$complete" | $GREP " "`
21529      if test "x$has_space" != x; then
21530        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21532      fi
21533      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21534    fi
21535  fi
21536
21537  # Now join together the path and the arguments once again
21538  if test "x$arguments" != xEOL; then
21539    new_complete="$new_path ${arguments% *}"
21540  else
21541    new_complete="$new_path"
21542  fi
21543
21544  if test "x$complete" != "x$new_complete"; then
21545    PROPER_COMPILER_CXX="$new_complete"
21546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21547$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21548  fi
21549
21550    PATH="$RETRY_COMPILER_SAVED_PATH"
21551
21552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21553$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21554
21555  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21556    # Follow a chain of symbolic links. Use readlink
21557    # where it exists, else fall back to horribly
21558    # complicated shell code.
21559    if test "x$READLINK_TESTED" != yes; then
21560      # On MacOSX there is a readlink tool with a different
21561      # purpose than the GNU readlink tool. Check the found readlink.
21562      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21563      if test "x$ISGNU" = x; then
21564        # A readlink that we do not know how to use.
21565        # Are there other non-GNU readlinks out there?
21566        READLINK_TESTED=yes
21567        READLINK=
21568      fi
21569    fi
21570
21571    if test "x$READLINK" != x; then
21572      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21573    else
21574      # Save the current directory for restoring afterwards
21575      STARTDIR=$PWD
21576      COUNTER=0
21577      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21578      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21579      cd $sym_link_dir
21580      # Use -P flag to resolve symlinks in directories.
21581      cd `$THEPWDCMD -P`
21582      sym_link_dir=`$THEPWDCMD -P`
21583      # Resolve file symlinks
21584      while test $COUNTER -lt 20; do
21585        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21586        if test "x$ISLINK" == x; then
21587          # This is not a symbolic link! We are done!
21588          break
21589        fi
21590        # Again resolve directory symlinks since the target of the just found
21591        # link could be in a different directory
21592        cd `$DIRNAME $ISLINK`
21593        sym_link_dir=`$THEPWDCMD -P`
21594        sym_link_file=`$BASENAME $ISLINK`
21595        let COUNTER=COUNTER+1
21596      done
21597      cd $STARTDIR
21598      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21599    fi
21600  fi
21601
21602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21603$as_echo "$PROPER_COMPILER_CXX" >&6; }
21604    CXX="$PROPER_COMPILER_CXX"
21605  else
21606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21607$as_echo "no, keeping CXX" >&6; }
21608    CXX="$TEST_COMPILER"
21609  fi
21610
21611  COMPILER=$CXX
21612  COMPILER_NAME=$COMPILER_NAME
21613
21614  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21615    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21616    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21617    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21618    if test $? -ne 0; then
21619      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21620
21621      { $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
21622$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21623      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21624$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21625      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21626    else
21627      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21628      COMPILER_VENDOR="Sun Studio"
21629    fi
21630  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21631    # First line typically looks something like:
21632    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21633    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21634    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21635    COMPILER_VENDOR="Microsoft CL.EXE"
21636    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21637    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21638      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21639        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21640      fi
21641    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21642      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21643        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21644      fi
21645    fi
21646  else
21647    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21648    # Check that this is likely to be GCC.
21649    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21650    if test $? -ne 0; then
21651      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21652$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21653      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21654$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21655      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21656    fi
21657
21658    # First line typically looks something like:
21659    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21660    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21661    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21662  fi
21663  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21664  CXX_VERSION="$COMPILER_VERSION"
21665  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21666  CXX_VENDOR="$COMPILER_VENDOR"
21667
21668  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21669$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21670
21671
21672  # Now that we have resolved CXX ourself, let autoconf have its go at it
21673  ac_ext=cpp
21674ac_cpp='$CXXCPP $CPPFLAGS'
21675ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21676ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21677ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21678if test -z "$CXX"; then
21679  if test -n "$CCC"; then
21680    CXX=$CCC
21681  else
21682    if test -n "$ac_tool_prefix"; then
21683  for ac_prog in $CXX
21684  do
21685    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21686set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21688$as_echo_n "checking for $ac_word... " >&6; }
21689if ${ac_cv_prog_CXX+:} false; then :
21690  $as_echo_n "(cached) " >&6
21691else
21692  if test -n "$CXX"; then
21693  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21694else
21695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21696for as_dir in $PATH
21697do
21698  IFS=$as_save_IFS
21699  test -z "$as_dir" && as_dir=.
21700    for ac_exec_ext in '' $ac_executable_extensions; do
21701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21702    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21704    break 2
21705  fi
21706done
21707  done
21708IFS=$as_save_IFS
21709
21710fi
21711fi
21712CXX=$ac_cv_prog_CXX
21713if test -n "$CXX"; then
21714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21715$as_echo "$CXX" >&6; }
21716else
21717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21718$as_echo "no" >&6; }
21719fi
21720
21721
21722    test -n "$CXX" && break
21723  done
21724fi
21725if test -z "$CXX"; then
21726  ac_ct_CXX=$CXX
21727  for ac_prog in $CXX
21728do
21729  # Extract the first word of "$ac_prog", so it can be a program name with args.
21730set dummy $ac_prog; ac_word=$2
21731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21732$as_echo_n "checking for $ac_word... " >&6; }
21733if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21734  $as_echo_n "(cached) " >&6
21735else
21736  if test -n "$ac_ct_CXX"; then
21737  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21738else
21739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21740for as_dir in $PATH
21741do
21742  IFS=$as_save_IFS
21743  test -z "$as_dir" && as_dir=.
21744    for ac_exec_ext in '' $ac_executable_extensions; do
21745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21746    ac_cv_prog_ac_ct_CXX="$ac_prog"
21747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21748    break 2
21749  fi
21750done
21751  done
21752IFS=$as_save_IFS
21753
21754fi
21755fi
21756ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21757if test -n "$ac_ct_CXX"; then
21758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21759$as_echo "$ac_ct_CXX" >&6; }
21760else
21761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21762$as_echo "no" >&6; }
21763fi
21764
21765
21766  test -n "$ac_ct_CXX" && break
21767done
21768
21769  if test "x$ac_ct_CXX" = x; then
21770    CXX="g++"
21771  else
21772    case $cross_compiling:$ac_tool_warned in
21773yes:)
21774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21776ac_tool_warned=yes ;;
21777esac
21778    CXX=$ac_ct_CXX
21779  fi
21780fi
21781
21782  fi
21783fi
21784# Provide some information about the compiler.
21785$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21786set X $ac_compile
21787ac_compiler=$2
21788for ac_option in --version -v -V -qversion; do
21789  { { ac_try="$ac_compiler $ac_option >&5"
21790case "(($ac_try" in
21791  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21792  *) ac_try_echo=$ac_try;;
21793esac
21794eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21795$as_echo "$ac_try_echo"; } >&5
21796  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21797  ac_status=$?
21798  if test -s conftest.err; then
21799    sed '10a\
21800... rest of stderr output deleted ...
21801         10q' conftest.err >conftest.er1
21802    cat conftest.er1 >&5
21803  fi
21804  rm -f conftest.er1 conftest.err
21805  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21806  test $ac_status = 0; }
21807done
21808
21809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21810$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21811if ${ac_cv_cxx_compiler_gnu+:} false; then :
21812  $as_echo_n "(cached) " >&6
21813else
21814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21815/* end confdefs.h.  */
21816
21817int
21818main ()
21819{
21820#ifndef __GNUC__
21821       choke me
21822#endif
21823
21824  ;
21825  return 0;
21826}
21827_ACEOF
21828if ac_fn_cxx_try_compile "$LINENO"; then :
21829  ac_compiler_gnu=yes
21830else
21831  ac_compiler_gnu=no
21832fi
21833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21834ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21835
21836fi
21837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21838$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21839if test $ac_compiler_gnu = yes; then
21840  GXX=yes
21841else
21842  GXX=
21843fi
21844ac_test_CXXFLAGS=${CXXFLAGS+set}
21845ac_save_CXXFLAGS=$CXXFLAGS
21846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21847$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21848if ${ac_cv_prog_cxx_g+:} false; then :
21849  $as_echo_n "(cached) " >&6
21850else
21851  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21852   ac_cxx_werror_flag=yes
21853   ac_cv_prog_cxx_g=no
21854   CXXFLAGS="-g"
21855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21856/* end confdefs.h.  */
21857
21858int
21859main ()
21860{
21861
21862  ;
21863  return 0;
21864}
21865_ACEOF
21866if ac_fn_cxx_try_compile "$LINENO"; then :
21867  ac_cv_prog_cxx_g=yes
21868else
21869  CXXFLAGS=""
21870      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21871/* end confdefs.h.  */
21872
21873int
21874main ()
21875{
21876
21877  ;
21878  return 0;
21879}
21880_ACEOF
21881if ac_fn_cxx_try_compile "$LINENO"; then :
21882
21883else
21884  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21885	 CXXFLAGS="-g"
21886	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21887/* end confdefs.h.  */
21888
21889int
21890main ()
21891{
21892
21893  ;
21894  return 0;
21895}
21896_ACEOF
21897if ac_fn_cxx_try_compile "$LINENO"; then :
21898  ac_cv_prog_cxx_g=yes
21899fi
21900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21901fi
21902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21903fi
21904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21905   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21906fi
21907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21908$as_echo "$ac_cv_prog_cxx_g" >&6; }
21909if test "$ac_test_CXXFLAGS" = set; then
21910  CXXFLAGS=$ac_save_CXXFLAGS
21911elif test $ac_cv_prog_cxx_g = yes; then
21912  if test "$GXX" = yes; then
21913    CXXFLAGS="-g -O2"
21914  else
21915    CXXFLAGS="-g"
21916  fi
21917else
21918  if test "$GXX" = yes; then
21919    CXXFLAGS="-O2"
21920  else
21921    CXXFLAGS=
21922  fi
21923fi
21924ac_ext=cpp
21925ac_cpp='$CXXCPP $CPPFLAGS'
21926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21929
21930
21931  ### Locate other tools
21932
21933  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21934    ac_ext=m
21935ac_cpp='$OBJCPP $CPPFLAGS'
21936ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21937ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21938ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21939if test -n "$ac_tool_prefix"; then
21940  for ac_prog in gcc objcc objc cc CC
21941  do
21942    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21943set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21945$as_echo_n "checking for $ac_word... " >&6; }
21946if ${ac_cv_prog_OBJC+:} false; then :
21947  $as_echo_n "(cached) " >&6
21948else
21949  if test -n "$OBJC"; then
21950  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21951else
21952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21953for as_dir in $PATH
21954do
21955  IFS=$as_save_IFS
21956  test -z "$as_dir" && as_dir=.
21957    for ac_exec_ext in '' $ac_executable_extensions; do
21958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21959    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21961    break 2
21962  fi
21963done
21964  done
21965IFS=$as_save_IFS
21966
21967fi
21968fi
21969OBJC=$ac_cv_prog_OBJC
21970if test -n "$OBJC"; then
21971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21972$as_echo "$OBJC" >&6; }
21973else
21974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21975$as_echo "no" >&6; }
21976fi
21977
21978
21979    test -n "$OBJC" && break
21980  done
21981fi
21982if test -z "$OBJC"; then
21983  ac_ct_OBJC=$OBJC
21984  for ac_prog in gcc objcc objc cc CC
21985do
21986  # Extract the first word of "$ac_prog", so it can be a program name with args.
21987set dummy $ac_prog; ac_word=$2
21988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21989$as_echo_n "checking for $ac_word... " >&6; }
21990if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21991  $as_echo_n "(cached) " >&6
21992else
21993  if test -n "$ac_ct_OBJC"; then
21994  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21995else
21996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21997for as_dir in $PATH
21998do
21999  IFS=$as_save_IFS
22000  test -z "$as_dir" && as_dir=.
22001    for ac_exec_ext in '' $ac_executable_extensions; do
22002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22003    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22005    break 2
22006  fi
22007done
22008  done
22009IFS=$as_save_IFS
22010
22011fi
22012fi
22013ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22014if test -n "$ac_ct_OBJC"; then
22015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22016$as_echo "$ac_ct_OBJC" >&6; }
22017else
22018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22019$as_echo "no" >&6; }
22020fi
22021
22022
22023  test -n "$ac_ct_OBJC" && break
22024done
22025
22026  if test "x$ac_ct_OBJC" = x; then
22027    OBJC="gcc"
22028  else
22029    case $cross_compiling:$ac_tool_warned in
22030yes:)
22031{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22032$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22033ac_tool_warned=yes ;;
22034esac
22035    OBJC=$ac_ct_OBJC
22036  fi
22037fi
22038
22039# Provide some information about the compiler.
22040$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22041set X $ac_compile
22042ac_compiler=$2
22043for ac_option in --version -v -V -qversion; do
22044  { { ac_try="$ac_compiler $ac_option >&5"
22045case "(($ac_try" in
22046  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22047  *) ac_try_echo=$ac_try;;
22048esac
22049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22050$as_echo "$ac_try_echo"; } >&5
22051  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22052  ac_status=$?
22053  if test -s conftest.err; then
22054    sed '10a\
22055... rest of stderr output deleted ...
22056         10q' conftest.err >conftest.er1
22057    cat conftest.er1 >&5
22058  fi
22059  rm -f conftest.er1 conftest.err
22060  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22061  test $ac_status = 0; }
22062done
22063
22064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22065$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22066if ${ac_cv_objc_compiler_gnu+:} false; then :
22067  $as_echo_n "(cached) " >&6
22068else
22069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22070/* end confdefs.h.  */
22071
22072int
22073main ()
22074{
22075#ifndef __GNUC__
22076       choke me
22077#endif
22078
22079  ;
22080  return 0;
22081}
22082_ACEOF
22083if ac_fn_objc_try_compile "$LINENO"; then :
22084  ac_compiler_gnu=yes
22085else
22086  ac_compiler_gnu=no
22087fi
22088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22089ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22090
22091fi
22092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22093$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22094if test $ac_compiler_gnu = yes; then
22095  GOBJC=yes
22096else
22097  GOBJC=
22098fi
22099ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22100ac_save_OBJCFLAGS=$OBJCFLAGS
22101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22102$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22103if ${ac_cv_prog_objc_g+:} false; then :
22104  $as_echo_n "(cached) " >&6
22105else
22106  ac_save_objc_werror_flag=$ac_objc_werror_flag
22107   ac_objc_werror_flag=yes
22108   ac_cv_prog_objc_g=no
22109   OBJCFLAGS="-g"
22110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22111/* end confdefs.h.  */
22112
22113int
22114main ()
22115{
22116
22117  ;
22118  return 0;
22119}
22120_ACEOF
22121if ac_fn_objc_try_compile "$LINENO"; then :
22122  ac_cv_prog_objc_g=yes
22123else
22124  OBJCFLAGS=""
22125      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22126/* end confdefs.h.  */
22127
22128int
22129main ()
22130{
22131
22132  ;
22133  return 0;
22134}
22135_ACEOF
22136if ac_fn_objc_try_compile "$LINENO"; then :
22137
22138else
22139  ac_objc_werror_flag=$ac_save_objc_werror_flag
22140	 OBJCFLAGS="-g"
22141	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22142/* end confdefs.h.  */
22143
22144int
22145main ()
22146{
22147
22148  ;
22149  return 0;
22150}
22151_ACEOF
22152if ac_fn_objc_try_compile "$LINENO"; then :
22153  ac_cv_prog_objc_g=yes
22154fi
22155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22156fi
22157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22158fi
22159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22160   ac_objc_werror_flag=$ac_save_objc_werror_flag
22161fi
22162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22163$as_echo "$ac_cv_prog_objc_g" >&6; }
22164if test "$ac_test_OBJCFLAGS" = set; then
22165  OBJCFLAGS=$ac_save_OBJCFLAGS
22166elif test $ac_cv_prog_objc_g = yes; then
22167  if test "$GOBJC" = yes; then
22168    OBJCFLAGS="-g -O2"
22169  else
22170    OBJCFLAGS="-g"
22171  fi
22172else
22173  if test "$GOBJC" = yes; then
22174    OBJCFLAGS="-O2"
22175  else
22176    OBJCFLAGS=
22177  fi
22178fi
22179ac_ext=cpp
22180ac_cpp='$CXXCPP $CPPFLAGS'
22181ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22182ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22183ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22184
22185
22186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22187
22188  # First separate the path from the arguments. This will split at the first
22189  # space.
22190  complete="$OBJC"
22191  path="${complete%% *}"
22192  tmp="$complete EOL"
22193  arguments="${tmp#* }"
22194
22195  # Input might be given as Windows format, start by converting to
22196  # unix format.
22197  new_path=`$CYGPATH -u "$path"`
22198
22199  # Now try to locate executable using which
22200  new_path=`$WHICH "$new_path" 2> /dev/null`
22201  # bat and cmd files are not always considered executable in cygwin causing which
22202  # to not find them
22203  if test "x$new_path" = x \
22204      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22205      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22206    new_path=`$CYGPATH -u "$path"`
22207  fi
22208  if test "x$new_path" = x; then
22209    # Oops. Which didn't find the executable.
22210    # The splitting of arguments from the executable at a space might have been incorrect,
22211    # since paths with space are more likely in Windows. Give it another try with the whole
22212    # argument.
22213    path="$complete"
22214    arguments="EOL"
22215    new_path=`$CYGPATH -u "$path"`
22216    new_path=`$WHICH "$new_path" 2> /dev/null`
22217    # bat and cmd files are not always considered executable in cygwin causing which
22218    # to not find them
22219    if test "x$new_path" = x \
22220        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22221        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22222      new_path=`$CYGPATH -u "$path"`
22223    fi
22224    if test "x$new_path" = x; then
22225      # It's still not found. Now this is an unrecoverable error.
22226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22227$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22228      has_space=`$ECHO "$complete" | $GREP " "`
22229      if test "x$has_space" != x; then
22230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22232      fi
22233      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22234    fi
22235  fi
22236
22237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22240  # "foo.exe" is OK but "foo" is an error.
22241  #
22242  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22243  # It is also a way to make sure we got the proper file name for the real test later on.
22244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22245  if test "x$test_shortpath" = x; then
22246    # Short path failed, file does not exist as specified.
22247    # Try adding .exe or .cmd
22248    if test -f "${new_path}.exe"; then
22249      input_to_shortpath="${new_path}.exe"
22250    elif test -f "${new_path}.cmd"; then
22251      input_to_shortpath="${new_path}.cmd"
22252    else
22253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22254$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22257      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22258    fi
22259  else
22260    input_to_shortpath="$new_path"
22261  fi
22262
22263  # Call helper function which possibly converts this using DOS-style short mode.
22264  # If so, the updated path is stored in $new_path.
22265  new_path="$input_to_shortpath"
22266
22267  input_path="$input_to_shortpath"
22268  # Check if we need to convert this using DOS-style short mode. If the path
22269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22270  # take no chances and rewrite it.
22271  # Note: m4 eats our [], so we need to use [ and ] instead.
22272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22273  if test "x$has_forbidden_chars" != x; then
22274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22278      # Going to short mode and back again did indeed matter. Since short mode is
22279      # case insensitive, let's make it lowercase to improve readability.
22280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22281      # Now convert it back to Unix-stile (cygpath)
22282      input_path=`$CYGPATH -u "$shortmode_path"`
22283      new_path="$input_path"
22284    fi
22285  fi
22286
22287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22288  if test "x$test_cygdrive_prefix" = x; then
22289    # As a simple fix, exclude /usr/bin since it's not a real path.
22290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22292      # a path prefixed by /cygdrive for fixpath to work.
22293      new_path="$CYGWIN_ROOT_PATH$input_path"
22294    fi
22295  fi
22296
22297  # remove trailing .exe if any
22298  new_path="${new_path/%.exe/}"
22299
22300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22301
22302  # First separate the path from the arguments. This will split at the first
22303  # space.
22304  complete="$OBJC"
22305  path="${complete%% *}"
22306  tmp="$complete EOL"
22307  arguments="${tmp#* }"
22308
22309  # Input might be given as Windows format, start by converting to
22310  # unix format.
22311  new_path="$path"
22312
22313  windows_path="$new_path"
22314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22315    unix_path=`$CYGPATH -u "$windows_path"`
22316    new_path="$unix_path"
22317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22319    new_path="$unix_path"
22320  fi
22321
22322
22323  # Now try to locate executable using which
22324  new_path=`$WHICH "$new_path" 2> /dev/null`
22325
22326  if test "x$new_path" = x; then
22327    # Oops. Which didn't find the executable.
22328    # The splitting of arguments from the executable at a space might have been incorrect,
22329    # since paths with space are more likely in Windows. Give it another try with the whole
22330    # argument.
22331    path="$complete"
22332    arguments="EOL"
22333    new_path="$path"
22334
22335  windows_path="$new_path"
22336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22337    unix_path=`$CYGPATH -u "$windows_path"`
22338    new_path="$unix_path"
22339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22341    new_path="$unix_path"
22342  fi
22343
22344
22345    new_path=`$WHICH "$new_path" 2> /dev/null`
22346
22347    if test "x$new_path" = x; then
22348      # It's still not found. Now this is an unrecoverable error.
22349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22350$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22351      has_space=`$ECHO "$complete" | $GREP " "`
22352      if test "x$has_space" != x; then
22353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22355      fi
22356      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22357    fi
22358  fi
22359
22360  # Now new_path has a complete unix path to the binary
22361  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22362    # Keep paths in /bin as-is, but remove trailing .exe if any
22363    new_path="${new_path/%.exe/}"
22364    # Do not save /bin paths to all_fixpath_prefixes!
22365  else
22366    # Not in mixed or Windows style, start by that.
22367    new_path=`cmd //c echo $new_path`
22368
22369  input_path="$new_path"
22370  # Check if we need to convert this using DOS-style short mode. If the path
22371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22372  # take no chances and rewrite it.
22373  # Note: m4 eats our [], so we need to use [ and ] instead.
22374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22375  if test "x$has_forbidden_chars" != x; then
22376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22377    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22378  fi
22379
22380    # Output is in $new_path
22381
22382  windows_path="$new_path"
22383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22384    unix_path=`$CYGPATH -u "$windows_path"`
22385    new_path="$unix_path"
22386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22388    new_path="$unix_path"
22389  fi
22390
22391    # remove trailing .exe if any
22392    new_path="${new_path/%.exe/}"
22393
22394    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22395    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22396  fi
22397
22398  else
22399    # We're on a posix platform. Hooray! :)
22400    # First separate the path from the arguments. This will split at the first
22401    # space.
22402    complete="$OBJC"
22403    path="${complete%% *}"
22404    tmp="$complete EOL"
22405    arguments="${tmp#* }"
22406
22407    # Cannot rely on the command "which" here since it doesn't always work.
22408    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22409    if test -z "$is_absolute_path"; then
22410      # Path to executable is not absolute. Find it.
22411      IFS_save="$IFS"
22412      IFS=:
22413      for p in $PATH; do
22414        if test -f "$p/$path" && test -x "$p/$path"; then
22415          new_path="$p/$path"
22416          break
22417        fi
22418      done
22419      IFS="$IFS_save"
22420    else
22421      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22422$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22423      new_path="$path"
22424    fi
22425
22426    if test "x$new_path" = x; then
22427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22428$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22429      has_space=`$ECHO "$complete" | $GREP " "`
22430      if test "x$has_space" != x; then
22431        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22432$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22433      fi
22434      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22435    fi
22436  fi
22437
22438  # Now join together the path and the arguments once again
22439  if test "x$arguments" != xEOL; then
22440    new_complete="$new_path ${arguments% *}"
22441  else
22442    new_complete="$new_path"
22443  fi
22444
22445  if test "x$complete" != "x$new_complete"; then
22446    OBJC="$new_complete"
22447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22448$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22449  fi
22450
22451  else
22452    OBJC=
22453  fi
22454
22455  # Restore the flags to the user specified values.
22456  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22457  CFLAGS="$ORG_CFLAGS"
22458  CXXFLAGS="$ORG_CXXFLAGS"
22459  OBJCFLAGS="$ORG_OBJCFLAGS"
22460
22461  LD="$CC"
22462  LDEXE="$CC"
22463  LDCXX="$CXX"
22464  LDEXECXX="$CXX"
22465
22466  # LDEXE is the linker to use, when creating executables.
22467
22468  # Linking C++ libraries.
22469
22470  # Linking C++ executables.
22471
22472
22473  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22474    if test -n "$ac_tool_prefix"; then
22475  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22476set dummy ${ac_tool_prefix}ar; ac_word=$2
22477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22478$as_echo_n "checking for $ac_word... " >&6; }
22479if ${ac_cv_prog_AR+:} false; then :
22480  $as_echo_n "(cached) " >&6
22481else
22482  if test -n "$AR"; then
22483  ac_cv_prog_AR="$AR" # Let the user override the test.
22484else
22485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22486for as_dir in $PATH
22487do
22488  IFS=$as_save_IFS
22489  test -z "$as_dir" && as_dir=.
22490    for ac_exec_ext in '' $ac_executable_extensions; do
22491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22492    ac_cv_prog_AR="${ac_tool_prefix}ar"
22493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22494    break 2
22495  fi
22496done
22497  done
22498IFS=$as_save_IFS
22499
22500fi
22501fi
22502AR=$ac_cv_prog_AR
22503if test -n "$AR"; then
22504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22505$as_echo "$AR" >&6; }
22506else
22507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22508$as_echo "no" >&6; }
22509fi
22510
22511
22512fi
22513if test -z "$ac_cv_prog_AR"; then
22514  ac_ct_AR=$AR
22515  # Extract the first word of "ar", so it can be a program name with args.
22516set dummy ar; ac_word=$2
22517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22518$as_echo_n "checking for $ac_word... " >&6; }
22519if ${ac_cv_prog_ac_ct_AR+:} false; then :
22520  $as_echo_n "(cached) " >&6
22521else
22522  if test -n "$ac_ct_AR"; then
22523  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22524else
22525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22526for as_dir in $PATH
22527do
22528  IFS=$as_save_IFS
22529  test -z "$as_dir" && as_dir=.
22530    for ac_exec_ext in '' $ac_executable_extensions; do
22531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22532    ac_cv_prog_ac_ct_AR="ar"
22533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22534    break 2
22535  fi
22536done
22537  done
22538IFS=$as_save_IFS
22539
22540fi
22541fi
22542ac_ct_AR=$ac_cv_prog_ac_ct_AR
22543if test -n "$ac_ct_AR"; then
22544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22545$as_echo "$ac_ct_AR" >&6; }
22546else
22547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22548$as_echo "no" >&6; }
22549fi
22550
22551  if test "x$ac_ct_AR" = x; then
22552    AR=""
22553  else
22554    case $cross_compiling:$ac_tool_warned in
22555yes:)
22556{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22557$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22558ac_tool_warned=yes ;;
22559esac
22560    AR=$ac_ct_AR
22561  fi
22562else
22563  AR="$ac_cv_prog_AR"
22564fi
22565
22566
22567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22568
22569  # First separate the path from the arguments. This will split at the first
22570  # space.
22571  complete="$AR"
22572  path="${complete%% *}"
22573  tmp="$complete EOL"
22574  arguments="${tmp#* }"
22575
22576  # Input might be given as Windows format, start by converting to
22577  # unix format.
22578  new_path=`$CYGPATH -u "$path"`
22579
22580  # Now try to locate executable using which
22581  new_path=`$WHICH "$new_path" 2> /dev/null`
22582  # bat and cmd files are not always considered executable in cygwin causing which
22583  # to not find them
22584  if test "x$new_path" = x \
22585      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22586      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22587    new_path=`$CYGPATH -u "$path"`
22588  fi
22589  if test "x$new_path" = x; then
22590    # Oops. Which didn't find the executable.
22591    # The splitting of arguments from the executable at a space might have been incorrect,
22592    # since paths with space are more likely in Windows. Give it another try with the whole
22593    # argument.
22594    path="$complete"
22595    arguments="EOL"
22596    new_path=`$CYGPATH -u "$path"`
22597    new_path=`$WHICH "$new_path" 2> /dev/null`
22598    # bat and cmd files are not always considered executable in cygwin causing which
22599    # to not find them
22600    if test "x$new_path" = x \
22601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22603      new_path=`$CYGPATH -u "$path"`
22604    fi
22605    if test "x$new_path" = x; then
22606      # It's still not found. Now this is an unrecoverable error.
22607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22608$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22609      has_space=`$ECHO "$complete" | $GREP " "`
22610      if test "x$has_space" != x; then
22611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22613      fi
22614      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22615    fi
22616  fi
22617
22618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22621  # "foo.exe" is OK but "foo" is an error.
22622  #
22623  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22624  # It is also a way to make sure we got the proper file name for the real test later on.
22625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22626  if test "x$test_shortpath" = x; then
22627    # Short path failed, file does not exist as specified.
22628    # Try adding .exe or .cmd
22629    if test -f "${new_path}.exe"; then
22630      input_to_shortpath="${new_path}.exe"
22631    elif test -f "${new_path}.cmd"; then
22632      input_to_shortpath="${new_path}.cmd"
22633    else
22634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22635$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22636      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22637$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22638      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22639    fi
22640  else
22641    input_to_shortpath="$new_path"
22642  fi
22643
22644  # Call helper function which possibly converts this using DOS-style short mode.
22645  # If so, the updated path is stored in $new_path.
22646  new_path="$input_to_shortpath"
22647
22648  input_path="$input_to_shortpath"
22649  # Check if we need to convert this using DOS-style short mode. If the path
22650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22651  # take no chances and rewrite it.
22652  # Note: m4 eats our [], so we need to use [ and ] instead.
22653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22654  if test "x$has_forbidden_chars" != x; then
22655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22659      # Going to short mode and back again did indeed matter. Since short mode is
22660      # case insensitive, let's make it lowercase to improve readability.
22661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22662      # Now convert it back to Unix-stile (cygpath)
22663      input_path=`$CYGPATH -u "$shortmode_path"`
22664      new_path="$input_path"
22665    fi
22666  fi
22667
22668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22669  if test "x$test_cygdrive_prefix" = x; then
22670    # As a simple fix, exclude /usr/bin since it's not a real path.
22671    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22673      # a path prefixed by /cygdrive for fixpath to work.
22674      new_path="$CYGWIN_ROOT_PATH$input_path"
22675    fi
22676  fi
22677
22678  # remove trailing .exe if any
22679  new_path="${new_path/%.exe/}"
22680
22681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22682
22683  # First separate the path from the arguments. This will split at the first
22684  # space.
22685  complete="$AR"
22686  path="${complete%% *}"
22687  tmp="$complete EOL"
22688  arguments="${tmp#* }"
22689
22690  # Input might be given as Windows format, start by converting to
22691  # unix format.
22692  new_path="$path"
22693
22694  windows_path="$new_path"
22695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22696    unix_path=`$CYGPATH -u "$windows_path"`
22697    new_path="$unix_path"
22698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22700    new_path="$unix_path"
22701  fi
22702
22703
22704  # Now try to locate executable using which
22705  new_path=`$WHICH "$new_path" 2> /dev/null`
22706
22707  if test "x$new_path" = x; then
22708    # Oops. Which didn't find the executable.
22709    # The splitting of arguments from the executable at a space might have been incorrect,
22710    # since paths with space are more likely in Windows. Give it another try with the whole
22711    # argument.
22712    path="$complete"
22713    arguments="EOL"
22714    new_path="$path"
22715
22716  windows_path="$new_path"
22717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22718    unix_path=`$CYGPATH -u "$windows_path"`
22719    new_path="$unix_path"
22720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22722    new_path="$unix_path"
22723  fi
22724
22725
22726    new_path=`$WHICH "$new_path" 2> /dev/null`
22727
22728    if test "x$new_path" = x; then
22729      # It's still not found. Now this is an unrecoverable error.
22730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22731$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22732      has_space=`$ECHO "$complete" | $GREP " "`
22733      if test "x$has_space" != x; then
22734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22736      fi
22737      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22738    fi
22739  fi
22740
22741  # Now new_path has a complete unix path to the binary
22742  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22743    # Keep paths in /bin as-is, but remove trailing .exe if any
22744    new_path="${new_path/%.exe/}"
22745    # Do not save /bin paths to all_fixpath_prefixes!
22746  else
22747    # Not in mixed or Windows style, start by that.
22748    new_path=`cmd //c echo $new_path`
22749
22750  input_path="$new_path"
22751  # Check if we need to convert this using DOS-style short mode. If the path
22752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22753  # take no chances and rewrite it.
22754  # Note: m4 eats our [], so we need to use [ and ] instead.
22755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22756  if test "x$has_forbidden_chars" != x; then
22757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22759  fi
22760
22761    # Output is in $new_path
22762
22763  windows_path="$new_path"
22764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22765    unix_path=`$CYGPATH -u "$windows_path"`
22766    new_path="$unix_path"
22767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22769    new_path="$unix_path"
22770  fi
22771
22772    # remove trailing .exe if any
22773    new_path="${new_path/%.exe/}"
22774
22775    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22776    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22777  fi
22778
22779  else
22780    # We're on a posix platform. Hooray! :)
22781    # First separate the path from the arguments. This will split at the first
22782    # space.
22783    complete="$AR"
22784    path="${complete%% *}"
22785    tmp="$complete EOL"
22786    arguments="${tmp#* }"
22787
22788    # Cannot rely on the command "which" here since it doesn't always work.
22789    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22790    if test -z "$is_absolute_path"; then
22791      # Path to executable is not absolute. Find it.
22792      IFS_save="$IFS"
22793      IFS=:
22794      for p in $PATH; do
22795        if test -f "$p/$path" && test -x "$p/$path"; then
22796          new_path="$p/$path"
22797          break
22798        fi
22799      done
22800      IFS="$IFS_save"
22801    else
22802      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22803$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22804      new_path="$path"
22805    fi
22806
22807    if test "x$new_path" = x; then
22808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22809$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22810      has_space=`$ECHO "$complete" | $GREP " "`
22811      if test "x$has_space" != x; then
22812        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22813$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22814      fi
22815      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22816    fi
22817  fi
22818
22819  # Now join together the path and the arguments once again
22820  if test "x$arguments" != xEOL; then
22821    new_complete="$new_path ${arguments% *}"
22822  else
22823    new_complete="$new_path"
22824  fi
22825
22826  if test "x$complete" != "x$new_complete"; then
22827    AR="$new_complete"
22828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22829$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22830  fi
22831
22832  fi
22833  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22834    ARFLAGS="-r"
22835  else
22836    ARFLAGS=""
22837  fi
22838
22839
22840  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22841  HOTSPOT_CXX="$CXX"
22842  HOTSPOT_LD="$LD"
22843
22844
22845
22846  COMPILER_NAME=gcc
22847  COMPILER_TYPE=CC
22848  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22849
22850    # For now, assume that we are always compiling using cl.exe.
22851    CC_OUT_OPTION=-Fo
22852    EXE_OUT_OPTION=-out:
22853    LD_OUT_OPTION=-out:
22854    AR_OUT_OPTION=-out:
22855    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22856    # program for something completely different.
22857    # Extract the first word of "link", so it can be a program name with args.
22858set dummy link; ac_word=$2
22859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22860$as_echo_n "checking for $ac_word... " >&6; }
22861if ${ac_cv_prog_WINLD+:} false; then :
22862  $as_echo_n "(cached) " >&6
22863else
22864  if test -n "$WINLD"; then
22865  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22866else
22867  ac_prog_rejected=no
22868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22869for as_dir in $PATH
22870do
22871  IFS=$as_save_IFS
22872  test -z "$as_dir" && as_dir=.
22873    for ac_exec_ext in '' $ac_executable_extensions; do
22874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22875    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22876       ac_prog_rejected=yes
22877       continue
22878     fi
22879    ac_cv_prog_WINLD="link"
22880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22881    break 2
22882  fi
22883done
22884  done
22885IFS=$as_save_IFS
22886
22887if test $ac_prog_rejected = yes; then
22888  # We found a bogon in the path, so make sure we never use it.
22889  set dummy $ac_cv_prog_WINLD
22890  shift
22891  if test $# != 0; then
22892    # We chose a different compiler from the bogus one.
22893    # However, it has the same basename, so the bogon will be chosen
22894    # first if we set WINLD to just the basename; use the full file name.
22895    shift
22896    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22897  fi
22898fi
22899fi
22900fi
22901WINLD=$ac_cv_prog_WINLD
22902if test -n "$WINLD"; then
22903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22904$as_echo "$WINLD" >&6; }
22905else
22906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22907$as_echo "no" >&6; }
22908fi
22909
22910
22911    # Since we must ignore the first found link, WINLD will contain
22912    # the full path to the link.exe program.
22913
22914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22915
22916  # First separate the path from the arguments. This will split at the first
22917  # space.
22918  complete="$WINLD"
22919  path="${complete%% *}"
22920  tmp="$complete EOL"
22921  arguments="${tmp#* }"
22922
22923  # Input might be given as Windows format, start by converting to
22924  # unix format.
22925  new_path=`$CYGPATH -u "$path"`
22926
22927  # Now try to locate executable using which
22928  new_path=`$WHICH "$new_path" 2> /dev/null`
22929  # bat and cmd files are not always considered executable in cygwin causing which
22930  # to not find them
22931  if test "x$new_path" = x \
22932      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22933      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22934    new_path=`$CYGPATH -u "$path"`
22935  fi
22936  if test "x$new_path" = x; then
22937    # Oops. Which didn't find the executable.
22938    # The splitting of arguments from the executable at a space might have been incorrect,
22939    # since paths with space are more likely in Windows. Give it another try with the whole
22940    # argument.
22941    path="$complete"
22942    arguments="EOL"
22943    new_path=`$CYGPATH -u "$path"`
22944    new_path=`$WHICH "$new_path" 2> /dev/null`
22945    # bat and cmd files are not always considered executable in cygwin causing which
22946    # to not find them
22947    if test "x$new_path" = x \
22948        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22949        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22950      new_path=`$CYGPATH -u "$path"`
22951    fi
22952    if test "x$new_path" = x; then
22953      # It's still not found. Now this is an unrecoverable error.
22954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22955$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22956      has_space=`$ECHO "$complete" | $GREP " "`
22957      if test "x$has_space" != x; then
22958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22960      fi
22961      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22962    fi
22963  fi
22964
22965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22968  # "foo.exe" is OK but "foo" is an error.
22969  #
22970  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22971  # It is also a way to make sure we got the proper file name for the real test later on.
22972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22973  if test "x$test_shortpath" = x; then
22974    # Short path failed, file does not exist as specified.
22975    # Try adding .exe or .cmd
22976    if test -f "${new_path}.exe"; then
22977      input_to_shortpath="${new_path}.exe"
22978    elif test -f "${new_path}.cmd"; then
22979      input_to_shortpath="${new_path}.cmd"
22980    else
22981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22982$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22983      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22984$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22985      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22986    fi
22987  else
22988    input_to_shortpath="$new_path"
22989  fi
22990
22991  # Call helper function which possibly converts this using DOS-style short mode.
22992  # If so, the updated path is stored in $new_path.
22993  new_path="$input_to_shortpath"
22994
22995  input_path="$input_to_shortpath"
22996  # Check if we need to convert this using DOS-style short mode. If the path
22997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22998  # take no chances and rewrite it.
22999  # Note: m4 eats our [], so we need to use [ and ] instead.
23000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23001  if test "x$has_forbidden_chars" != x; then
23002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23006      # Going to short mode and back again did indeed matter. Since short mode is
23007      # case insensitive, let's make it lowercase to improve readability.
23008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23009      # Now convert it back to Unix-stile (cygpath)
23010      input_path=`$CYGPATH -u "$shortmode_path"`
23011      new_path="$input_path"
23012    fi
23013  fi
23014
23015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23016  if test "x$test_cygdrive_prefix" = x; then
23017    # As a simple fix, exclude /usr/bin since it's not a real path.
23018    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23020      # a path prefixed by /cygdrive for fixpath to work.
23021      new_path="$CYGWIN_ROOT_PATH$input_path"
23022    fi
23023  fi
23024
23025  # remove trailing .exe if any
23026  new_path="${new_path/%.exe/}"
23027
23028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23029
23030  # First separate the path from the arguments. This will split at the first
23031  # space.
23032  complete="$WINLD"
23033  path="${complete%% *}"
23034  tmp="$complete EOL"
23035  arguments="${tmp#* }"
23036
23037  # Input might be given as Windows format, start by converting to
23038  # unix format.
23039  new_path="$path"
23040
23041  windows_path="$new_path"
23042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23043    unix_path=`$CYGPATH -u "$windows_path"`
23044    new_path="$unix_path"
23045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23047    new_path="$unix_path"
23048  fi
23049
23050
23051  # Now try to locate executable using which
23052  new_path=`$WHICH "$new_path" 2> /dev/null`
23053
23054  if test "x$new_path" = x; then
23055    # Oops. Which didn't find the executable.
23056    # The splitting of arguments from the executable at a space might have been incorrect,
23057    # since paths with space are more likely in Windows. Give it another try with the whole
23058    # argument.
23059    path="$complete"
23060    arguments="EOL"
23061    new_path="$path"
23062
23063  windows_path="$new_path"
23064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23065    unix_path=`$CYGPATH -u "$windows_path"`
23066    new_path="$unix_path"
23067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23069    new_path="$unix_path"
23070  fi
23071
23072
23073    new_path=`$WHICH "$new_path" 2> /dev/null`
23074
23075    if test "x$new_path" = x; then
23076      # It's still not found. Now this is an unrecoverable error.
23077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23078$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23079      has_space=`$ECHO "$complete" | $GREP " "`
23080      if test "x$has_space" != x; then
23081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23083      fi
23084      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23085    fi
23086  fi
23087
23088  # Now new_path has a complete unix path to the binary
23089  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23090    # Keep paths in /bin as-is, but remove trailing .exe if any
23091    new_path="${new_path/%.exe/}"
23092    # Do not save /bin paths to all_fixpath_prefixes!
23093  else
23094    # Not in mixed or Windows style, start by that.
23095    new_path=`cmd //c echo $new_path`
23096
23097  input_path="$new_path"
23098  # Check if we need to convert this using DOS-style short mode. If the path
23099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23100  # take no chances and rewrite it.
23101  # Note: m4 eats our [], so we need to use [ and ] instead.
23102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23103  if test "x$has_forbidden_chars" != x; then
23104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23106  fi
23107
23108    # Output is in $new_path
23109
23110  windows_path="$new_path"
23111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23112    unix_path=`$CYGPATH -u "$windows_path"`
23113    new_path="$unix_path"
23114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23116    new_path="$unix_path"
23117  fi
23118
23119    # remove trailing .exe if any
23120    new_path="${new_path/%.exe/}"
23121
23122    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23123    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23124  fi
23125
23126  else
23127    # We're on a posix platform. Hooray! :)
23128    # First separate the path from the arguments. This will split at the first
23129    # space.
23130    complete="$WINLD"
23131    path="${complete%% *}"
23132    tmp="$complete EOL"
23133    arguments="${tmp#* }"
23134
23135    # Cannot rely on the command "which" here since it doesn't always work.
23136    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23137    if test -z "$is_absolute_path"; then
23138      # Path to executable is not absolute. Find it.
23139      IFS_save="$IFS"
23140      IFS=:
23141      for p in $PATH; do
23142        if test -f "$p/$path" && test -x "$p/$path"; then
23143          new_path="$p/$path"
23144          break
23145        fi
23146      done
23147      IFS="$IFS_save"
23148    else
23149      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23150$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23151      new_path="$path"
23152    fi
23153
23154    if test "x$new_path" = x; then
23155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23156$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23157      has_space=`$ECHO "$complete" | $GREP " "`
23158      if test "x$has_space" != x; then
23159        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23160$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23161      fi
23162      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23163    fi
23164  fi
23165
23166  # Now join together the path and the arguments once again
23167  if test "x$arguments" != xEOL; then
23168    new_complete="$new_path ${arguments% *}"
23169  else
23170    new_complete="$new_path"
23171  fi
23172
23173  if test "x$complete" != "x$new_complete"; then
23174    WINLD="$new_complete"
23175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23176$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23177  fi
23178
23179    printf "Windows linker was found at $WINLD\n"
23180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23181$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23182    "$WINLD" --version > /dev/null
23183    if test $? -eq 0 ; then
23184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23185$as_echo "no" >&6; }
23186      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23187    else
23188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23189$as_echo "yes" >&6; }
23190    fi
23191    LD="$WINLD"
23192    LDEXE="$WINLD"
23193    LDCXX="$WINLD"
23194    LDEXECXX="$WINLD"
23195
23196    # Extract the first word of "mt", so it can be a program name with args.
23197set dummy mt; ac_word=$2
23198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23199$as_echo_n "checking for $ac_word... " >&6; }
23200if ${ac_cv_prog_MT+:} false; then :
23201  $as_echo_n "(cached) " >&6
23202else
23203  if test -n "$MT"; then
23204  ac_cv_prog_MT="$MT" # Let the user override the test.
23205else
23206  ac_prog_rejected=no
23207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23208for as_dir in $PATH
23209do
23210  IFS=$as_save_IFS
23211  test -z "$as_dir" && as_dir=.
23212    for ac_exec_ext in '' $ac_executable_extensions; do
23213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23214    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23215       ac_prog_rejected=yes
23216       continue
23217     fi
23218    ac_cv_prog_MT="mt"
23219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23220    break 2
23221  fi
23222done
23223  done
23224IFS=$as_save_IFS
23225
23226if test $ac_prog_rejected = yes; then
23227  # We found a bogon in the path, so make sure we never use it.
23228  set dummy $ac_cv_prog_MT
23229  shift
23230  if test $# != 0; then
23231    # We chose a different compiler from the bogus one.
23232    # However, it has the same basename, so the bogon will be chosen
23233    # first if we set MT to just the basename; use the full file name.
23234    shift
23235    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23236  fi
23237fi
23238fi
23239fi
23240MT=$ac_cv_prog_MT
23241if test -n "$MT"; then
23242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23243$as_echo "$MT" >&6; }
23244else
23245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23246$as_echo "no" >&6; }
23247fi
23248
23249
23250
23251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23252
23253  # First separate the path from the arguments. This will split at the first
23254  # space.
23255  complete="$MT"
23256  path="${complete%% *}"
23257  tmp="$complete EOL"
23258  arguments="${tmp#* }"
23259
23260  # Input might be given as Windows format, start by converting to
23261  # unix format.
23262  new_path=`$CYGPATH -u "$path"`
23263
23264  # Now try to locate executable using which
23265  new_path=`$WHICH "$new_path" 2> /dev/null`
23266  # bat and cmd files are not always considered executable in cygwin causing which
23267  # to not find them
23268  if test "x$new_path" = x \
23269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23271    new_path=`$CYGPATH -u "$path"`
23272  fi
23273  if test "x$new_path" = x; then
23274    # Oops. Which didn't find the executable.
23275    # The splitting of arguments from the executable at a space might have been incorrect,
23276    # since paths with space are more likely in Windows. Give it another try with the whole
23277    # argument.
23278    path="$complete"
23279    arguments="EOL"
23280    new_path=`$CYGPATH -u "$path"`
23281    new_path=`$WHICH "$new_path" 2> /dev/null`
23282    # bat and cmd files are not always considered executable in cygwin causing which
23283    # to not find them
23284    if test "x$new_path" = x \
23285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23287      new_path=`$CYGPATH -u "$path"`
23288    fi
23289    if test "x$new_path" = x; then
23290      # It's still not found. Now this is an unrecoverable error.
23291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23292$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23293      has_space=`$ECHO "$complete" | $GREP " "`
23294      if test "x$has_space" != x; then
23295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23297      fi
23298      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23299    fi
23300  fi
23301
23302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23305  # "foo.exe" is OK but "foo" is an error.
23306  #
23307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23308  # It is also a way to make sure we got the proper file name for the real test later on.
23309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23310  if test "x$test_shortpath" = x; then
23311    # Short path failed, file does not exist as specified.
23312    # Try adding .exe or .cmd
23313    if test -f "${new_path}.exe"; then
23314      input_to_shortpath="${new_path}.exe"
23315    elif test -f "${new_path}.cmd"; then
23316      input_to_shortpath="${new_path}.cmd"
23317    else
23318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23319$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23322      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23323    fi
23324  else
23325    input_to_shortpath="$new_path"
23326  fi
23327
23328  # Call helper function which possibly converts this using DOS-style short mode.
23329  # If so, the updated path is stored in $new_path.
23330  new_path="$input_to_shortpath"
23331
23332  input_path="$input_to_shortpath"
23333  # Check if we need to convert this using DOS-style short mode. If the path
23334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23335  # take no chances and rewrite it.
23336  # Note: m4 eats our [], so we need to use [ and ] instead.
23337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23338  if test "x$has_forbidden_chars" != x; then
23339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23343      # Going to short mode and back again did indeed matter. Since short mode is
23344      # case insensitive, let's make it lowercase to improve readability.
23345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23346      # Now convert it back to Unix-stile (cygpath)
23347      input_path=`$CYGPATH -u "$shortmode_path"`
23348      new_path="$input_path"
23349    fi
23350  fi
23351
23352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23353  if test "x$test_cygdrive_prefix" = x; then
23354    # As a simple fix, exclude /usr/bin since it's not a real path.
23355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23357      # a path prefixed by /cygdrive for fixpath to work.
23358      new_path="$CYGWIN_ROOT_PATH$input_path"
23359    fi
23360  fi
23361
23362  # remove trailing .exe if any
23363  new_path="${new_path/%.exe/}"
23364
23365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23366
23367  # First separate the path from the arguments. This will split at the first
23368  # space.
23369  complete="$MT"
23370  path="${complete%% *}"
23371  tmp="$complete EOL"
23372  arguments="${tmp#* }"
23373
23374  # Input might be given as Windows format, start by converting to
23375  # unix format.
23376  new_path="$path"
23377
23378  windows_path="$new_path"
23379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23380    unix_path=`$CYGPATH -u "$windows_path"`
23381    new_path="$unix_path"
23382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23384    new_path="$unix_path"
23385  fi
23386
23387
23388  # Now try to locate executable using which
23389  new_path=`$WHICH "$new_path" 2> /dev/null`
23390
23391  if test "x$new_path" = x; then
23392    # Oops. Which didn't find the executable.
23393    # The splitting of arguments from the executable at a space might have been incorrect,
23394    # since paths with space are more likely in Windows. Give it another try with the whole
23395    # argument.
23396    path="$complete"
23397    arguments="EOL"
23398    new_path="$path"
23399
23400  windows_path="$new_path"
23401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23402    unix_path=`$CYGPATH -u "$windows_path"`
23403    new_path="$unix_path"
23404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23406    new_path="$unix_path"
23407  fi
23408
23409
23410    new_path=`$WHICH "$new_path" 2> /dev/null`
23411
23412    if test "x$new_path" = x; then
23413      # It's still not found. Now this is an unrecoverable error.
23414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23415$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23416      has_space=`$ECHO "$complete" | $GREP " "`
23417      if test "x$has_space" != x; then
23418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23420      fi
23421      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23422    fi
23423  fi
23424
23425  # Now new_path has a complete unix path to the binary
23426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23427    # Keep paths in /bin as-is, but remove trailing .exe if any
23428    new_path="${new_path/%.exe/}"
23429    # Do not save /bin paths to all_fixpath_prefixes!
23430  else
23431    # Not in mixed or Windows style, start by that.
23432    new_path=`cmd //c echo $new_path`
23433
23434  input_path="$new_path"
23435  # Check if we need to convert this using DOS-style short mode. If the path
23436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23437  # take no chances and rewrite it.
23438  # Note: m4 eats our [], so we need to use [ and ] instead.
23439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23440  if test "x$has_forbidden_chars" != x; then
23441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23443  fi
23444
23445    # Output is in $new_path
23446
23447  windows_path="$new_path"
23448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23449    unix_path=`$CYGPATH -u "$windows_path"`
23450    new_path="$unix_path"
23451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23453    new_path="$unix_path"
23454  fi
23455
23456    # remove trailing .exe if any
23457    new_path="${new_path/%.exe/}"
23458
23459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23461  fi
23462
23463  else
23464    # We're on a posix platform. Hooray! :)
23465    # First separate the path from the arguments. This will split at the first
23466    # space.
23467    complete="$MT"
23468    path="${complete%% *}"
23469    tmp="$complete EOL"
23470    arguments="${tmp#* }"
23471
23472    # Cannot rely on the command "which" here since it doesn't always work.
23473    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23474    if test -z "$is_absolute_path"; then
23475      # Path to executable is not absolute. Find it.
23476      IFS_save="$IFS"
23477      IFS=:
23478      for p in $PATH; do
23479        if test -f "$p/$path" && test -x "$p/$path"; then
23480          new_path="$p/$path"
23481          break
23482        fi
23483      done
23484      IFS="$IFS_save"
23485    else
23486      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23487$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23488      new_path="$path"
23489    fi
23490
23491    if test "x$new_path" = x; then
23492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23493$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23494      has_space=`$ECHO "$complete" | $GREP " "`
23495      if test "x$has_space" != x; then
23496        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23498      fi
23499      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23500    fi
23501  fi
23502
23503  # Now join together the path and the arguments once again
23504  if test "x$arguments" != xEOL; then
23505    new_complete="$new_path ${arguments% *}"
23506  else
23507    new_complete="$new_path"
23508  fi
23509
23510  if test "x$complete" != "x$new_complete"; then
23511    MT="$new_complete"
23512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23513$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23514  fi
23515
23516    # The resource compiler
23517    # Extract the first word of "rc", so it can be a program name with args.
23518set dummy rc; ac_word=$2
23519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23520$as_echo_n "checking for $ac_word... " >&6; }
23521if ${ac_cv_prog_RC+:} false; then :
23522  $as_echo_n "(cached) " >&6
23523else
23524  if test -n "$RC"; then
23525  ac_cv_prog_RC="$RC" # Let the user override the test.
23526else
23527  ac_prog_rejected=no
23528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23529for as_dir in $PATH
23530do
23531  IFS=$as_save_IFS
23532  test -z "$as_dir" && as_dir=.
23533    for ac_exec_ext in '' $ac_executable_extensions; do
23534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23535    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23536       ac_prog_rejected=yes
23537       continue
23538     fi
23539    ac_cv_prog_RC="rc"
23540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23541    break 2
23542  fi
23543done
23544  done
23545IFS=$as_save_IFS
23546
23547if test $ac_prog_rejected = yes; then
23548  # We found a bogon in the path, so make sure we never use it.
23549  set dummy $ac_cv_prog_RC
23550  shift
23551  if test $# != 0; then
23552    # We chose a different compiler from the bogus one.
23553    # However, it has the same basename, so the bogon will be chosen
23554    # first if we set RC to just the basename; use the full file name.
23555    shift
23556    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23557  fi
23558fi
23559fi
23560fi
23561RC=$ac_cv_prog_RC
23562if test -n "$RC"; then
23563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23564$as_echo "$RC" >&6; }
23565else
23566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23567$as_echo "no" >&6; }
23568fi
23569
23570
23571
23572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23573
23574  # First separate the path from the arguments. This will split at the first
23575  # space.
23576  complete="$RC"
23577  path="${complete%% *}"
23578  tmp="$complete EOL"
23579  arguments="${tmp#* }"
23580
23581  # Input might be given as Windows format, start by converting to
23582  # unix format.
23583  new_path=`$CYGPATH -u "$path"`
23584
23585  # Now try to locate executable using which
23586  new_path=`$WHICH "$new_path" 2> /dev/null`
23587  # bat and cmd files are not always considered executable in cygwin causing which
23588  # to not find them
23589  if test "x$new_path" = x \
23590      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23591      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23592    new_path=`$CYGPATH -u "$path"`
23593  fi
23594  if test "x$new_path" = x; then
23595    # Oops. Which didn't find the executable.
23596    # The splitting of arguments from the executable at a space might have been incorrect,
23597    # since paths with space are more likely in Windows. Give it another try with the whole
23598    # argument.
23599    path="$complete"
23600    arguments="EOL"
23601    new_path=`$CYGPATH -u "$path"`
23602    new_path=`$WHICH "$new_path" 2> /dev/null`
23603    # bat and cmd files are not always considered executable in cygwin causing which
23604    # to not find them
23605    if test "x$new_path" = x \
23606        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23607        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23608      new_path=`$CYGPATH -u "$path"`
23609    fi
23610    if test "x$new_path" = x; then
23611      # It's still not found. Now this is an unrecoverable error.
23612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23613$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23614      has_space=`$ECHO "$complete" | $GREP " "`
23615      if test "x$has_space" != x; then
23616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23618      fi
23619      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23620    fi
23621  fi
23622
23623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23626  # "foo.exe" is OK but "foo" is an error.
23627  #
23628  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23629  # It is also a way to make sure we got the proper file name for the real test later on.
23630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23631  if test "x$test_shortpath" = x; then
23632    # Short path failed, file does not exist as specified.
23633    # Try adding .exe or .cmd
23634    if test -f "${new_path}.exe"; then
23635      input_to_shortpath="${new_path}.exe"
23636    elif test -f "${new_path}.cmd"; then
23637      input_to_shortpath="${new_path}.cmd"
23638    else
23639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23640$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23641      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23642$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23643      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23644    fi
23645  else
23646    input_to_shortpath="$new_path"
23647  fi
23648
23649  # Call helper function which possibly converts this using DOS-style short mode.
23650  # If so, the updated path is stored in $new_path.
23651  new_path="$input_to_shortpath"
23652
23653  input_path="$input_to_shortpath"
23654  # Check if we need to convert this using DOS-style short mode. If the path
23655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23656  # take no chances and rewrite it.
23657  # Note: m4 eats our [], so we need to use [ and ] instead.
23658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23659  if test "x$has_forbidden_chars" != x; then
23660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23664      # Going to short mode and back again did indeed matter. Since short mode is
23665      # case insensitive, let's make it lowercase to improve readability.
23666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23667      # Now convert it back to Unix-stile (cygpath)
23668      input_path=`$CYGPATH -u "$shortmode_path"`
23669      new_path="$input_path"
23670    fi
23671  fi
23672
23673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23674  if test "x$test_cygdrive_prefix" = x; then
23675    # As a simple fix, exclude /usr/bin since it's not a real path.
23676    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23678      # a path prefixed by /cygdrive for fixpath to work.
23679      new_path="$CYGWIN_ROOT_PATH$input_path"
23680    fi
23681  fi
23682
23683  # remove trailing .exe if any
23684  new_path="${new_path/%.exe/}"
23685
23686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23687
23688  # First separate the path from the arguments. This will split at the first
23689  # space.
23690  complete="$RC"
23691  path="${complete%% *}"
23692  tmp="$complete EOL"
23693  arguments="${tmp#* }"
23694
23695  # Input might be given as Windows format, start by converting to
23696  # unix format.
23697  new_path="$path"
23698
23699  windows_path="$new_path"
23700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23701    unix_path=`$CYGPATH -u "$windows_path"`
23702    new_path="$unix_path"
23703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23705    new_path="$unix_path"
23706  fi
23707
23708
23709  # Now try to locate executable using which
23710  new_path=`$WHICH "$new_path" 2> /dev/null`
23711
23712  if test "x$new_path" = x; then
23713    # Oops. Which didn't find the executable.
23714    # The splitting of arguments from the executable at a space might have been incorrect,
23715    # since paths with space are more likely in Windows. Give it another try with the whole
23716    # argument.
23717    path="$complete"
23718    arguments="EOL"
23719    new_path="$path"
23720
23721  windows_path="$new_path"
23722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23723    unix_path=`$CYGPATH -u "$windows_path"`
23724    new_path="$unix_path"
23725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23727    new_path="$unix_path"
23728  fi
23729
23730
23731    new_path=`$WHICH "$new_path" 2> /dev/null`
23732
23733    if test "x$new_path" = x; then
23734      # It's still not found. Now this is an unrecoverable error.
23735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23736$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23737      has_space=`$ECHO "$complete" | $GREP " "`
23738      if test "x$has_space" != x; then
23739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23741      fi
23742      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23743    fi
23744  fi
23745
23746  # Now new_path has a complete unix path to the binary
23747  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23748    # Keep paths in /bin as-is, but remove trailing .exe if any
23749    new_path="${new_path/%.exe/}"
23750    # Do not save /bin paths to all_fixpath_prefixes!
23751  else
23752    # Not in mixed or Windows style, start by that.
23753    new_path=`cmd //c echo $new_path`
23754
23755  input_path="$new_path"
23756  # Check if we need to convert this using DOS-style short mode. If the path
23757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23758  # take no chances and rewrite it.
23759  # Note: m4 eats our [], so we need to use [ and ] instead.
23760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23761  if test "x$has_forbidden_chars" != x; then
23762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23764  fi
23765
23766    # Output is in $new_path
23767
23768  windows_path="$new_path"
23769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23770    unix_path=`$CYGPATH -u "$windows_path"`
23771    new_path="$unix_path"
23772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23774    new_path="$unix_path"
23775  fi
23776
23777    # remove trailing .exe if any
23778    new_path="${new_path/%.exe/}"
23779
23780    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23781    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23782  fi
23783
23784  else
23785    # We're on a posix platform. Hooray! :)
23786    # First separate the path from the arguments. This will split at the first
23787    # space.
23788    complete="$RC"
23789    path="${complete%% *}"
23790    tmp="$complete EOL"
23791    arguments="${tmp#* }"
23792
23793    # Cannot rely on the command "which" here since it doesn't always work.
23794    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23795    if test -z "$is_absolute_path"; then
23796      # Path to executable is not absolute. Find it.
23797      IFS_save="$IFS"
23798      IFS=:
23799      for p in $PATH; do
23800        if test -f "$p/$path" && test -x "$p/$path"; then
23801          new_path="$p/$path"
23802          break
23803        fi
23804      done
23805      IFS="$IFS_save"
23806    else
23807      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23808$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23809      new_path="$path"
23810    fi
23811
23812    if test "x$new_path" = x; then
23813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23814$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23815      has_space=`$ECHO "$complete" | $GREP " "`
23816      if test "x$has_space" != x; then
23817        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23818$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23819      fi
23820      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23821    fi
23822  fi
23823
23824  # Now join together the path and the arguments once again
23825  if test "x$arguments" != xEOL; then
23826    new_complete="$new_path ${arguments% *}"
23827  else
23828    new_complete="$new_path"
23829  fi
23830
23831  if test "x$complete" != "x$new_complete"; then
23832    RC="$new_complete"
23833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23834$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23835  fi
23836
23837
23838    # For hotspot, we need these in Windows mixed path,
23839    # so rewrite them all. Need added .exe suffix.
23840    HOTSPOT_CXX="$CXX.exe"
23841    HOTSPOT_LD="$LD.exe"
23842    HOTSPOT_MT="$MT.exe"
23843    HOTSPOT_RC="$RC.exe"
23844
23845  unix_path="$HOTSPOT_CXX"
23846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23847    windows_path=`$CYGPATH -m "$unix_path"`
23848    HOTSPOT_CXX="$windows_path"
23849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23850    windows_path=`cmd //c echo $unix_path`
23851    HOTSPOT_CXX="$windows_path"
23852  fi
23853
23854
23855  unix_path="$HOTSPOT_LD"
23856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23857    windows_path=`$CYGPATH -m "$unix_path"`
23858    HOTSPOT_LD="$windows_path"
23859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23860    windows_path=`cmd //c echo $unix_path`
23861    HOTSPOT_LD="$windows_path"
23862  fi
23863
23864
23865  unix_path="$HOTSPOT_MT"
23866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23867    windows_path=`$CYGPATH -m "$unix_path"`
23868    HOTSPOT_MT="$windows_path"
23869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23870    windows_path=`cmd //c echo $unix_path`
23871    HOTSPOT_MT="$windows_path"
23872  fi
23873
23874
23875  unix_path="$HOTSPOT_RC"
23876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23877    windows_path=`$CYGPATH -m "$unix_path"`
23878    HOTSPOT_RC="$windows_path"
23879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23880    windows_path=`cmd //c echo $unix_path`
23881    HOTSPOT_RC="$windows_path"
23882  fi
23883
23884
23885
23886
23887    RC_FLAGS="-nologo -l 0x409 -r"
23888    if test "x$VARIANT" = xOPT; then :
23889
23890    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23891
23892fi
23893
23894  # The version variables used to create RC_FLAGS may be overridden
23895  # in a custom configure script, or possibly the command line.
23896  # Let those variables be expanded at make time in spec.gmk.
23897  # The \$ are escaped to the shell, and the $(...) variables
23898  # are evaluated by make.
23899  RC_FLAGS="$RC_FLAGS \
23900      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23901      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23902      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23903      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23904      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23905      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23906      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23907
23908  # lib.exe is used to create static libraries.
23909  # Extract the first word of "lib", so it can be a program name with args.
23910set dummy lib; ac_word=$2
23911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23912$as_echo_n "checking for $ac_word... " >&6; }
23913if ${ac_cv_prog_WINAR+:} false; then :
23914  $as_echo_n "(cached) " >&6
23915else
23916  if test -n "$WINAR"; then
23917  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23918else
23919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23920for as_dir in $PATH
23921do
23922  IFS=$as_save_IFS
23923  test -z "$as_dir" && as_dir=.
23924    for ac_exec_ext in '' $ac_executable_extensions; do
23925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23926    ac_cv_prog_WINAR="lib"
23927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23928    break 2
23929  fi
23930done
23931  done
23932IFS=$as_save_IFS
23933
23934fi
23935fi
23936WINAR=$ac_cv_prog_WINAR
23937if test -n "$WINAR"; then
23938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23939$as_echo "$WINAR" >&6; }
23940else
23941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23942$as_echo "no" >&6; }
23943fi
23944
23945
23946
23947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23948
23949  # First separate the path from the arguments. This will split at the first
23950  # space.
23951  complete="$WINAR"
23952  path="${complete%% *}"
23953  tmp="$complete EOL"
23954  arguments="${tmp#* }"
23955
23956  # Input might be given as Windows format, start by converting to
23957  # unix format.
23958  new_path=`$CYGPATH -u "$path"`
23959
23960  # Now try to locate executable using which
23961  new_path=`$WHICH "$new_path" 2> /dev/null`
23962  # bat and cmd files are not always considered executable in cygwin causing which
23963  # to not find them
23964  if test "x$new_path" = x \
23965      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23966      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23967    new_path=`$CYGPATH -u "$path"`
23968  fi
23969  if test "x$new_path" = x; then
23970    # Oops. Which didn't find the executable.
23971    # The splitting of arguments from the executable at a space might have been incorrect,
23972    # since paths with space are more likely in Windows. Give it another try with the whole
23973    # argument.
23974    path="$complete"
23975    arguments="EOL"
23976    new_path=`$CYGPATH -u "$path"`
23977    new_path=`$WHICH "$new_path" 2> /dev/null`
23978    # bat and cmd files are not always considered executable in cygwin causing which
23979    # to not find them
23980    if test "x$new_path" = x \
23981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23983      new_path=`$CYGPATH -u "$path"`
23984    fi
23985    if test "x$new_path" = x; then
23986      # It's still not found. Now this is an unrecoverable error.
23987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23988$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23989      has_space=`$ECHO "$complete" | $GREP " "`
23990      if test "x$has_space" != x; then
23991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23993      fi
23994      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23995    fi
23996  fi
23997
23998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24001  # "foo.exe" is OK but "foo" is an error.
24002  #
24003  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24004  # It is also a way to make sure we got the proper file name for the real test later on.
24005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24006  if test "x$test_shortpath" = x; then
24007    # Short path failed, file does not exist as specified.
24008    # Try adding .exe or .cmd
24009    if test -f "${new_path}.exe"; then
24010      input_to_shortpath="${new_path}.exe"
24011    elif test -f "${new_path}.cmd"; then
24012      input_to_shortpath="${new_path}.cmd"
24013    else
24014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24015$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24016      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24017$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24018      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24019    fi
24020  else
24021    input_to_shortpath="$new_path"
24022  fi
24023
24024  # Call helper function which possibly converts this using DOS-style short mode.
24025  # If so, the updated path is stored in $new_path.
24026  new_path="$input_to_shortpath"
24027
24028  input_path="$input_to_shortpath"
24029  # Check if we need to convert this using DOS-style short mode. If the path
24030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24031  # take no chances and rewrite it.
24032  # Note: m4 eats our [], so we need to use [ and ] instead.
24033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24034  if test "x$has_forbidden_chars" != x; then
24035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24039      # Going to short mode and back again did indeed matter. Since short mode is
24040      # case insensitive, let's make it lowercase to improve readability.
24041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24042      # Now convert it back to Unix-stile (cygpath)
24043      input_path=`$CYGPATH -u "$shortmode_path"`
24044      new_path="$input_path"
24045    fi
24046  fi
24047
24048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24049  if test "x$test_cygdrive_prefix" = x; then
24050    # As a simple fix, exclude /usr/bin since it's not a real path.
24051    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24053      # a path prefixed by /cygdrive for fixpath to work.
24054      new_path="$CYGWIN_ROOT_PATH$input_path"
24055    fi
24056  fi
24057
24058  # remove trailing .exe if any
24059  new_path="${new_path/%.exe/}"
24060
24061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24062
24063  # First separate the path from the arguments. This will split at the first
24064  # space.
24065  complete="$WINAR"
24066  path="${complete%% *}"
24067  tmp="$complete EOL"
24068  arguments="${tmp#* }"
24069
24070  # Input might be given as Windows format, start by converting to
24071  # unix format.
24072  new_path="$path"
24073
24074  windows_path="$new_path"
24075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24076    unix_path=`$CYGPATH -u "$windows_path"`
24077    new_path="$unix_path"
24078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24080    new_path="$unix_path"
24081  fi
24082
24083
24084  # Now try to locate executable using which
24085  new_path=`$WHICH "$new_path" 2> /dev/null`
24086
24087  if test "x$new_path" = x; then
24088    # Oops. Which didn't find the executable.
24089    # The splitting of arguments from the executable at a space might have been incorrect,
24090    # since paths with space are more likely in Windows. Give it another try with the whole
24091    # argument.
24092    path="$complete"
24093    arguments="EOL"
24094    new_path="$path"
24095
24096  windows_path="$new_path"
24097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24098    unix_path=`$CYGPATH -u "$windows_path"`
24099    new_path="$unix_path"
24100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24102    new_path="$unix_path"
24103  fi
24104
24105
24106    new_path=`$WHICH "$new_path" 2> /dev/null`
24107
24108    if test "x$new_path" = x; then
24109      # It's still not found. Now this is an unrecoverable error.
24110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24111$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24112      has_space=`$ECHO "$complete" | $GREP " "`
24113      if test "x$has_space" != x; then
24114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24116      fi
24117      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24118    fi
24119  fi
24120
24121  # Now new_path has a complete unix path to the binary
24122  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24123    # Keep paths in /bin as-is, but remove trailing .exe if any
24124    new_path="${new_path/%.exe/}"
24125    # Do not save /bin paths to all_fixpath_prefixes!
24126  else
24127    # Not in mixed or Windows style, start by that.
24128    new_path=`cmd //c echo $new_path`
24129
24130  input_path="$new_path"
24131  # Check if we need to convert this using DOS-style short mode. If the path
24132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24133  # take no chances and rewrite it.
24134  # Note: m4 eats our [], so we need to use [ and ] instead.
24135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24136  if test "x$has_forbidden_chars" != x; then
24137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24139  fi
24140
24141    # Output is in $new_path
24142
24143  windows_path="$new_path"
24144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24145    unix_path=`$CYGPATH -u "$windows_path"`
24146    new_path="$unix_path"
24147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24149    new_path="$unix_path"
24150  fi
24151
24152    # remove trailing .exe if any
24153    new_path="${new_path/%.exe/}"
24154
24155    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24156    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24157  fi
24158
24159  else
24160    # We're on a posix platform. Hooray! :)
24161    # First separate the path from the arguments. This will split at the first
24162    # space.
24163    complete="$WINAR"
24164    path="${complete%% *}"
24165    tmp="$complete EOL"
24166    arguments="${tmp#* }"
24167
24168    # Cannot rely on the command "which" here since it doesn't always work.
24169    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24170    if test -z "$is_absolute_path"; then
24171      # Path to executable is not absolute. Find it.
24172      IFS_save="$IFS"
24173      IFS=:
24174      for p in $PATH; do
24175        if test -f "$p/$path" && test -x "$p/$path"; then
24176          new_path="$p/$path"
24177          break
24178        fi
24179      done
24180      IFS="$IFS_save"
24181    else
24182      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24183$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24184      new_path="$path"
24185    fi
24186
24187    if test "x$new_path" = x; then
24188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24189$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24190      has_space=`$ECHO "$complete" | $GREP " "`
24191      if test "x$has_space" != x; then
24192        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24193$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24194      fi
24195      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24196    fi
24197  fi
24198
24199  # Now join together the path and the arguments once again
24200  if test "x$arguments" != xEOL; then
24201    new_complete="$new_path ${arguments% *}"
24202  else
24203    new_complete="$new_path"
24204  fi
24205
24206  if test "x$complete" != "x$new_complete"; then
24207    WINAR="$new_complete"
24208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24209$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24210  fi
24211
24212  AR="$WINAR"
24213  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24214
24215  # Extract the first word of "dumpbin", so it can be a program name with args.
24216set dummy dumpbin; ac_word=$2
24217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24218$as_echo_n "checking for $ac_word... " >&6; }
24219if ${ac_cv_prog_DUMPBIN+:} false; then :
24220  $as_echo_n "(cached) " >&6
24221else
24222  if test -n "$DUMPBIN"; then
24223  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24224else
24225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24226for as_dir in $PATH
24227do
24228  IFS=$as_save_IFS
24229  test -z "$as_dir" && as_dir=.
24230    for ac_exec_ext in '' $ac_executable_extensions; do
24231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24232    ac_cv_prog_DUMPBIN="dumpbin"
24233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24234    break 2
24235  fi
24236done
24237  done
24238IFS=$as_save_IFS
24239
24240fi
24241fi
24242DUMPBIN=$ac_cv_prog_DUMPBIN
24243if test -n "$DUMPBIN"; then
24244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24245$as_echo "$DUMPBIN" >&6; }
24246else
24247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24248$as_echo "no" >&6; }
24249fi
24250
24251
24252
24253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24254
24255  # First separate the path from the arguments. This will split at the first
24256  # space.
24257  complete="$DUMPBIN"
24258  path="${complete%% *}"
24259  tmp="$complete EOL"
24260  arguments="${tmp#* }"
24261
24262  # Input might be given as Windows format, start by converting to
24263  # unix format.
24264  new_path=`$CYGPATH -u "$path"`
24265
24266  # Now try to locate executable using which
24267  new_path=`$WHICH "$new_path" 2> /dev/null`
24268  # bat and cmd files are not always considered executable in cygwin causing which
24269  # to not find them
24270  if test "x$new_path" = x \
24271      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24272      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24273    new_path=`$CYGPATH -u "$path"`
24274  fi
24275  if test "x$new_path" = x; then
24276    # Oops. Which didn't find the executable.
24277    # The splitting of arguments from the executable at a space might have been incorrect,
24278    # since paths with space are more likely in Windows. Give it another try with the whole
24279    # argument.
24280    path="$complete"
24281    arguments="EOL"
24282    new_path=`$CYGPATH -u "$path"`
24283    new_path=`$WHICH "$new_path" 2> /dev/null`
24284    # bat and cmd files are not always considered executable in cygwin causing which
24285    # to not find them
24286    if test "x$new_path" = x \
24287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24289      new_path=`$CYGPATH -u "$path"`
24290    fi
24291    if test "x$new_path" = x; then
24292      # It's still not found. Now this is an unrecoverable error.
24293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24294$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24295      has_space=`$ECHO "$complete" | $GREP " "`
24296      if test "x$has_space" != x; then
24297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24299      fi
24300      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24301    fi
24302  fi
24303
24304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24307  # "foo.exe" is OK but "foo" is an error.
24308  #
24309  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24310  # It is also a way to make sure we got the proper file name for the real test later on.
24311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24312  if test "x$test_shortpath" = x; then
24313    # Short path failed, file does not exist as specified.
24314    # Try adding .exe or .cmd
24315    if test -f "${new_path}.exe"; then
24316      input_to_shortpath="${new_path}.exe"
24317    elif test -f "${new_path}.cmd"; then
24318      input_to_shortpath="${new_path}.cmd"
24319    else
24320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24321$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24322      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24323$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24324      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24325    fi
24326  else
24327    input_to_shortpath="$new_path"
24328  fi
24329
24330  # Call helper function which possibly converts this using DOS-style short mode.
24331  # If so, the updated path is stored in $new_path.
24332  new_path="$input_to_shortpath"
24333
24334  input_path="$input_to_shortpath"
24335  # Check if we need to convert this using DOS-style short mode. If the path
24336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24337  # take no chances and rewrite it.
24338  # Note: m4 eats our [], so we need to use [ and ] instead.
24339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24340  if test "x$has_forbidden_chars" != x; then
24341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24345      # Going to short mode and back again did indeed matter. Since short mode is
24346      # case insensitive, let's make it lowercase to improve readability.
24347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24348      # Now convert it back to Unix-stile (cygpath)
24349      input_path=`$CYGPATH -u "$shortmode_path"`
24350      new_path="$input_path"
24351    fi
24352  fi
24353
24354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24355  if test "x$test_cygdrive_prefix" = x; then
24356    # As a simple fix, exclude /usr/bin since it's not a real path.
24357    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24359      # a path prefixed by /cygdrive for fixpath to work.
24360      new_path="$CYGWIN_ROOT_PATH$input_path"
24361    fi
24362  fi
24363
24364  # remove trailing .exe if any
24365  new_path="${new_path/%.exe/}"
24366
24367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24368
24369  # First separate the path from the arguments. This will split at the first
24370  # space.
24371  complete="$DUMPBIN"
24372  path="${complete%% *}"
24373  tmp="$complete EOL"
24374  arguments="${tmp#* }"
24375
24376  # Input might be given as Windows format, start by converting to
24377  # unix format.
24378  new_path="$path"
24379
24380  windows_path="$new_path"
24381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24382    unix_path=`$CYGPATH -u "$windows_path"`
24383    new_path="$unix_path"
24384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24386    new_path="$unix_path"
24387  fi
24388
24389
24390  # Now try to locate executable using which
24391  new_path=`$WHICH "$new_path" 2> /dev/null`
24392
24393  if test "x$new_path" = x; then
24394    # Oops. Which didn't find the executable.
24395    # The splitting of arguments from the executable at a space might have been incorrect,
24396    # since paths with space are more likely in Windows. Give it another try with the whole
24397    # argument.
24398    path="$complete"
24399    arguments="EOL"
24400    new_path="$path"
24401
24402  windows_path="$new_path"
24403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24404    unix_path=`$CYGPATH -u "$windows_path"`
24405    new_path="$unix_path"
24406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24408    new_path="$unix_path"
24409  fi
24410
24411
24412    new_path=`$WHICH "$new_path" 2> /dev/null`
24413
24414    if test "x$new_path" = x; then
24415      # It's still not found. Now this is an unrecoverable error.
24416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24417$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24418      has_space=`$ECHO "$complete" | $GREP " "`
24419      if test "x$has_space" != x; then
24420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24422      fi
24423      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24424    fi
24425  fi
24426
24427  # Now new_path has a complete unix path to the binary
24428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24429    # Keep paths in /bin as-is, but remove trailing .exe if any
24430    new_path="${new_path/%.exe/}"
24431    # Do not save /bin paths to all_fixpath_prefixes!
24432  else
24433    # Not in mixed or Windows style, start by that.
24434    new_path=`cmd //c echo $new_path`
24435
24436  input_path="$new_path"
24437  # Check if we need to convert this using DOS-style short mode. If the path
24438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24439  # take no chances and rewrite it.
24440  # Note: m4 eats our [], so we need to use [ and ] instead.
24441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24442  if test "x$has_forbidden_chars" != x; then
24443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24445  fi
24446
24447    # Output is in $new_path
24448
24449  windows_path="$new_path"
24450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24451    unix_path=`$CYGPATH -u "$windows_path"`
24452    new_path="$unix_path"
24453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24455    new_path="$unix_path"
24456  fi
24457
24458    # remove trailing .exe if any
24459    new_path="${new_path/%.exe/}"
24460
24461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24463  fi
24464
24465  else
24466    # We're on a posix platform. Hooray! :)
24467    # First separate the path from the arguments. This will split at the first
24468    # space.
24469    complete="$DUMPBIN"
24470    path="${complete%% *}"
24471    tmp="$complete EOL"
24472    arguments="${tmp#* }"
24473
24474    # Cannot rely on the command "which" here since it doesn't always work.
24475    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24476    if test -z "$is_absolute_path"; then
24477      # Path to executable is not absolute. Find it.
24478      IFS_save="$IFS"
24479      IFS=:
24480      for p in $PATH; do
24481        if test -f "$p/$path" && test -x "$p/$path"; then
24482          new_path="$p/$path"
24483          break
24484        fi
24485      done
24486      IFS="$IFS_save"
24487    else
24488      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24489$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24490      new_path="$path"
24491    fi
24492
24493    if test "x$new_path" = x; then
24494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24495$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24496      has_space=`$ECHO "$complete" | $GREP " "`
24497      if test "x$has_space" != x; then
24498        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24500      fi
24501      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24502    fi
24503  fi
24504
24505  # Now join together the path and the arguments once again
24506  if test "x$arguments" != xEOL; then
24507    new_complete="$new_path ${arguments% *}"
24508  else
24509    new_complete="$new_path"
24510  fi
24511
24512  if test "x$complete" != "x$new_complete"; then
24513    DUMPBIN="$new_complete"
24514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24515$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24516  fi
24517
24518
24519      COMPILER_TYPE=CL
24520      CCXXFLAGS="$CCXXFLAGS -nologo"
24521
24522fi
24523
24524
24525
24526  ac_ext=c
24527ac_cpp='$CPP $CPPFLAGS'
24528ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24529ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24530ac_compiler_gnu=$ac_cv_c_compiler_gnu
24531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24532$as_echo_n "checking how to run the C preprocessor... " >&6; }
24533# On Suns, sometimes $CPP names a directory.
24534if test -n "$CPP" && test -d "$CPP"; then
24535  CPP=
24536fi
24537if test -z "$CPP"; then
24538  if ${ac_cv_prog_CPP+:} false; then :
24539  $as_echo_n "(cached) " >&6
24540else
24541      # Double quotes because CPP needs to be expanded
24542    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24543    do
24544      ac_preproc_ok=false
24545for ac_c_preproc_warn_flag in '' yes
24546do
24547  # Use a header file that comes with gcc, so configuring glibc
24548  # with a fresh cross-compiler works.
24549  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24550  # <limits.h> exists even on freestanding compilers.
24551  # On the NeXT, cc -E runs the code through the compiler's parser,
24552  # not just through cpp. "Syntax error" is here to catch this case.
24553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554/* end confdefs.h.  */
24555#ifdef __STDC__
24556# include <limits.h>
24557#else
24558# include <assert.h>
24559#endif
24560		     Syntax error
24561_ACEOF
24562if ac_fn_c_try_cpp "$LINENO"; then :
24563
24564else
24565  # Broken: fails on valid input.
24566continue
24567fi
24568rm -f conftest.err conftest.i conftest.$ac_ext
24569
24570  # OK, works on sane cases.  Now check whether nonexistent headers
24571  # can be detected and how.
24572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24573/* end confdefs.h.  */
24574#include <ac_nonexistent.h>
24575_ACEOF
24576if ac_fn_c_try_cpp "$LINENO"; then :
24577  # Broken: success on invalid input.
24578continue
24579else
24580  # Passes both tests.
24581ac_preproc_ok=:
24582break
24583fi
24584rm -f conftest.err conftest.i conftest.$ac_ext
24585
24586done
24587# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24588rm -f conftest.i conftest.err conftest.$ac_ext
24589if $ac_preproc_ok; then :
24590  break
24591fi
24592
24593    done
24594    ac_cv_prog_CPP=$CPP
24595
24596fi
24597  CPP=$ac_cv_prog_CPP
24598else
24599  ac_cv_prog_CPP=$CPP
24600fi
24601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24602$as_echo "$CPP" >&6; }
24603ac_preproc_ok=false
24604for ac_c_preproc_warn_flag in '' yes
24605do
24606  # Use a header file that comes with gcc, so configuring glibc
24607  # with a fresh cross-compiler works.
24608  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24609  # <limits.h> exists even on freestanding compilers.
24610  # On the NeXT, cc -E runs the code through the compiler's parser,
24611  # not just through cpp. "Syntax error" is here to catch this case.
24612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24613/* end confdefs.h.  */
24614#ifdef __STDC__
24615# include <limits.h>
24616#else
24617# include <assert.h>
24618#endif
24619		     Syntax error
24620_ACEOF
24621if ac_fn_c_try_cpp "$LINENO"; then :
24622
24623else
24624  # Broken: fails on valid input.
24625continue
24626fi
24627rm -f conftest.err conftest.i conftest.$ac_ext
24628
24629  # OK, works on sane cases.  Now check whether nonexistent headers
24630  # can be detected and how.
24631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24632/* end confdefs.h.  */
24633#include <ac_nonexistent.h>
24634_ACEOF
24635if ac_fn_c_try_cpp "$LINENO"; then :
24636  # Broken: success on invalid input.
24637continue
24638else
24639  # Passes both tests.
24640ac_preproc_ok=:
24641break
24642fi
24643rm -f conftest.err conftest.i conftest.$ac_ext
24644
24645done
24646# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24647rm -f conftest.i conftest.err conftest.$ac_ext
24648if $ac_preproc_ok; then :
24649
24650else
24651  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24653as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24654See \`config.log' for more details" "$LINENO" 5; }
24655fi
24656
24657ac_ext=cpp
24658ac_cpp='$CXXCPP $CPPFLAGS'
24659ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24660ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24661ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24662
24663
24664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24665
24666  # First separate the path from the arguments. This will split at the first
24667  # space.
24668  complete="$CPP"
24669  path="${complete%% *}"
24670  tmp="$complete EOL"
24671  arguments="${tmp#* }"
24672
24673  # Input might be given as Windows format, start by converting to
24674  # unix format.
24675  new_path=`$CYGPATH -u "$path"`
24676
24677  # Now try to locate executable using which
24678  new_path=`$WHICH "$new_path" 2> /dev/null`
24679  # bat and cmd files are not always considered executable in cygwin causing which
24680  # to not find them
24681  if test "x$new_path" = x \
24682      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24683      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24684    new_path=`$CYGPATH -u "$path"`
24685  fi
24686  if test "x$new_path" = x; then
24687    # Oops. Which didn't find the executable.
24688    # The splitting of arguments from the executable at a space might have been incorrect,
24689    # since paths with space are more likely in Windows. Give it another try with the whole
24690    # argument.
24691    path="$complete"
24692    arguments="EOL"
24693    new_path=`$CYGPATH -u "$path"`
24694    new_path=`$WHICH "$new_path" 2> /dev/null`
24695    # bat and cmd files are not always considered executable in cygwin causing which
24696    # to not find them
24697    if test "x$new_path" = x \
24698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24700      new_path=`$CYGPATH -u "$path"`
24701    fi
24702    if test "x$new_path" = x; then
24703      # It's still not found. Now this is an unrecoverable error.
24704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24705$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24706      has_space=`$ECHO "$complete" | $GREP " "`
24707      if test "x$has_space" != x; then
24708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24710      fi
24711      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24712    fi
24713  fi
24714
24715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24718  # "foo.exe" is OK but "foo" is an error.
24719  #
24720  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24721  # It is also a way to make sure we got the proper file name for the real test later on.
24722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24723  if test "x$test_shortpath" = x; then
24724    # Short path failed, file does not exist as specified.
24725    # Try adding .exe or .cmd
24726    if test -f "${new_path}.exe"; then
24727      input_to_shortpath="${new_path}.exe"
24728    elif test -f "${new_path}.cmd"; then
24729      input_to_shortpath="${new_path}.cmd"
24730    else
24731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24732$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24733      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24734$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24735      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24736    fi
24737  else
24738    input_to_shortpath="$new_path"
24739  fi
24740
24741  # Call helper function which possibly converts this using DOS-style short mode.
24742  # If so, the updated path is stored in $new_path.
24743  new_path="$input_to_shortpath"
24744
24745  input_path="$input_to_shortpath"
24746  # Check if we need to convert this using DOS-style short mode. If the path
24747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24748  # take no chances and rewrite it.
24749  # Note: m4 eats our [], so we need to use [ and ] instead.
24750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24751  if test "x$has_forbidden_chars" != x; then
24752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24756      # Going to short mode and back again did indeed matter. Since short mode is
24757      # case insensitive, let's make it lowercase to improve readability.
24758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24759      # Now convert it back to Unix-stile (cygpath)
24760      input_path=`$CYGPATH -u "$shortmode_path"`
24761      new_path="$input_path"
24762    fi
24763  fi
24764
24765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24766  if test "x$test_cygdrive_prefix" = x; then
24767    # As a simple fix, exclude /usr/bin since it's not a real path.
24768    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24770      # a path prefixed by /cygdrive for fixpath to work.
24771      new_path="$CYGWIN_ROOT_PATH$input_path"
24772    fi
24773  fi
24774
24775  # remove trailing .exe if any
24776  new_path="${new_path/%.exe/}"
24777
24778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24779
24780  # First separate the path from the arguments. This will split at the first
24781  # space.
24782  complete="$CPP"
24783  path="${complete%% *}"
24784  tmp="$complete EOL"
24785  arguments="${tmp#* }"
24786
24787  # Input might be given as Windows format, start by converting to
24788  # unix format.
24789  new_path="$path"
24790
24791  windows_path="$new_path"
24792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24793    unix_path=`$CYGPATH -u "$windows_path"`
24794    new_path="$unix_path"
24795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24797    new_path="$unix_path"
24798  fi
24799
24800
24801  # Now try to locate executable using which
24802  new_path=`$WHICH "$new_path" 2> /dev/null`
24803
24804  if test "x$new_path" = x; then
24805    # Oops. Which didn't find the executable.
24806    # The splitting of arguments from the executable at a space might have been incorrect,
24807    # since paths with space are more likely in Windows. Give it another try with the whole
24808    # argument.
24809    path="$complete"
24810    arguments="EOL"
24811    new_path="$path"
24812
24813  windows_path="$new_path"
24814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24815    unix_path=`$CYGPATH -u "$windows_path"`
24816    new_path="$unix_path"
24817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24819    new_path="$unix_path"
24820  fi
24821
24822
24823    new_path=`$WHICH "$new_path" 2> /dev/null`
24824
24825    if test "x$new_path" = x; then
24826      # It's still not found. Now this is an unrecoverable error.
24827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24828$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24829      has_space=`$ECHO "$complete" | $GREP " "`
24830      if test "x$has_space" != x; then
24831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24833      fi
24834      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24835    fi
24836  fi
24837
24838  # Now new_path has a complete unix path to the binary
24839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24840    # Keep paths in /bin as-is, but remove trailing .exe if any
24841    new_path="${new_path/%.exe/}"
24842    # Do not save /bin paths to all_fixpath_prefixes!
24843  else
24844    # Not in mixed or Windows style, start by that.
24845    new_path=`cmd //c echo $new_path`
24846
24847  input_path="$new_path"
24848  # Check if we need to convert this using DOS-style short mode. If the path
24849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24850  # take no chances and rewrite it.
24851  # Note: m4 eats our [], so we need to use [ and ] instead.
24852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24853  if test "x$has_forbidden_chars" != x; then
24854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24856  fi
24857
24858    # Output is in $new_path
24859
24860  windows_path="$new_path"
24861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24862    unix_path=`$CYGPATH -u "$windows_path"`
24863    new_path="$unix_path"
24864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24866    new_path="$unix_path"
24867  fi
24868
24869    # remove trailing .exe if any
24870    new_path="${new_path/%.exe/}"
24871
24872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24874  fi
24875
24876  else
24877    # We're on a posix platform. Hooray! :)
24878    # First separate the path from the arguments. This will split at the first
24879    # space.
24880    complete="$CPP"
24881    path="${complete%% *}"
24882    tmp="$complete EOL"
24883    arguments="${tmp#* }"
24884
24885    # Cannot rely on the command "which" here since it doesn't always work.
24886    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24887    if test -z "$is_absolute_path"; then
24888      # Path to executable is not absolute. Find it.
24889      IFS_save="$IFS"
24890      IFS=:
24891      for p in $PATH; do
24892        if test -f "$p/$path" && test -x "$p/$path"; then
24893          new_path="$p/$path"
24894          break
24895        fi
24896      done
24897      IFS="$IFS_save"
24898    else
24899      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24900$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24901      new_path="$path"
24902    fi
24903
24904    if test "x$new_path" = x; then
24905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24906$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24907      has_space=`$ECHO "$complete" | $GREP " "`
24908      if test "x$has_space" != x; then
24909        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24910$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24911      fi
24912      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24913    fi
24914  fi
24915
24916  # Now join together the path and the arguments once again
24917  if test "x$arguments" != xEOL; then
24918    new_complete="$new_path ${arguments% *}"
24919  else
24920    new_complete="$new_path"
24921  fi
24922
24923  if test "x$complete" != "x$new_complete"; then
24924    CPP="$new_complete"
24925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24926$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24927  fi
24928
24929
24930  ac_ext=cpp
24931ac_cpp='$CXXCPP $CPPFLAGS'
24932ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24933ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24934ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24936$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24937if test -z "$CXXCPP"; then
24938  if ${ac_cv_prog_CXXCPP+:} false; then :
24939  $as_echo_n "(cached) " >&6
24940else
24941      # Double quotes because CXXCPP needs to be expanded
24942    for CXXCPP in "$CXX -E" "/lib/cpp"
24943    do
24944      ac_preproc_ok=false
24945for ac_cxx_preproc_warn_flag in '' yes
24946do
24947  # Use a header file that comes with gcc, so configuring glibc
24948  # with a fresh cross-compiler works.
24949  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24950  # <limits.h> exists even on freestanding compilers.
24951  # On the NeXT, cc -E runs the code through the compiler's parser,
24952  # not just through cpp. "Syntax error" is here to catch this case.
24953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24954/* end confdefs.h.  */
24955#ifdef __STDC__
24956# include <limits.h>
24957#else
24958# include <assert.h>
24959#endif
24960		     Syntax error
24961_ACEOF
24962if ac_fn_cxx_try_cpp "$LINENO"; then :
24963
24964else
24965  # Broken: fails on valid input.
24966continue
24967fi
24968rm -f conftest.err conftest.i conftest.$ac_ext
24969
24970  # OK, works on sane cases.  Now check whether nonexistent headers
24971  # can be detected and how.
24972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24973/* end confdefs.h.  */
24974#include <ac_nonexistent.h>
24975_ACEOF
24976if ac_fn_cxx_try_cpp "$LINENO"; then :
24977  # Broken: success on invalid input.
24978continue
24979else
24980  # Passes both tests.
24981ac_preproc_ok=:
24982break
24983fi
24984rm -f conftest.err conftest.i conftest.$ac_ext
24985
24986done
24987# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24988rm -f conftest.i conftest.err conftest.$ac_ext
24989if $ac_preproc_ok; then :
24990  break
24991fi
24992
24993    done
24994    ac_cv_prog_CXXCPP=$CXXCPP
24995
24996fi
24997  CXXCPP=$ac_cv_prog_CXXCPP
24998else
24999  ac_cv_prog_CXXCPP=$CXXCPP
25000fi
25001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25002$as_echo "$CXXCPP" >&6; }
25003ac_preproc_ok=false
25004for ac_cxx_preproc_warn_flag in '' yes
25005do
25006  # Use a header file that comes with gcc, so configuring glibc
25007  # with a fresh cross-compiler works.
25008  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25009  # <limits.h> exists even on freestanding compilers.
25010  # On the NeXT, cc -E runs the code through the compiler's parser,
25011  # not just through cpp. "Syntax error" is here to catch this case.
25012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25013/* end confdefs.h.  */
25014#ifdef __STDC__
25015# include <limits.h>
25016#else
25017# include <assert.h>
25018#endif
25019		     Syntax error
25020_ACEOF
25021if ac_fn_cxx_try_cpp "$LINENO"; then :
25022
25023else
25024  # Broken: fails on valid input.
25025continue
25026fi
25027rm -f conftest.err conftest.i conftest.$ac_ext
25028
25029  # OK, works on sane cases.  Now check whether nonexistent headers
25030  # can be detected and how.
25031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25032/* end confdefs.h.  */
25033#include <ac_nonexistent.h>
25034_ACEOF
25035if ac_fn_cxx_try_cpp "$LINENO"; then :
25036  # Broken: success on invalid input.
25037continue
25038else
25039  # Passes both tests.
25040ac_preproc_ok=:
25041break
25042fi
25043rm -f conftest.err conftest.i conftest.$ac_ext
25044
25045done
25046# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25047rm -f conftest.i conftest.err conftest.$ac_ext
25048if $ac_preproc_ok; then :
25049
25050else
25051  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25053as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25054See \`config.log' for more details" "$LINENO" 5; }
25055fi
25056
25057ac_ext=cpp
25058ac_cpp='$CXXCPP $CPPFLAGS'
25059ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25060ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25061ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25062
25063
25064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25065
25066  # First separate the path from the arguments. This will split at the first
25067  # space.
25068  complete="$CXXCPP"
25069  path="${complete%% *}"
25070  tmp="$complete EOL"
25071  arguments="${tmp#* }"
25072
25073  # Input might be given as Windows format, start by converting to
25074  # unix format.
25075  new_path=`$CYGPATH -u "$path"`
25076
25077  # Now try to locate executable using which
25078  new_path=`$WHICH "$new_path" 2> /dev/null`
25079  # bat and cmd files are not always considered executable in cygwin causing which
25080  # to not find them
25081  if test "x$new_path" = x \
25082      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25083      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25084    new_path=`$CYGPATH -u "$path"`
25085  fi
25086  if test "x$new_path" = x; then
25087    # Oops. Which didn't find the executable.
25088    # The splitting of arguments from the executable at a space might have been incorrect,
25089    # since paths with space are more likely in Windows. Give it another try with the whole
25090    # argument.
25091    path="$complete"
25092    arguments="EOL"
25093    new_path=`$CYGPATH -u "$path"`
25094    new_path=`$WHICH "$new_path" 2> /dev/null`
25095    # bat and cmd files are not always considered executable in cygwin causing which
25096    # to not find them
25097    if test "x$new_path" = x \
25098        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25099        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25100      new_path=`$CYGPATH -u "$path"`
25101    fi
25102    if test "x$new_path" = x; then
25103      # It's still not found. Now this is an unrecoverable error.
25104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25105$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25106      has_space=`$ECHO "$complete" | $GREP " "`
25107      if test "x$has_space" != x; then
25108        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25109$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25110      fi
25111      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25112    fi
25113  fi
25114
25115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25118  # "foo.exe" is OK but "foo" is an error.
25119  #
25120  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25121  # It is also a way to make sure we got the proper file name for the real test later on.
25122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25123  if test "x$test_shortpath" = x; then
25124    # Short path failed, file does not exist as specified.
25125    # Try adding .exe or .cmd
25126    if test -f "${new_path}.exe"; then
25127      input_to_shortpath="${new_path}.exe"
25128    elif test -f "${new_path}.cmd"; then
25129      input_to_shortpath="${new_path}.cmd"
25130    else
25131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25132$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25133      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25134$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25135      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25136    fi
25137  else
25138    input_to_shortpath="$new_path"
25139  fi
25140
25141  # Call helper function which possibly converts this using DOS-style short mode.
25142  # If so, the updated path is stored in $new_path.
25143  new_path="$input_to_shortpath"
25144
25145  input_path="$input_to_shortpath"
25146  # Check if we need to convert this using DOS-style short mode. If the path
25147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25148  # take no chances and rewrite it.
25149  # Note: m4 eats our [], so we need to use [ and ] instead.
25150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25151  if test "x$has_forbidden_chars" != x; then
25152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25156      # Going to short mode and back again did indeed matter. Since short mode is
25157      # case insensitive, let's make it lowercase to improve readability.
25158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25159      # Now convert it back to Unix-stile (cygpath)
25160      input_path=`$CYGPATH -u "$shortmode_path"`
25161      new_path="$input_path"
25162    fi
25163  fi
25164
25165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25166  if test "x$test_cygdrive_prefix" = x; then
25167    # As a simple fix, exclude /usr/bin since it's not a real path.
25168    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25170      # a path prefixed by /cygdrive for fixpath to work.
25171      new_path="$CYGWIN_ROOT_PATH$input_path"
25172    fi
25173  fi
25174
25175  # remove trailing .exe if any
25176  new_path="${new_path/%.exe/}"
25177
25178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25179
25180  # First separate the path from the arguments. This will split at the first
25181  # space.
25182  complete="$CXXCPP"
25183  path="${complete%% *}"
25184  tmp="$complete EOL"
25185  arguments="${tmp#* }"
25186
25187  # Input might be given as Windows format, start by converting to
25188  # unix format.
25189  new_path="$path"
25190
25191  windows_path="$new_path"
25192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25193    unix_path=`$CYGPATH -u "$windows_path"`
25194    new_path="$unix_path"
25195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25197    new_path="$unix_path"
25198  fi
25199
25200
25201  # Now try to locate executable using which
25202  new_path=`$WHICH "$new_path" 2> /dev/null`
25203
25204  if test "x$new_path" = x; then
25205    # Oops. Which didn't find the executable.
25206    # The splitting of arguments from the executable at a space might have been incorrect,
25207    # since paths with space are more likely in Windows. Give it another try with the whole
25208    # argument.
25209    path="$complete"
25210    arguments="EOL"
25211    new_path="$path"
25212
25213  windows_path="$new_path"
25214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25215    unix_path=`$CYGPATH -u "$windows_path"`
25216    new_path="$unix_path"
25217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25219    new_path="$unix_path"
25220  fi
25221
25222
25223    new_path=`$WHICH "$new_path" 2> /dev/null`
25224
25225    if test "x$new_path" = x; then
25226      # It's still not found. Now this is an unrecoverable error.
25227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25228$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25229      has_space=`$ECHO "$complete" | $GREP " "`
25230      if test "x$has_space" != x; then
25231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25233      fi
25234      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25235    fi
25236  fi
25237
25238  # Now new_path has a complete unix path to the binary
25239  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25240    # Keep paths in /bin as-is, but remove trailing .exe if any
25241    new_path="${new_path/%.exe/}"
25242    # Do not save /bin paths to all_fixpath_prefixes!
25243  else
25244    # Not in mixed or Windows style, start by that.
25245    new_path=`cmd //c echo $new_path`
25246
25247  input_path="$new_path"
25248  # Check if we need to convert this using DOS-style short mode. If the path
25249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25250  # take no chances and rewrite it.
25251  # Note: m4 eats our [], so we need to use [ and ] instead.
25252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25253  if test "x$has_forbidden_chars" != x; then
25254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25256  fi
25257
25258    # Output is in $new_path
25259
25260  windows_path="$new_path"
25261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25262    unix_path=`$CYGPATH -u "$windows_path"`
25263    new_path="$unix_path"
25264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25266    new_path="$unix_path"
25267  fi
25268
25269    # remove trailing .exe if any
25270    new_path="${new_path/%.exe/}"
25271
25272    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25273    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25274  fi
25275
25276  else
25277    # We're on a posix platform. Hooray! :)
25278    # First separate the path from the arguments. This will split at the first
25279    # space.
25280    complete="$CXXCPP"
25281    path="${complete%% *}"
25282    tmp="$complete EOL"
25283    arguments="${tmp#* }"
25284
25285    # Cannot rely on the command "which" here since it doesn't always work.
25286    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25287    if test -z "$is_absolute_path"; then
25288      # Path to executable is not absolute. Find it.
25289      IFS_save="$IFS"
25290      IFS=:
25291      for p in $PATH; do
25292        if test -f "$p/$path" && test -x "$p/$path"; then
25293          new_path="$p/$path"
25294          break
25295        fi
25296      done
25297      IFS="$IFS_save"
25298    else
25299      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25300$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25301      new_path="$path"
25302    fi
25303
25304    if test "x$new_path" = x; then
25305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25306$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25307      has_space=`$ECHO "$complete" | $GREP " "`
25308      if test "x$has_space" != x; then
25309        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25310$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25311      fi
25312      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25313    fi
25314  fi
25315
25316  # Now join together the path and the arguments once again
25317  if test "x$arguments" != xEOL; then
25318    new_complete="$new_path ${arguments% *}"
25319  else
25320    new_complete="$new_path"
25321  fi
25322
25323  if test "x$complete" != "x$new_complete"; then
25324    CXXCPP="$new_complete"
25325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25326$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25327  fi
25328
25329
25330  if test "x$COMPILE_TYPE" != "xcross"; then
25331    # If we are not cross compiling, use the same compilers for
25332    # building the build platform executables. The cross-compilation
25333    # case needed to be done earlier, but this can only be done after
25334    # the native tools have been localized.
25335    BUILD_CC="$CC"
25336    BUILD_CXX="$CXX"
25337    BUILD_LD="$LD"
25338  fi
25339
25340  # for solaris we really need solaris tools, and not gnu equivalent
25341  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25342  #   starting to probe
25343  #
25344  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25345  #         so that it can be overriden --with-tools-dir
25346  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25347    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25348  fi
25349
25350  # Find the right assembler.
25351  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25352    # Extract the first word of "as", so it can be a program name with args.
25353set dummy as; ac_word=$2
25354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25355$as_echo_n "checking for $ac_word... " >&6; }
25356if ${ac_cv_path_AS+:} false; then :
25357  $as_echo_n "(cached) " >&6
25358else
25359  case $AS in
25360  [\\/]* | ?:[\\/]*)
25361  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25362  ;;
25363  *)
25364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25365for as_dir in $PATH
25366do
25367  IFS=$as_save_IFS
25368  test -z "$as_dir" && as_dir=.
25369    for ac_exec_ext in '' $ac_executable_extensions; do
25370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25371    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25373    break 2
25374  fi
25375done
25376  done
25377IFS=$as_save_IFS
25378
25379  ;;
25380esac
25381fi
25382AS=$ac_cv_path_AS
25383if test -n "$AS"; then
25384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25385$as_echo "$AS" >&6; }
25386else
25387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25388$as_echo "no" >&6; }
25389fi
25390
25391
25392
25393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25394
25395  # First separate the path from the arguments. This will split at the first
25396  # space.
25397  complete="$AS"
25398  path="${complete%% *}"
25399  tmp="$complete EOL"
25400  arguments="${tmp#* }"
25401
25402  # Input might be given as Windows format, start by converting to
25403  # unix format.
25404  new_path=`$CYGPATH -u "$path"`
25405
25406  # Now try to locate executable using which
25407  new_path=`$WHICH "$new_path" 2> /dev/null`
25408  # bat and cmd files are not always considered executable in cygwin causing which
25409  # to not find them
25410  if test "x$new_path" = x \
25411      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25412      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25413    new_path=`$CYGPATH -u "$path"`
25414  fi
25415  if test "x$new_path" = x; then
25416    # Oops. Which didn't find the executable.
25417    # The splitting of arguments from the executable at a space might have been incorrect,
25418    # since paths with space are more likely in Windows. Give it another try with the whole
25419    # argument.
25420    path="$complete"
25421    arguments="EOL"
25422    new_path=`$CYGPATH -u "$path"`
25423    new_path=`$WHICH "$new_path" 2> /dev/null`
25424    # bat and cmd files are not always considered executable in cygwin causing which
25425    # to not find them
25426    if test "x$new_path" = x \
25427        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25428        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25429      new_path=`$CYGPATH -u "$path"`
25430    fi
25431    if test "x$new_path" = x; then
25432      # It's still not found. Now this is an unrecoverable error.
25433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25434$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25435      has_space=`$ECHO "$complete" | $GREP " "`
25436      if test "x$has_space" != x; then
25437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25439      fi
25440      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25441    fi
25442  fi
25443
25444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25447  # "foo.exe" is OK but "foo" is an error.
25448  #
25449  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25450  # It is also a way to make sure we got the proper file name for the real test later on.
25451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25452  if test "x$test_shortpath" = x; then
25453    # Short path failed, file does not exist as specified.
25454    # Try adding .exe or .cmd
25455    if test -f "${new_path}.exe"; then
25456      input_to_shortpath="${new_path}.exe"
25457    elif test -f "${new_path}.cmd"; then
25458      input_to_shortpath="${new_path}.cmd"
25459    else
25460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25461$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25462      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25463$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25464      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25465    fi
25466  else
25467    input_to_shortpath="$new_path"
25468  fi
25469
25470  # Call helper function which possibly converts this using DOS-style short mode.
25471  # If so, the updated path is stored in $new_path.
25472  new_path="$input_to_shortpath"
25473
25474  input_path="$input_to_shortpath"
25475  # Check if we need to convert this using DOS-style short mode. If the path
25476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25477  # take no chances and rewrite it.
25478  # Note: m4 eats our [], so we need to use [ and ] instead.
25479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25480  if test "x$has_forbidden_chars" != x; then
25481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25485      # Going to short mode and back again did indeed matter. Since short mode is
25486      # case insensitive, let's make it lowercase to improve readability.
25487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25488      # Now convert it back to Unix-stile (cygpath)
25489      input_path=`$CYGPATH -u "$shortmode_path"`
25490      new_path="$input_path"
25491    fi
25492  fi
25493
25494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25495  if test "x$test_cygdrive_prefix" = x; then
25496    # As a simple fix, exclude /usr/bin since it's not a real path.
25497    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25499      # a path prefixed by /cygdrive for fixpath to work.
25500      new_path="$CYGWIN_ROOT_PATH$input_path"
25501    fi
25502  fi
25503
25504  # remove trailing .exe if any
25505  new_path="${new_path/%.exe/}"
25506
25507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25508
25509  # First separate the path from the arguments. This will split at the first
25510  # space.
25511  complete="$AS"
25512  path="${complete%% *}"
25513  tmp="$complete EOL"
25514  arguments="${tmp#* }"
25515
25516  # Input might be given as Windows format, start by converting to
25517  # unix format.
25518  new_path="$path"
25519
25520  windows_path="$new_path"
25521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25522    unix_path=`$CYGPATH -u "$windows_path"`
25523    new_path="$unix_path"
25524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25526    new_path="$unix_path"
25527  fi
25528
25529
25530  # Now try to locate executable using which
25531  new_path=`$WHICH "$new_path" 2> /dev/null`
25532
25533  if test "x$new_path" = x; then
25534    # Oops. Which didn't find the executable.
25535    # The splitting of arguments from the executable at a space might have been incorrect,
25536    # since paths with space are more likely in Windows. Give it another try with the whole
25537    # argument.
25538    path="$complete"
25539    arguments="EOL"
25540    new_path="$path"
25541
25542  windows_path="$new_path"
25543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25544    unix_path=`$CYGPATH -u "$windows_path"`
25545    new_path="$unix_path"
25546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25548    new_path="$unix_path"
25549  fi
25550
25551
25552    new_path=`$WHICH "$new_path" 2> /dev/null`
25553
25554    if test "x$new_path" = x; then
25555      # It's still not found. Now this is an unrecoverable error.
25556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25557$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25558      has_space=`$ECHO "$complete" | $GREP " "`
25559      if test "x$has_space" != x; then
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25561$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25562      fi
25563      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25564    fi
25565  fi
25566
25567  # Now new_path has a complete unix path to the binary
25568  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25569    # Keep paths in /bin as-is, but remove trailing .exe if any
25570    new_path="${new_path/%.exe/}"
25571    # Do not save /bin paths to all_fixpath_prefixes!
25572  else
25573    # Not in mixed or Windows style, start by that.
25574    new_path=`cmd //c echo $new_path`
25575
25576  input_path="$new_path"
25577  # Check if we need to convert this using DOS-style short mode. If the path
25578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25579  # take no chances and rewrite it.
25580  # Note: m4 eats our [], so we need to use [ and ] instead.
25581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25582  if test "x$has_forbidden_chars" != x; then
25583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25585  fi
25586
25587    # Output is in $new_path
25588
25589  windows_path="$new_path"
25590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25591    unix_path=`$CYGPATH -u "$windows_path"`
25592    new_path="$unix_path"
25593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25595    new_path="$unix_path"
25596  fi
25597
25598    # remove trailing .exe if any
25599    new_path="${new_path/%.exe/}"
25600
25601    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25602    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25603  fi
25604
25605  else
25606    # We're on a posix platform. Hooray! :)
25607    # First separate the path from the arguments. This will split at the first
25608    # space.
25609    complete="$AS"
25610    path="${complete%% *}"
25611    tmp="$complete EOL"
25612    arguments="${tmp#* }"
25613
25614    # Cannot rely on the command "which" here since it doesn't always work.
25615    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25616    if test -z "$is_absolute_path"; then
25617      # Path to executable is not absolute. Find it.
25618      IFS_save="$IFS"
25619      IFS=:
25620      for p in $PATH; do
25621        if test -f "$p/$path" && test -x "$p/$path"; then
25622          new_path="$p/$path"
25623          break
25624        fi
25625      done
25626      IFS="$IFS_save"
25627    else
25628      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25629$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25630      new_path="$path"
25631    fi
25632
25633    if test "x$new_path" = x; then
25634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25635$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25636      has_space=`$ECHO "$complete" | $GREP " "`
25637      if test "x$has_space" != x; then
25638        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25639$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25640      fi
25641      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25642    fi
25643  fi
25644
25645  # Now join together the path and the arguments once again
25646  if test "x$arguments" != xEOL; then
25647    new_complete="$new_path ${arguments% *}"
25648  else
25649    new_complete="$new_path"
25650  fi
25651
25652  if test "x$complete" != "x$new_complete"; then
25653    AS="$new_complete"
25654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25655$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25656  fi
25657
25658  else
25659    AS="$CC -c"
25660  fi
25661
25662
25663  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25664    # Extract the first word of "nm", so it can be a program name with args.
25665set dummy nm; ac_word=$2
25666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25667$as_echo_n "checking for $ac_word... " >&6; }
25668if ${ac_cv_path_NM+:} false; then :
25669  $as_echo_n "(cached) " >&6
25670else
25671  case $NM in
25672  [\\/]* | ?:[\\/]*)
25673  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25674  ;;
25675  *)
25676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25677for as_dir in $PATH
25678do
25679  IFS=$as_save_IFS
25680  test -z "$as_dir" && as_dir=.
25681    for ac_exec_ext in '' $ac_executable_extensions; do
25682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25683    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25685    break 2
25686  fi
25687done
25688  done
25689IFS=$as_save_IFS
25690
25691  ;;
25692esac
25693fi
25694NM=$ac_cv_path_NM
25695if test -n "$NM"; then
25696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25697$as_echo "$NM" >&6; }
25698else
25699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25700$as_echo "no" >&6; }
25701fi
25702
25703
25704
25705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25706
25707  # First separate the path from the arguments. This will split at the first
25708  # space.
25709  complete="$NM"
25710  path="${complete%% *}"
25711  tmp="$complete EOL"
25712  arguments="${tmp#* }"
25713
25714  # Input might be given as Windows format, start by converting to
25715  # unix format.
25716  new_path=`$CYGPATH -u "$path"`
25717
25718  # Now try to locate executable using which
25719  new_path=`$WHICH "$new_path" 2> /dev/null`
25720  # bat and cmd files are not always considered executable in cygwin causing which
25721  # to not find them
25722  if test "x$new_path" = x \
25723      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25724      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25725    new_path=`$CYGPATH -u "$path"`
25726  fi
25727  if test "x$new_path" = x; then
25728    # Oops. Which didn't find the executable.
25729    # The splitting of arguments from the executable at a space might have been incorrect,
25730    # since paths with space are more likely in Windows. Give it another try with the whole
25731    # argument.
25732    path="$complete"
25733    arguments="EOL"
25734    new_path=`$CYGPATH -u "$path"`
25735    new_path=`$WHICH "$new_path" 2> /dev/null`
25736    # bat and cmd files are not always considered executable in cygwin causing which
25737    # to not find them
25738    if test "x$new_path" = x \
25739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25741      new_path=`$CYGPATH -u "$path"`
25742    fi
25743    if test "x$new_path" = x; then
25744      # It's still not found. Now this is an unrecoverable error.
25745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25746$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25747      has_space=`$ECHO "$complete" | $GREP " "`
25748      if test "x$has_space" != x; then
25749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25751      fi
25752      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25753    fi
25754  fi
25755
25756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25759  # "foo.exe" is OK but "foo" is an error.
25760  #
25761  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25762  # It is also a way to make sure we got the proper file name for the real test later on.
25763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25764  if test "x$test_shortpath" = x; then
25765    # Short path failed, file does not exist as specified.
25766    # Try adding .exe or .cmd
25767    if test -f "${new_path}.exe"; then
25768      input_to_shortpath="${new_path}.exe"
25769    elif test -f "${new_path}.cmd"; then
25770      input_to_shortpath="${new_path}.cmd"
25771    else
25772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25773$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25774      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25775$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25776      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25777    fi
25778  else
25779    input_to_shortpath="$new_path"
25780  fi
25781
25782  # Call helper function which possibly converts this using DOS-style short mode.
25783  # If so, the updated path is stored in $new_path.
25784  new_path="$input_to_shortpath"
25785
25786  input_path="$input_to_shortpath"
25787  # Check if we need to convert this using DOS-style short mode. If the path
25788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25789  # take no chances and rewrite it.
25790  # Note: m4 eats our [], so we need to use [ and ] instead.
25791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25792  if test "x$has_forbidden_chars" != x; then
25793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25797      # Going to short mode and back again did indeed matter. Since short mode is
25798      # case insensitive, let's make it lowercase to improve readability.
25799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25800      # Now convert it back to Unix-stile (cygpath)
25801      input_path=`$CYGPATH -u "$shortmode_path"`
25802      new_path="$input_path"
25803    fi
25804  fi
25805
25806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25807  if test "x$test_cygdrive_prefix" = x; then
25808    # As a simple fix, exclude /usr/bin since it's not a real path.
25809    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25811      # a path prefixed by /cygdrive for fixpath to work.
25812      new_path="$CYGWIN_ROOT_PATH$input_path"
25813    fi
25814  fi
25815
25816  # remove trailing .exe if any
25817  new_path="${new_path/%.exe/}"
25818
25819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25820
25821  # First separate the path from the arguments. This will split at the first
25822  # space.
25823  complete="$NM"
25824  path="${complete%% *}"
25825  tmp="$complete EOL"
25826  arguments="${tmp#* }"
25827
25828  # Input might be given as Windows format, start by converting to
25829  # unix format.
25830  new_path="$path"
25831
25832  windows_path="$new_path"
25833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25834    unix_path=`$CYGPATH -u "$windows_path"`
25835    new_path="$unix_path"
25836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25838    new_path="$unix_path"
25839  fi
25840
25841
25842  # Now try to locate executable using which
25843  new_path=`$WHICH "$new_path" 2> /dev/null`
25844
25845  if test "x$new_path" = x; then
25846    # Oops. Which didn't find the executable.
25847    # The splitting of arguments from the executable at a space might have been incorrect,
25848    # since paths with space are more likely in Windows. Give it another try with the whole
25849    # argument.
25850    path="$complete"
25851    arguments="EOL"
25852    new_path="$path"
25853
25854  windows_path="$new_path"
25855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25856    unix_path=`$CYGPATH -u "$windows_path"`
25857    new_path="$unix_path"
25858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25860    new_path="$unix_path"
25861  fi
25862
25863
25864    new_path=`$WHICH "$new_path" 2> /dev/null`
25865
25866    if test "x$new_path" = x; then
25867      # It's still not found. Now this is an unrecoverable error.
25868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25869$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25870      has_space=`$ECHO "$complete" | $GREP " "`
25871      if test "x$has_space" != x; then
25872        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25873$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25874      fi
25875      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25876    fi
25877  fi
25878
25879  # Now new_path has a complete unix path to the binary
25880  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25881    # Keep paths in /bin as-is, but remove trailing .exe if any
25882    new_path="${new_path/%.exe/}"
25883    # Do not save /bin paths to all_fixpath_prefixes!
25884  else
25885    # Not in mixed or Windows style, start by that.
25886    new_path=`cmd //c echo $new_path`
25887
25888  input_path="$new_path"
25889  # Check if we need to convert this using DOS-style short mode. If the path
25890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25891  # take no chances and rewrite it.
25892  # Note: m4 eats our [], so we need to use [ and ] instead.
25893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25894  if test "x$has_forbidden_chars" != x; then
25895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25897  fi
25898
25899    # Output is in $new_path
25900
25901  windows_path="$new_path"
25902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25903    unix_path=`$CYGPATH -u "$windows_path"`
25904    new_path="$unix_path"
25905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25907    new_path="$unix_path"
25908  fi
25909
25910    # remove trailing .exe if any
25911    new_path="${new_path/%.exe/}"
25912
25913    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25914    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25915  fi
25916
25917  else
25918    # We're on a posix platform. Hooray! :)
25919    # First separate the path from the arguments. This will split at the first
25920    # space.
25921    complete="$NM"
25922    path="${complete%% *}"
25923    tmp="$complete EOL"
25924    arguments="${tmp#* }"
25925
25926    # Cannot rely on the command "which" here since it doesn't always work.
25927    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25928    if test -z "$is_absolute_path"; then
25929      # Path to executable is not absolute. Find it.
25930      IFS_save="$IFS"
25931      IFS=:
25932      for p in $PATH; do
25933        if test -f "$p/$path" && test -x "$p/$path"; then
25934          new_path="$p/$path"
25935          break
25936        fi
25937      done
25938      IFS="$IFS_save"
25939    else
25940      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25941$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25942      new_path="$path"
25943    fi
25944
25945    if test "x$new_path" = x; then
25946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25947$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25948      has_space=`$ECHO "$complete" | $GREP " "`
25949      if test "x$has_space" != x; then
25950        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25951$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25952      fi
25953      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25954    fi
25955  fi
25956
25957  # Now join together the path and the arguments once again
25958  if test "x$arguments" != xEOL; then
25959    new_complete="$new_path ${arguments% *}"
25960  else
25961    new_complete="$new_path"
25962  fi
25963
25964  if test "x$complete" != "x$new_complete"; then
25965    NM="$new_complete"
25966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25967$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25968  fi
25969
25970    # Extract the first word of "gnm", so it can be a program name with args.
25971set dummy gnm; ac_word=$2
25972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25973$as_echo_n "checking for $ac_word... " >&6; }
25974if ${ac_cv_path_GNM+:} false; then :
25975  $as_echo_n "(cached) " >&6
25976else
25977  case $GNM in
25978  [\\/]* | ?:[\\/]*)
25979  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25980  ;;
25981  *)
25982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25983for as_dir in $PATH
25984do
25985  IFS=$as_save_IFS
25986  test -z "$as_dir" && as_dir=.
25987    for ac_exec_ext in '' $ac_executable_extensions; do
25988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25989    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25991    break 2
25992  fi
25993done
25994  done
25995IFS=$as_save_IFS
25996
25997  ;;
25998esac
25999fi
26000GNM=$ac_cv_path_GNM
26001if test -n "$GNM"; then
26002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26003$as_echo "$GNM" >&6; }
26004else
26005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26006$as_echo "no" >&6; }
26007fi
26008
26009
26010
26011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26012
26013  # First separate the path from the arguments. This will split at the first
26014  # space.
26015  complete="$GNM"
26016  path="${complete%% *}"
26017  tmp="$complete EOL"
26018  arguments="${tmp#* }"
26019
26020  # Input might be given as Windows format, start by converting to
26021  # unix format.
26022  new_path=`$CYGPATH -u "$path"`
26023
26024  # Now try to locate executable using which
26025  new_path=`$WHICH "$new_path" 2> /dev/null`
26026  # bat and cmd files are not always considered executable in cygwin causing which
26027  # to not find them
26028  if test "x$new_path" = x \
26029      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26030      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26031    new_path=`$CYGPATH -u "$path"`
26032  fi
26033  if test "x$new_path" = x; then
26034    # Oops. Which didn't find the executable.
26035    # The splitting of arguments from the executable at a space might have been incorrect,
26036    # since paths with space are more likely in Windows. Give it another try with the whole
26037    # argument.
26038    path="$complete"
26039    arguments="EOL"
26040    new_path=`$CYGPATH -u "$path"`
26041    new_path=`$WHICH "$new_path" 2> /dev/null`
26042    # bat and cmd files are not always considered executable in cygwin causing which
26043    # to not find them
26044    if test "x$new_path" = x \
26045        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26046        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26047      new_path=`$CYGPATH -u "$path"`
26048    fi
26049    if test "x$new_path" = x; then
26050      # It's still not found. Now this is an unrecoverable error.
26051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26052$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26053      has_space=`$ECHO "$complete" | $GREP " "`
26054      if test "x$has_space" != x; then
26055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26057      fi
26058      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26059    fi
26060  fi
26061
26062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26065  # "foo.exe" is OK but "foo" is an error.
26066  #
26067  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26068  # It is also a way to make sure we got the proper file name for the real test later on.
26069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26070  if test "x$test_shortpath" = x; then
26071    # Short path failed, file does not exist as specified.
26072    # Try adding .exe or .cmd
26073    if test -f "${new_path}.exe"; then
26074      input_to_shortpath="${new_path}.exe"
26075    elif test -f "${new_path}.cmd"; then
26076      input_to_shortpath="${new_path}.cmd"
26077    else
26078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26079$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26080      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26081$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26082      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26083    fi
26084  else
26085    input_to_shortpath="$new_path"
26086  fi
26087
26088  # Call helper function which possibly converts this using DOS-style short mode.
26089  # If so, the updated path is stored in $new_path.
26090  new_path="$input_to_shortpath"
26091
26092  input_path="$input_to_shortpath"
26093  # Check if we need to convert this using DOS-style short mode. If the path
26094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26095  # take no chances and rewrite it.
26096  # Note: m4 eats our [], so we need to use [ and ] instead.
26097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26098  if test "x$has_forbidden_chars" != x; then
26099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26103      # Going to short mode and back again did indeed matter. Since short mode is
26104      # case insensitive, let's make it lowercase to improve readability.
26105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26106      # Now convert it back to Unix-stile (cygpath)
26107      input_path=`$CYGPATH -u "$shortmode_path"`
26108      new_path="$input_path"
26109    fi
26110  fi
26111
26112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26113  if test "x$test_cygdrive_prefix" = x; then
26114    # As a simple fix, exclude /usr/bin since it's not a real path.
26115    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26117      # a path prefixed by /cygdrive for fixpath to work.
26118      new_path="$CYGWIN_ROOT_PATH$input_path"
26119    fi
26120  fi
26121
26122  # remove trailing .exe if any
26123  new_path="${new_path/%.exe/}"
26124
26125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26126
26127  # First separate the path from the arguments. This will split at the first
26128  # space.
26129  complete="$GNM"
26130  path="${complete%% *}"
26131  tmp="$complete EOL"
26132  arguments="${tmp#* }"
26133
26134  # Input might be given as Windows format, start by converting to
26135  # unix format.
26136  new_path="$path"
26137
26138  windows_path="$new_path"
26139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26140    unix_path=`$CYGPATH -u "$windows_path"`
26141    new_path="$unix_path"
26142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26144    new_path="$unix_path"
26145  fi
26146
26147
26148  # Now try to locate executable using which
26149  new_path=`$WHICH "$new_path" 2> /dev/null`
26150
26151  if test "x$new_path" = x; then
26152    # Oops. Which didn't find the executable.
26153    # The splitting of arguments from the executable at a space might have been incorrect,
26154    # since paths with space are more likely in Windows. Give it another try with the whole
26155    # argument.
26156    path="$complete"
26157    arguments="EOL"
26158    new_path="$path"
26159
26160  windows_path="$new_path"
26161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26162    unix_path=`$CYGPATH -u "$windows_path"`
26163    new_path="$unix_path"
26164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26166    new_path="$unix_path"
26167  fi
26168
26169
26170    new_path=`$WHICH "$new_path" 2> /dev/null`
26171
26172    if test "x$new_path" = x; then
26173      # It's still not found. Now this is an unrecoverable error.
26174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26175$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26176      has_space=`$ECHO "$complete" | $GREP " "`
26177      if test "x$has_space" != x; then
26178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26180      fi
26181      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26182    fi
26183  fi
26184
26185  # Now new_path has a complete unix path to the binary
26186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26187    # Keep paths in /bin as-is, but remove trailing .exe if any
26188    new_path="${new_path/%.exe/}"
26189    # Do not save /bin paths to all_fixpath_prefixes!
26190  else
26191    # Not in mixed or Windows style, start by that.
26192    new_path=`cmd //c echo $new_path`
26193
26194  input_path="$new_path"
26195  # Check if we need to convert this using DOS-style short mode. If the path
26196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26197  # take no chances and rewrite it.
26198  # Note: m4 eats our [], so we need to use [ and ] instead.
26199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26200  if test "x$has_forbidden_chars" != x; then
26201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26203  fi
26204
26205    # Output is in $new_path
26206
26207  windows_path="$new_path"
26208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26209    unix_path=`$CYGPATH -u "$windows_path"`
26210    new_path="$unix_path"
26211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26213    new_path="$unix_path"
26214  fi
26215
26216    # remove trailing .exe if any
26217    new_path="${new_path/%.exe/}"
26218
26219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26221  fi
26222
26223  else
26224    # We're on a posix platform. Hooray! :)
26225    # First separate the path from the arguments. This will split at the first
26226    # space.
26227    complete="$GNM"
26228    path="${complete%% *}"
26229    tmp="$complete EOL"
26230    arguments="${tmp#* }"
26231
26232    # Cannot rely on the command "which" here since it doesn't always work.
26233    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26234    if test -z "$is_absolute_path"; then
26235      # Path to executable is not absolute. Find it.
26236      IFS_save="$IFS"
26237      IFS=:
26238      for p in $PATH; do
26239        if test -f "$p/$path" && test -x "$p/$path"; then
26240          new_path="$p/$path"
26241          break
26242        fi
26243      done
26244      IFS="$IFS_save"
26245    else
26246      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26247$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26248      new_path="$path"
26249    fi
26250
26251    if test "x$new_path" = x; then
26252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26253$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26254      has_space=`$ECHO "$complete" | $GREP " "`
26255      if test "x$has_space" != x; then
26256        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26257$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26258      fi
26259      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26260    fi
26261  fi
26262
26263  # Now join together the path and the arguments once again
26264  if test "x$arguments" != xEOL; then
26265    new_complete="$new_path ${arguments% *}"
26266  else
26267    new_complete="$new_path"
26268  fi
26269
26270  if test "x$complete" != "x$new_complete"; then
26271    GNM="$new_complete"
26272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26273$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26274  fi
26275
26276    # Extract the first word of "strip", so it can be a program name with args.
26277set dummy strip; ac_word=$2
26278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26279$as_echo_n "checking for $ac_word... " >&6; }
26280if ${ac_cv_path_STRIP+:} false; then :
26281  $as_echo_n "(cached) " >&6
26282else
26283  case $STRIP in
26284  [\\/]* | ?:[\\/]*)
26285  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26286  ;;
26287  *)
26288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26289for as_dir in $PATH
26290do
26291  IFS=$as_save_IFS
26292  test -z "$as_dir" && as_dir=.
26293    for ac_exec_ext in '' $ac_executable_extensions; do
26294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26295    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26297    break 2
26298  fi
26299done
26300  done
26301IFS=$as_save_IFS
26302
26303  ;;
26304esac
26305fi
26306STRIP=$ac_cv_path_STRIP
26307if test -n "$STRIP"; then
26308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26309$as_echo "$STRIP" >&6; }
26310else
26311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26312$as_echo "no" >&6; }
26313fi
26314
26315
26316
26317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26318
26319  # First separate the path from the arguments. This will split at the first
26320  # space.
26321  complete="$STRIP"
26322  path="${complete%% *}"
26323  tmp="$complete EOL"
26324  arguments="${tmp#* }"
26325
26326  # Input might be given as Windows format, start by converting to
26327  # unix format.
26328  new_path=`$CYGPATH -u "$path"`
26329
26330  # Now try to locate executable using which
26331  new_path=`$WHICH "$new_path" 2> /dev/null`
26332  # bat and cmd files are not always considered executable in cygwin causing which
26333  # to not find them
26334  if test "x$new_path" = x \
26335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26337    new_path=`$CYGPATH -u "$path"`
26338  fi
26339  if test "x$new_path" = x; then
26340    # Oops. Which didn't find the executable.
26341    # The splitting of arguments from the executable at a space might have been incorrect,
26342    # since paths with space are more likely in Windows. Give it another try with the whole
26343    # argument.
26344    path="$complete"
26345    arguments="EOL"
26346    new_path=`$CYGPATH -u "$path"`
26347    new_path=`$WHICH "$new_path" 2> /dev/null`
26348    # bat and cmd files are not always considered executable in cygwin causing which
26349    # to not find them
26350    if test "x$new_path" = x \
26351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26353      new_path=`$CYGPATH -u "$path"`
26354    fi
26355    if test "x$new_path" = x; then
26356      # It's still not found. Now this is an unrecoverable error.
26357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26358$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26359      has_space=`$ECHO "$complete" | $GREP " "`
26360      if test "x$has_space" != x; then
26361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26363      fi
26364      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26365    fi
26366  fi
26367
26368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26371  # "foo.exe" is OK but "foo" is an error.
26372  #
26373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26374  # It is also a way to make sure we got the proper file name for the real test later on.
26375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26376  if test "x$test_shortpath" = x; then
26377    # Short path failed, file does not exist as specified.
26378    # Try adding .exe or .cmd
26379    if test -f "${new_path}.exe"; then
26380      input_to_shortpath="${new_path}.exe"
26381    elif test -f "${new_path}.cmd"; then
26382      input_to_shortpath="${new_path}.cmd"
26383    else
26384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26385$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26388      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26389    fi
26390  else
26391    input_to_shortpath="$new_path"
26392  fi
26393
26394  # Call helper function which possibly converts this using DOS-style short mode.
26395  # If so, the updated path is stored in $new_path.
26396  new_path="$input_to_shortpath"
26397
26398  input_path="$input_to_shortpath"
26399  # Check if we need to convert this using DOS-style short mode. If the path
26400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26401  # take no chances and rewrite it.
26402  # Note: m4 eats our [], so we need to use [ and ] instead.
26403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26404  if test "x$has_forbidden_chars" != x; then
26405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26409      # Going to short mode and back again did indeed matter. Since short mode is
26410      # case insensitive, let's make it lowercase to improve readability.
26411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26412      # Now convert it back to Unix-stile (cygpath)
26413      input_path=`$CYGPATH -u "$shortmode_path"`
26414      new_path="$input_path"
26415    fi
26416  fi
26417
26418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26419  if test "x$test_cygdrive_prefix" = x; then
26420    # As a simple fix, exclude /usr/bin since it's not a real path.
26421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26423      # a path prefixed by /cygdrive for fixpath to work.
26424      new_path="$CYGWIN_ROOT_PATH$input_path"
26425    fi
26426  fi
26427
26428  # remove trailing .exe if any
26429  new_path="${new_path/%.exe/}"
26430
26431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26432
26433  # First separate the path from the arguments. This will split at the first
26434  # space.
26435  complete="$STRIP"
26436  path="${complete%% *}"
26437  tmp="$complete EOL"
26438  arguments="${tmp#* }"
26439
26440  # Input might be given as Windows format, start by converting to
26441  # unix format.
26442  new_path="$path"
26443
26444  windows_path="$new_path"
26445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26446    unix_path=`$CYGPATH -u "$windows_path"`
26447    new_path="$unix_path"
26448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26450    new_path="$unix_path"
26451  fi
26452
26453
26454  # Now try to locate executable using which
26455  new_path=`$WHICH "$new_path" 2> /dev/null`
26456
26457  if test "x$new_path" = x; then
26458    # Oops. Which didn't find the executable.
26459    # The splitting of arguments from the executable at a space might have been incorrect,
26460    # since paths with space are more likely in Windows. Give it another try with the whole
26461    # argument.
26462    path="$complete"
26463    arguments="EOL"
26464    new_path="$path"
26465
26466  windows_path="$new_path"
26467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26468    unix_path=`$CYGPATH -u "$windows_path"`
26469    new_path="$unix_path"
26470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26472    new_path="$unix_path"
26473  fi
26474
26475
26476    new_path=`$WHICH "$new_path" 2> /dev/null`
26477
26478    if test "x$new_path" = x; then
26479      # It's still not found. Now this is an unrecoverable error.
26480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26481$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26482      has_space=`$ECHO "$complete" | $GREP " "`
26483      if test "x$has_space" != x; then
26484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26486      fi
26487      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26488    fi
26489  fi
26490
26491  # Now new_path has a complete unix path to the binary
26492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26493    # Keep paths in /bin as-is, but remove trailing .exe if any
26494    new_path="${new_path/%.exe/}"
26495    # Do not save /bin paths to all_fixpath_prefixes!
26496  else
26497    # Not in mixed or Windows style, start by that.
26498    new_path=`cmd //c echo $new_path`
26499
26500  input_path="$new_path"
26501  # Check if we need to convert this using DOS-style short mode. If the path
26502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26503  # take no chances and rewrite it.
26504  # Note: m4 eats our [], so we need to use [ and ] instead.
26505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26506  if test "x$has_forbidden_chars" != x; then
26507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26509  fi
26510
26511    # Output is in $new_path
26512
26513  windows_path="$new_path"
26514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26515    unix_path=`$CYGPATH -u "$windows_path"`
26516    new_path="$unix_path"
26517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26519    new_path="$unix_path"
26520  fi
26521
26522    # remove trailing .exe if any
26523    new_path="${new_path/%.exe/}"
26524
26525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26527  fi
26528
26529  else
26530    # We're on a posix platform. Hooray! :)
26531    # First separate the path from the arguments. This will split at the first
26532    # space.
26533    complete="$STRIP"
26534    path="${complete%% *}"
26535    tmp="$complete EOL"
26536    arguments="${tmp#* }"
26537
26538    # Cannot rely on the command "which" here since it doesn't always work.
26539    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26540    if test -z "$is_absolute_path"; then
26541      # Path to executable is not absolute. Find it.
26542      IFS_save="$IFS"
26543      IFS=:
26544      for p in $PATH; do
26545        if test -f "$p/$path" && test -x "$p/$path"; then
26546          new_path="$p/$path"
26547          break
26548        fi
26549      done
26550      IFS="$IFS_save"
26551    else
26552      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26553$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26554      new_path="$path"
26555    fi
26556
26557    if test "x$new_path" = x; then
26558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26559$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26560      has_space=`$ECHO "$complete" | $GREP " "`
26561      if test "x$has_space" != x; then
26562        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26564      fi
26565      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26566    fi
26567  fi
26568
26569  # Now join together the path and the arguments once again
26570  if test "x$arguments" != xEOL; then
26571    new_complete="$new_path ${arguments% *}"
26572  else
26573    new_complete="$new_path"
26574  fi
26575
26576  if test "x$complete" != "x$new_complete"; then
26577    STRIP="$new_complete"
26578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26579$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26580  fi
26581
26582    # Extract the first word of "mcs", so it can be a program name with args.
26583set dummy mcs; ac_word=$2
26584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26585$as_echo_n "checking for $ac_word... " >&6; }
26586if ${ac_cv_path_MCS+:} false; then :
26587  $as_echo_n "(cached) " >&6
26588else
26589  case $MCS in
26590  [\\/]* | ?:[\\/]*)
26591  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26592  ;;
26593  *)
26594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26595for as_dir in $PATH
26596do
26597  IFS=$as_save_IFS
26598  test -z "$as_dir" && as_dir=.
26599    for ac_exec_ext in '' $ac_executable_extensions; do
26600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26601    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26603    break 2
26604  fi
26605done
26606  done
26607IFS=$as_save_IFS
26608
26609  ;;
26610esac
26611fi
26612MCS=$ac_cv_path_MCS
26613if test -n "$MCS"; then
26614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26615$as_echo "$MCS" >&6; }
26616else
26617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26618$as_echo "no" >&6; }
26619fi
26620
26621
26622
26623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26624
26625  # First separate the path from the arguments. This will split at the first
26626  # space.
26627  complete="$MCS"
26628  path="${complete%% *}"
26629  tmp="$complete EOL"
26630  arguments="${tmp#* }"
26631
26632  # Input might be given as Windows format, start by converting to
26633  # unix format.
26634  new_path=`$CYGPATH -u "$path"`
26635
26636  # Now try to locate executable using which
26637  new_path=`$WHICH "$new_path" 2> /dev/null`
26638  # bat and cmd files are not always considered executable in cygwin causing which
26639  # to not find them
26640  if test "x$new_path" = x \
26641      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26642      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26643    new_path=`$CYGPATH -u "$path"`
26644  fi
26645  if test "x$new_path" = x; then
26646    # Oops. Which didn't find the executable.
26647    # The splitting of arguments from the executable at a space might have been incorrect,
26648    # since paths with space are more likely in Windows. Give it another try with the whole
26649    # argument.
26650    path="$complete"
26651    arguments="EOL"
26652    new_path=`$CYGPATH -u "$path"`
26653    new_path=`$WHICH "$new_path" 2> /dev/null`
26654    # bat and cmd files are not always considered executable in cygwin causing which
26655    # to not find them
26656    if test "x$new_path" = x \
26657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26659      new_path=`$CYGPATH -u "$path"`
26660    fi
26661    if test "x$new_path" = x; then
26662      # It's still not found. Now this is an unrecoverable error.
26663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26664$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26665      has_space=`$ECHO "$complete" | $GREP " "`
26666      if test "x$has_space" != x; then
26667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26669      fi
26670      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26671    fi
26672  fi
26673
26674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26677  # "foo.exe" is OK but "foo" is an error.
26678  #
26679  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26680  # It is also a way to make sure we got the proper file name for the real test later on.
26681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26682  if test "x$test_shortpath" = x; then
26683    # Short path failed, file does not exist as specified.
26684    # Try adding .exe or .cmd
26685    if test -f "${new_path}.exe"; then
26686      input_to_shortpath="${new_path}.exe"
26687    elif test -f "${new_path}.cmd"; then
26688      input_to_shortpath="${new_path}.cmd"
26689    else
26690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26691$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26692      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26693$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26694      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26695    fi
26696  else
26697    input_to_shortpath="$new_path"
26698  fi
26699
26700  # Call helper function which possibly converts this using DOS-style short mode.
26701  # If so, the updated path is stored in $new_path.
26702  new_path="$input_to_shortpath"
26703
26704  input_path="$input_to_shortpath"
26705  # Check if we need to convert this using DOS-style short mode. If the path
26706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26707  # take no chances and rewrite it.
26708  # Note: m4 eats our [], so we need to use [ and ] instead.
26709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26710  if test "x$has_forbidden_chars" != x; then
26711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26715      # Going to short mode and back again did indeed matter. Since short mode is
26716      # case insensitive, let's make it lowercase to improve readability.
26717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26718      # Now convert it back to Unix-stile (cygpath)
26719      input_path=`$CYGPATH -u "$shortmode_path"`
26720      new_path="$input_path"
26721    fi
26722  fi
26723
26724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26725  if test "x$test_cygdrive_prefix" = x; then
26726    # As a simple fix, exclude /usr/bin since it's not a real path.
26727    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26729      # a path prefixed by /cygdrive for fixpath to work.
26730      new_path="$CYGWIN_ROOT_PATH$input_path"
26731    fi
26732  fi
26733
26734  # remove trailing .exe if any
26735  new_path="${new_path/%.exe/}"
26736
26737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26738
26739  # First separate the path from the arguments. This will split at the first
26740  # space.
26741  complete="$MCS"
26742  path="${complete%% *}"
26743  tmp="$complete EOL"
26744  arguments="${tmp#* }"
26745
26746  # Input might be given as Windows format, start by converting to
26747  # unix format.
26748  new_path="$path"
26749
26750  windows_path="$new_path"
26751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26752    unix_path=`$CYGPATH -u "$windows_path"`
26753    new_path="$unix_path"
26754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26756    new_path="$unix_path"
26757  fi
26758
26759
26760  # Now try to locate executable using which
26761  new_path=`$WHICH "$new_path" 2> /dev/null`
26762
26763  if test "x$new_path" = x; then
26764    # Oops. Which didn't find the executable.
26765    # The splitting of arguments from the executable at a space might have been incorrect,
26766    # since paths with space are more likely in Windows. Give it another try with the whole
26767    # argument.
26768    path="$complete"
26769    arguments="EOL"
26770    new_path="$path"
26771
26772  windows_path="$new_path"
26773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26774    unix_path=`$CYGPATH -u "$windows_path"`
26775    new_path="$unix_path"
26776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26778    new_path="$unix_path"
26779  fi
26780
26781
26782    new_path=`$WHICH "$new_path" 2> /dev/null`
26783
26784    if test "x$new_path" = x; then
26785      # It's still not found. Now this is an unrecoverable error.
26786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26787$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26788      has_space=`$ECHO "$complete" | $GREP " "`
26789      if test "x$has_space" != x; then
26790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26792      fi
26793      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26794    fi
26795  fi
26796
26797  # Now new_path has a complete unix path to the binary
26798  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26799    # Keep paths in /bin as-is, but remove trailing .exe if any
26800    new_path="${new_path/%.exe/}"
26801    # Do not save /bin paths to all_fixpath_prefixes!
26802  else
26803    # Not in mixed or Windows style, start by that.
26804    new_path=`cmd //c echo $new_path`
26805
26806  input_path="$new_path"
26807  # Check if we need to convert this using DOS-style short mode. If the path
26808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26809  # take no chances and rewrite it.
26810  # Note: m4 eats our [], so we need to use [ and ] instead.
26811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26812  if test "x$has_forbidden_chars" != x; then
26813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26815  fi
26816
26817    # Output is in $new_path
26818
26819  windows_path="$new_path"
26820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26821    unix_path=`$CYGPATH -u "$windows_path"`
26822    new_path="$unix_path"
26823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26825    new_path="$unix_path"
26826  fi
26827
26828    # remove trailing .exe if any
26829    new_path="${new_path/%.exe/}"
26830
26831    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26832    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26833  fi
26834
26835  else
26836    # We're on a posix platform. Hooray! :)
26837    # First separate the path from the arguments. This will split at the first
26838    # space.
26839    complete="$MCS"
26840    path="${complete%% *}"
26841    tmp="$complete EOL"
26842    arguments="${tmp#* }"
26843
26844    # Cannot rely on the command "which" here since it doesn't always work.
26845    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26846    if test -z "$is_absolute_path"; then
26847      # Path to executable is not absolute. Find it.
26848      IFS_save="$IFS"
26849      IFS=:
26850      for p in $PATH; do
26851        if test -f "$p/$path" && test -x "$p/$path"; then
26852          new_path="$p/$path"
26853          break
26854        fi
26855      done
26856      IFS="$IFS_save"
26857    else
26858      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26859$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26860      new_path="$path"
26861    fi
26862
26863    if test "x$new_path" = x; then
26864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26865$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26866      has_space=`$ECHO "$complete" | $GREP " "`
26867      if test "x$has_space" != x; then
26868        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26869$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26870      fi
26871      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26872    fi
26873  fi
26874
26875  # Now join together the path and the arguments once again
26876  if test "x$arguments" != xEOL; then
26877    new_complete="$new_path ${arguments% *}"
26878  else
26879    new_complete="$new_path"
26880  fi
26881
26882  if test "x$complete" != "x$new_complete"; then
26883    MCS="$new_complete"
26884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26885$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26886  fi
26887
26888  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26889    if test -n "$ac_tool_prefix"; then
26890  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26891set dummy ${ac_tool_prefix}nm; ac_word=$2
26892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26893$as_echo_n "checking for $ac_word... " >&6; }
26894if ${ac_cv_prog_NM+:} false; then :
26895  $as_echo_n "(cached) " >&6
26896else
26897  if test -n "$NM"; then
26898  ac_cv_prog_NM="$NM" # Let the user override the test.
26899else
26900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26901for as_dir in $PATH
26902do
26903  IFS=$as_save_IFS
26904  test -z "$as_dir" && as_dir=.
26905    for ac_exec_ext in '' $ac_executable_extensions; do
26906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26907    ac_cv_prog_NM="${ac_tool_prefix}nm"
26908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26909    break 2
26910  fi
26911done
26912  done
26913IFS=$as_save_IFS
26914
26915fi
26916fi
26917NM=$ac_cv_prog_NM
26918if test -n "$NM"; then
26919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26920$as_echo "$NM" >&6; }
26921else
26922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26923$as_echo "no" >&6; }
26924fi
26925
26926
26927fi
26928if test -z "$ac_cv_prog_NM"; then
26929  ac_ct_NM=$NM
26930  # Extract the first word of "nm", so it can be a program name with args.
26931set dummy nm; ac_word=$2
26932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26933$as_echo_n "checking for $ac_word... " >&6; }
26934if ${ac_cv_prog_ac_ct_NM+:} false; then :
26935  $as_echo_n "(cached) " >&6
26936else
26937  if test -n "$ac_ct_NM"; then
26938  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26939else
26940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26941for as_dir in $PATH
26942do
26943  IFS=$as_save_IFS
26944  test -z "$as_dir" && as_dir=.
26945    for ac_exec_ext in '' $ac_executable_extensions; do
26946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26947    ac_cv_prog_ac_ct_NM="nm"
26948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26949    break 2
26950  fi
26951done
26952  done
26953IFS=$as_save_IFS
26954
26955fi
26956fi
26957ac_ct_NM=$ac_cv_prog_ac_ct_NM
26958if test -n "$ac_ct_NM"; then
26959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26960$as_echo "$ac_ct_NM" >&6; }
26961else
26962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26963$as_echo "no" >&6; }
26964fi
26965
26966  if test "x$ac_ct_NM" = x; then
26967    NM=""
26968  else
26969    case $cross_compiling:$ac_tool_warned in
26970yes:)
26971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26973ac_tool_warned=yes ;;
26974esac
26975    NM=$ac_ct_NM
26976  fi
26977else
26978  NM="$ac_cv_prog_NM"
26979fi
26980
26981
26982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26983
26984  # First separate the path from the arguments. This will split at the first
26985  # space.
26986  complete="$NM"
26987  path="${complete%% *}"
26988  tmp="$complete EOL"
26989  arguments="${tmp#* }"
26990
26991  # Input might be given as Windows format, start by converting to
26992  # unix format.
26993  new_path=`$CYGPATH -u "$path"`
26994
26995  # Now try to locate executable using which
26996  new_path=`$WHICH "$new_path" 2> /dev/null`
26997  # bat and cmd files are not always considered executable in cygwin causing which
26998  # to not find them
26999  if test "x$new_path" = x \
27000      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27001      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27002    new_path=`$CYGPATH -u "$path"`
27003  fi
27004  if test "x$new_path" = x; then
27005    # Oops. Which didn't find the executable.
27006    # The splitting of arguments from the executable at a space might have been incorrect,
27007    # since paths with space are more likely in Windows. Give it another try with the whole
27008    # argument.
27009    path="$complete"
27010    arguments="EOL"
27011    new_path=`$CYGPATH -u "$path"`
27012    new_path=`$WHICH "$new_path" 2> /dev/null`
27013    # bat and cmd files are not always considered executable in cygwin causing which
27014    # to not find them
27015    if test "x$new_path" = x \
27016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27018      new_path=`$CYGPATH -u "$path"`
27019    fi
27020    if test "x$new_path" = x; then
27021      # It's still not found. Now this is an unrecoverable error.
27022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27023$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27024      has_space=`$ECHO "$complete" | $GREP " "`
27025      if test "x$has_space" != x; then
27026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27028      fi
27029      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27030    fi
27031  fi
27032
27033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27036  # "foo.exe" is OK but "foo" is an error.
27037  #
27038  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27039  # It is also a way to make sure we got the proper file name for the real test later on.
27040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27041  if test "x$test_shortpath" = x; then
27042    # Short path failed, file does not exist as specified.
27043    # Try adding .exe or .cmd
27044    if test -f "${new_path}.exe"; then
27045      input_to_shortpath="${new_path}.exe"
27046    elif test -f "${new_path}.cmd"; then
27047      input_to_shortpath="${new_path}.cmd"
27048    else
27049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27050$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27051      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27052$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27053      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27054    fi
27055  else
27056    input_to_shortpath="$new_path"
27057  fi
27058
27059  # Call helper function which possibly converts this using DOS-style short mode.
27060  # If so, the updated path is stored in $new_path.
27061  new_path="$input_to_shortpath"
27062
27063  input_path="$input_to_shortpath"
27064  # Check if we need to convert this using DOS-style short mode. If the path
27065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27066  # take no chances and rewrite it.
27067  # Note: m4 eats our [], so we need to use [ and ] instead.
27068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27069  if test "x$has_forbidden_chars" != x; then
27070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27074      # Going to short mode and back again did indeed matter. Since short mode is
27075      # case insensitive, let's make it lowercase to improve readability.
27076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27077      # Now convert it back to Unix-stile (cygpath)
27078      input_path=`$CYGPATH -u "$shortmode_path"`
27079      new_path="$input_path"
27080    fi
27081  fi
27082
27083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27084  if test "x$test_cygdrive_prefix" = x; then
27085    # As a simple fix, exclude /usr/bin since it's not a real path.
27086    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27088      # a path prefixed by /cygdrive for fixpath to work.
27089      new_path="$CYGWIN_ROOT_PATH$input_path"
27090    fi
27091  fi
27092
27093  # remove trailing .exe if any
27094  new_path="${new_path/%.exe/}"
27095
27096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27097
27098  # First separate the path from the arguments. This will split at the first
27099  # space.
27100  complete="$NM"
27101  path="${complete%% *}"
27102  tmp="$complete EOL"
27103  arguments="${tmp#* }"
27104
27105  # Input might be given as Windows format, start by converting to
27106  # unix format.
27107  new_path="$path"
27108
27109  windows_path="$new_path"
27110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27111    unix_path=`$CYGPATH -u "$windows_path"`
27112    new_path="$unix_path"
27113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27115    new_path="$unix_path"
27116  fi
27117
27118
27119  # Now try to locate executable using which
27120  new_path=`$WHICH "$new_path" 2> /dev/null`
27121
27122  if test "x$new_path" = x; then
27123    # Oops. Which didn't find the executable.
27124    # The splitting of arguments from the executable at a space might have been incorrect,
27125    # since paths with space are more likely in Windows. Give it another try with the whole
27126    # argument.
27127    path="$complete"
27128    arguments="EOL"
27129    new_path="$path"
27130
27131  windows_path="$new_path"
27132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27133    unix_path=`$CYGPATH -u "$windows_path"`
27134    new_path="$unix_path"
27135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27137    new_path="$unix_path"
27138  fi
27139
27140
27141    new_path=`$WHICH "$new_path" 2> /dev/null`
27142
27143    if test "x$new_path" = x; then
27144      # It's still not found. Now this is an unrecoverable error.
27145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27146$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27147      has_space=`$ECHO "$complete" | $GREP " "`
27148      if test "x$has_space" != x; then
27149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27151      fi
27152      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27153    fi
27154  fi
27155
27156  # Now new_path has a complete unix path to the binary
27157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27158    # Keep paths in /bin as-is, but remove trailing .exe if any
27159    new_path="${new_path/%.exe/}"
27160    # Do not save /bin paths to all_fixpath_prefixes!
27161  else
27162    # Not in mixed or Windows style, start by that.
27163    new_path=`cmd //c echo $new_path`
27164
27165  input_path="$new_path"
27166  # Check if we need to convert this using DOS-style short mode. If the path
27167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27168  # take no chances and rewrite it.
27169  # Note: m4 eats our [], so we need to use [ and ] instead.
27170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27171  if test "x$has_forbidden_chars" != x; then
27172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27174  fi
27175
27176    # Output is in $new_path
27177
27178  windows_path="$new_path"
27179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27180    unix_path=`$CYGPATH -u "$windows_path"`
27181    new_path="$unix_path"
27182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27184    new_path="$unix_path"
27185  fi
27186
27187    # remove trailing .exe if any
27188    new_path="${new_path/%.exe/}"
27189
27190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27192  fi
27193
27194  else
27195    # We're on a posix platform. Hooray! :)
27196    # First separate the path from the arguments. This will split at the first
27197    # space.
27198    complete="$NM"
27199    path="${complete%% *}"
27200    tmp="$complete EOL"
27201    arguments="${tmp#* }"
27202
27203    # Cannot rely on the command "which" here since it doesn't always work.
27204    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27205    if test -z "$is_absolute_path"; then
27206      # Path to executable is not absolute. Find it.
27207      IFS_save="$IFS"
27208      IFS=:
27209      for p in $PATH; do
27210        if test -f "$p/$path" && test -x "$p/$path"; then
27211          new_path="$p/$path"
27212          break
27213        fi
27214      done
27215      IFS="$IFS_save"
27216    else
27217      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27218$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27219      new_path="$path"
27220    fi
27221
27222    if test "x$new_path" = x; then
27223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27224$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27225      has_space=`$ECHO "$complete" | $GREP " "`
27226      if test "x$has_space" != x; then
27227        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27229      fi
27230      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27231    fi
27232  fi
27233
27234  # Now join together the path and the arguments once again
27235  if test "x$arguments" != xEOL; then
27236    new_complete="$new_path ${arguments% *}"
27237  else
27238    new_complete="$new_path"
27239  fi
27240
27241  if test "x$complete" != "x$new_complete"; then
27242    NM="$new_complete"
27243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27244$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27245  fi
27246
27247    GNM="$NM"
27248
27249    if test -n "$ac_tool_prefix"; then
27250  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27251set dummy ${ac_tool_prefix}strip; ac_word=$2
27252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27253$as_echo_n "checking for $ac_word... " >&6; }
27254if ${ac_cv_prog_STRIP+:} false; then :
27255  $as_echo_n "(cached) " >&6
27256else
27257  if test -n "$STRIP"; then
27258  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27259else
27260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27261for as_dir in $PATH
27262do
27263  IFS=$as_save_IFS
27264  test -z "$as_dir" && as_dir=.
27265    for ac_exec_ext in '' $ac_executable_extensions; do
27266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27267    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27269    break 2
27270  fi
27271done
27272  done
27273IFS=$as_save_IFS
27274
27275fi
27276fi
27277STRIP=$ac_cv_prog_STRIP
27278if test -n "$STRIP"; then
27279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27280$as_echo "$STRIP" >&6; }
27281else
27282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27283$as_echo "no" >&6; }
27284fi
27285
27286
27287fi
27288if test -z "$ac_cv_prog_STRIP"; then
27289  ac_ct_STRIP=$STRIP
27290  # Extract the first word of "strip", so it can be a program name with args.
27291set dummy strip; ac_word=$2
27292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27293$as_echo_n "checking for $ac_word... " >&6; }
27294if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27295  $as_echo_n "(cached) " >&6
27296else
27297  if test -n "$ac_ct_STRIP"; then
27298  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27299else
27300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27301for as_dir in $PATH
27302do
27303  IFS=$as_save_IFS
27304  test -z "$as_dir" && as_dir=.
27305    for ac_exec_ext in '' $ac_executable_extensions; do
27306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27307    ac_cv_prog_ac_ct_STRIP="strip"
27308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27309    break 2
27310  fi
27311done
27312  done
27313IFS=$as_save_IFS
27314
27315fi
27316fi
27317ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27318if test -n "$ac_ct_STRIP"; then
27319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27320$as_echo "$ac_ct_STRIP" >&6; }
27321else
27322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27323$as_echo "no" >&6; }
27324fi
27325
27326  if test "x$ac_ct_STRIP" = x; then
27327    STRIP=""
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    STRIP=$ac_ct_STRIP
27336  fi
27337else
27338  STRIP="$ac_cv_prog_STRIP"
27339fi
27340
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="$STRIP"
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 STRIP, which resolves as \"$complete\", is not found." >&5
27383$as_echo "$as_me: The path of STRIP, 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 STRIP" "$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 STRIP, which resolves as \"$new_path\", is invalid." >&5
27410$as_echo "$as_me: The path of STRIP, 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 STRIP" "$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="$STRIP"
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 STRIP, which resolves as \"$complete\", is not found." >&5
27506$as_echo "$as_me: The path of STRIP, 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 STRIP" "$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="$STRIP"
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 STRIP (as $path) failed, using $path directly." >&5
27578$as_echo "$as_me: Resolving STRIP (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 STRIP, which resolves as \"$complete\", is not found." >&5
27584$as_echo "$as_me: The path of STRIP, 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 STRIP" "$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    STRIP="$new_complete"
27603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27604$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27605  fi
27606
27607  fi
27608
27609  # objcopy is used for moving debug symbols to separate files when
27610  # full debug symbols are enabled.
27611  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27612    if test -n "$ac_tool_prefix"; then
27613  for ac_prog in gobjcopy objcopy
27614  do
27615    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27618$as_echo_n "checking for $ac_word... " >&6; }
27619if ${ac_cv_prog_OBJCOPY+:} false; then :
27620  $as_echo_n "(cached) " >&6
27621else
27622  if test -n "$OBJCOPY"; then
27623  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27624else
27625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27626for as_dir in $PATH
27627do
27628  IFS=$as_save_IFS
27629  test -z "$as_dir" && as_dir=.
27630    for ac_exec_ext in '' $ac_executable_extensions; do
27631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27632    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27634    break 2
27635  fi
27636done
27637  done
27638IFS=$as_save_IFS
27639
27640fi
27641fi
27642OBJCOPY=$ac_cv_prog_OBJCOPY
27643if test -n "$OBJCOPY"; then
27644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27645$as_echo "$OBJCOPY" >&6; }
27646else
27647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27648$as_echo "no" >&6; }
27649fi
27650
27651
27652    test -n "$OBJCOPY" && break
27653  done
27654fi
27655if test -z "$OBJCOPY"; then
27656  ac_ct_OBJCOPY=$OBJCOPY
27657  for ac_prog in gobjcopy objcopy
27658do
27659  # Extract the first word of "$ac_prog", so it can be a program name with args.
27660set dummy $ac_prog; ac_word=$2
27661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27662$as_echo_n "checking for $ac_word... " >&6; }
27663if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27664  $as_echo_n "(cached) " >&6
27665else
27666  if test -n "$ac_ct_OBJCOPY"; then
27667  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27668else
27669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27670for as_dir in $PATH
27671do
27672  IFS=$as_save_IFS
27673  test -z "$as_dir" && as_dir=.
27674    for ac_exec_ext in '' $ac_executable_extensions; do
27675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27676    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27678    break 2
27679  fi
27680done
27681  done
27682IFS=$as_save_IFS
27683
27684fi
27685fi
27686ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27687if test -n "$ac_ct_OBJCOPY"; then
27688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27689$as_echo "$ac_ct_OBJCOPY" >&6; }
27690else
27691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27692$as_echo "no" >&6; }
27693fi
27694
27695
27696  test -n "$ac_ct_OBJCOPY" && break
27697done
27698
27699  if test "x$ac_ct_OBJCOPY" = x; then
27700    OBJCOPY=""
27701  else
27702    case $cross_compiling:$ac_tool_warned in
27703yes:)
27704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27706ac_tool_warned=yes ;;
27707esac
27708    OBJCOPY=$ac_ct_OBJCOPY
27709  fi
27710fi
27711
27712    # Only call fixup if objcopy was found.
27713    if test -n "$OBJCOPY"; then
27714
27715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27716
27717  # First separate the path from the arguments. This will split at the first
27718  # space.
27719  complete="$OBJCOPY"
27720  path="${complete%% *}"
27721  tmp="$complete EOL"
27722  arguments="${tmp#* }"
27723
27724  # Input might be given as Windows format, start by converting to
27725  # unix format.
27726  new_path=`$CYGPATH -u "$path"`
27727
27728  # Now try to locate executable using which
27729  new_path=`$WHICH "$new_path" 2> /dev/null`
27730  # bat and cmd files are not always considered executable in cygwin causing which
27731  # to not find them
27732  if test "x$new_path" = x \
27733      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27734      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27735    new_path=`$CYGPATH -u "$path"`
27736  fi
27737  if test "x$new_path" = x; then
27738    # Oops. Which didn't find the executable.
27739    # The splitting of arguments from the executable at a space might have been incorrect,
27740    # since paths with space are more likely in Windows. Give it another try with the whole
27741    # argument.
27742    path="$complete"
27743    arguments="EOL"
27744    new_path=`$CYGPATH -u "$path"`
27745    new_path=`$WHICH "$new_path" 2> /dev/null`
27746    # bat and cmd files are not always considered executable in cygwin causing which
27747    # to not find them
27748    if test "x$new_path" = x \
27749        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27750        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27751      new_path=`$CYGPATH -u "$path"`
27752    fi
27753    if test "x$new_path" = x; then
27754      # It's still not found. Now this is an unrecoverable error.
27755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27756$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27757      has_space=`$ECHO "$complete" | $GREP " "`
27758      if test "x$has_space" != x; then
27759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27761      fi
27762      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27763    fi
27764  fi
27765
27766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27769  # "foo.exe" is OK but "foo" is an error.
27770  #
27771  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27772  # It is also a way to make sure we got the proper file name for the real test later on.
27773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27774  if test "x$test_shortpath" = x; then
27775    # Short path failed, file does not exist as specified.
27776    # Try adding .exe or .cmd
27777    if test -f "${new_path}.exe"; then
27778      input_to_shortpath="${new_path}.exe"
27779    elif test -f "${new_path}.cmd"; then
27780      input_to_shortpath="${new_path}.cmd"
27781    else
27782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27783$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27784      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27785$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27786      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27787    fi
27788  else
27789    input_to_shortpath="$new_path"
27790  fi
27791
27792  # Call helper function which possibly converts this using DOS-style short mode.
27793  # If so, the updated path is stored in $new_path.
27794  new_path="$input_to_shortpath"
27795
27796  input_path="$input_to_shortpath"
27797  # Check if we need to convert this using DOS-style short mode. If the path
27798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27799  # take no chances and rewrite it.
27800  # Note: m4 eats our [], so we need to use [ and ] instead.
27801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27802  if test "x$has_forbidden_chars" != x; then
27803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27807      # Going to short mode and back again did indeed matter. Since short mode is
27808      # case insensitive, let's make it lowercase to improve readability.
27809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27810      # Now convert it back to Unix-stile (cygpath)
27811      input_path=`$CYGPATH -u "$shortmode_path"`
27812      new_path="$input_path"
27813    fi
27814  fi
27815
27816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27817  if test "x$test_cygdrive_prefix" = x; then
27818    # As a simple fix, exclude /usr/bin since it's not a real path.
27819    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27821      # a path prefixed by /cygdrive for fixpath to work.
27822      new_path="$CYGWIN_ROOT_PATH$input_path"
27823    fi
27824  fi
27825
27826  # remove trailing .exe if any
27827  new_path="${new_path/%.exe/}"
27828
27829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27830
27831  # First separate the path from the arguments. This will split at the first
27832  # space.
27833  complete="$OBJCOPY"
27834  path="${complete%% *}"
27835  tmp="$complete EOL"
27836  arguments="${tmp#* }"
27837
27838  # Input might be given as Windows format, start by converting to
27839  # unix format.
27840  new_path="$path"
27841
27842  windows_path="$new_path"
27843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27844    unix_path=`$CYGPATH -u "$windows_path"`
27845    new_path="$unix_path"
27846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27848    new_path="$unix_path"
27849  fi
27850
27851
27852  # Now try to locate executable using which
27853  new_path=`$WHICH "$new_path" 2> /dev/null`
27854
27855  if test "x$new_path" = x; then
27856    # Oops. Which didn't find the executable.
27857    # The splitting of arguments from the executable at a space might have been incorrect,
27858    # since paths with space are more likely in Windows. Give it another try with the whole
27859    # argument.
27860    path="$complete"
27861    arguments="EOL"
27862    new_path="$path"
27863
27864  windows_path="$new_path"
27865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27866    unix_path=`$CYGPATH -u "$windows_path"`
27867    new_path="$unix_path"
27868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27870    new_path="$unix_path"
27871  fi
27872
27873
27874    new_path=`$WHICH "$new_path" 2> /dev/null`
27875
27876    if test "x$new_path" = x; then
27877      # It's still not found. Now this is an unrecoverable error.
27878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27879$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27880      has_space=`$ECHO "$complete" | $GREP " "`
27881      if test "x$has_space" != x; then
27882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27884      fi
27885      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27886    fi
27887  fi
27888
27889  # Now new_path has a complete unix path to the binary
27890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27891    # Keep paths in /bin as-is, but remove trailing .exe if any
27892    new_path="${new_path/%.exe/}"
27893    # Do not save /bin paths to all_fixpath_prefixes!
27894  else
27895    # Not in mixed or Windows style, start by that.
27896    new_path=`cmd //c echo $new_path`
27897
27898  input_path="$new_path"
27899  # Check if we need to convert this using DOS-style short mode. If the path
27900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27901  # take no chances and rewrite it.
27902  # Note: m4 eats our [], so we need to use [ and ] instead.
27903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27904  if test "x$has_forbidden_chars" != x; then
27905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27907  fi
27908
27909    # Output is in $new_path
27910
27911  windows_path="$new_path"
27912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27913    unix_path=`$CYGPATH -u "$windows_path"`
27914    new_path="$unix_path"
27915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27917    new_path="$unix_path"
27918  fi
27919
27920    # remove trailing .exe if any
27921    new_path="${new_path/%.exe/}"
27922
27923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27925  fi
27926
27927  else
27928    # We're on a posix platform. Hooray! :)
27929    # First separate the path from the arguments. This will split at the first
27930    # space.
27931    complete="$OBJCOPY"
27932    path="${complete%% *}"
27933    tmp="$complete EOL"
27934    arguments="${tmp#* }"
27935
27936    # Cannot rely on the command "which" here since it doesn't always work.
27937    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27938    if test -z "$is_absolute_path"; then
27939      # Path to executable is not absolute. Find it.
27940      IFS_save="$IFS"
27941      IFS=:
27942      for p in $PATH; do
27943        if test -f "$p/$path" && test -x "$p/$path"; then
27944          new_path="$p/$path"
27945          break
27946        fi
27947      done
27948      IFS="$IFS_save"
27949    else
27950      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27951$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27952      new_path="$path"
27953    fi
27954
27955    if test "x$new_path" = x; then
27956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27957$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27958      has_space=`$ECHO "$complete" | $GREP " "`
27959      if test "x$has_space" != x; then
27960        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27962      fi
27963      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27964    fi
27965  fi
27966
27967  # Now join together the path and the arguments once again
27968  if test "x$arguments" != xEOL; then
27969    new_complete="$new_path ${arguments% *}"
27970  else
27971    new_complete="$new_path"
27972  fi
27973
27974  if test "x$complete" != "x$new_complete"; then
27975    OBJCOPY="$new_complete"
27976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27977$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27978  fi
27979
27980    fi
27981  fi
27982
27983  if test -n "$ac_tool_prefix"; then
27984  for ac_prog in gobjdump objdump
27985  do
27986    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27987set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27989$as_echo_n "checking for $ac_word... " >&6; }
27990if ${ac_cv_prog_OBJDUMP+:} false; then :
27991  $as_echo_n "(cached) " >&6
27992else
27993  if test -n "$OBJDUMP"; then
27994  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27995else
27996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27997for as_dir in $PATH
27998do
27999  IFS=$as_save_IFS
28000  test -z "$as_dir" && as_dir=.
28001    for ac_exec_ext in '' $ac_executable_extensions; do
28002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28003    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28005    break 2
28006  fi
28007done
28008  done
28009IFS=$as_save_IFS
28010
28011fi
28012fi
28013OBJDUMP=$ac_cv_prog_OBJDUMP
28014if test -n "$OBJDUMP"; then
28015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28016$as_echo "$OBJDUMP" >&6; }
28017else
28018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28019$as_echo "no" >&6; }
28020fi
28021
28022
28023    test -n "$OBJDUMP" && break
28024  done
28025fi
28026if test -z "$OBJDUMP"; then
28027  ac_ct_OBJDUMP=$OBJDUMP
28028  for ac_prog in gobjdump objdump
28029do
28030  # Extract the first word of "$ac_prog", so it can be a program name with args.
28031set dummy $ac_prog; ac_word=$2
28032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28033$as_echo_n "checking for $ac_word... " >&6; }
28034if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28035  $as_echo_n "(cached) " >&6
28036else
28037  if test -n "$ac_ct_OBJDUMP"; then
28038  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28039else
28040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28041for as_dir in $PATH
28042do
28043  IFS=$as_save_IFS
28044  test -z "$as_dir" && as_dir=.
28045    for ac_exec_ext in '' $ac_executable_extensions; do
28046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28047    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28049    break 2
28050  fi
28051done
28052  done
28053IFS=$as_save_IFS
28054
28055fi
28056fi
28057ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28058if test -n "$ac_ct_OBJDUMP"; then
28059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28060$as_echo "$ac_ct_OBJDUMP" >&6; }
28061else
28062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28063$as_echo "no" >&6; }
28064fi
28065
28066
28067  test -n "$ac_ct_OBJDUMP" && break
28068done
28069
28070  if test "x$ac_ct_OBJDUMP" = x; then
28071    OBJDUMP=""
28072  else
28073    case $cross_compiling:$ac_tool_warned in
28074yes:)
28075{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28076$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28077ac_tool_warned=yes ;;
28078esac
28079    OBJDUMP=$ac_ct_OBJDUMP
28080  fi
28081fi
28082
28083  if test "x$OBJDUMP" != x; then
28084    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28085
28086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28087
28088  # First separate the path from the arguments. This will split at the first
28089  # space.
28090  complete="$OBJDUMP"
28091  path="${complete%% *}"
28092  tmp="$complete EOL"
28093  arguments="${tmp#* }"
28094
28095  # Input might be given as Windows format, start by converting to
28096  # unix format.
28097  new_path=`$CYGPATH -u "$path"`
28098
28099  # Now try to locate executable using which
28100  new_path=`$WHICH "$new_path" 2> /dev/null`
28101  # bat and cmd files are not always considered executable in cygwin causing which
28102  # to not find them
28103  if test "x$new_path" = x \
28104      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28105      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28106    new_path=`$CYGPATH -u "$path"`
28107  fi
28108  if test "x$new_path" = x; then
28109    # Oops. Which didn't find the executable.
28110    # The splitting of arguments from the executable at a space might have been incorrect,
28111    # since paths with space are more likely in Windows. Give it another try with the whole
28112    # argument.
28113    path="$complete"
28114    arguments="EOL"
28115    new_path=`$CYGPATH -u "$path"`
28116    new_path=`$WHICH "$new_path" 2> /dev/null`
28117    # bat and cmd files are not always considered executable in cygwin causing which
28118    # to not find them
28119    if test "x$new_path" = x \
28120        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28121        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28122      new_path=`$CYGPATH -u "$path"`
28123    fi
28124    if test "x$new_path" = x; then
28125      # It's still not found. Now this is an unrecoverable error.
28126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28127$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28128      has_space=`$ECHO "$complete" | $GREP " "`
28129      if test "x$has_space" != x; then
28130        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28131$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28132      fi
28133      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28134    fi
28135  fi
28136
28137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28140  # "foo.exe" is OK but "foo" is an error.
28141  #
28142  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28143  # It is also a way to make sure we got the proper file name for the real test later on.
28144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28145  if test "x$test_shortpath" = x; then
28146    # Short path failed, file does not exist as specified.
28147    # Try adding .exe or .cmd
28148    if test -f "${new_path}.exe"; then
28149      input_to_shortpath="${new_path}.exe"
28150    elif test -f "${new_path}.cmd"; then
28151      input_to_shortpath="${new_path}.cmd"
28152    else
28153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28154$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28155      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28156$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28157      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28158    fi
28159  else
28160    input_to_shortpath="$new_path"
28161  fi
28162
28163  # Call helper function which possibly converts this using DOS-style short mode.
28164  # If so, the updated path is stored in $new_path.
28165  new_path="$input_to_shortpath"
28166
28167  input_path="$input_to_shortpath"
28168  # Check if we need to convert this using DOS-style short mode. If the path
28169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28170  # take no chances and rewrite it.
28171  # Note: m4 eats our [], so we need to use [ and ] instead.
28172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28173  if test "x$has_forbidden_chars" != x; then
28174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28178      # Going to short mode and back again did indeed matter. Since short mode is
28179      # case insensitive, let's make it lowercase to improve readability.
28180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28181      # Now convert it back to Unix-stile (cygpath)
28182      input_path=`$CYGPATH -u "$shortmode_path"`
28183      new_path="$input_path"
28184    fi
28185  fi
28186
28187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28188  if test "x$test_cygdrive_prefix" = x; then
28189    # As a simple fix, exclude /usr/bin since it's not a real path.
28190    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28192      # a path prefixed by /cygdrive for fixpath to work.
28193      new_path="$CYGWIN_ROOT_PATH$input_path"
28194    fi
28195  fi
28196
28197  # remove trailing .exe if any
28198  new_path="${new_path/%.exe/}"
28199
28200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28201
28202  # First separate the path from the arguments. This will split at the first
28203  # space.
28204  complete="$OBJDUMP"
28205  path="${complete%% *}"
28206  tmp="$complete EOL"
28207  arguments="${tmp#* }"
28208
28209  # Input might be given as Windows format, start by converting to
28210  # unix format.
28211  new_path="$path"
28212
28213  windows_path="$new_path"
28214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28215    unix_path=`$CYGPATH -u "$windows_path"`
28216    new_path="$unix_path"
28217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28219    new_path="$unix_path"
28220  fi
28221
28222
28223  # Now try to locate executable using which
28224  new_path=`$WHICH "$new_path" 2> /dev/null`
28225
28226  if test "x$new_path" = x; then
28227    # Oops. Which didn't find the executable.
28228    # The splitting of arguments from the executable at a space might have been incorrect,
28229    # since paths with space are more likely in Windows. Give it another try with the whole
28230    # argument.
28231    path="$complete"
28232    arguments="EOL"
28233    new_path="$path"
28234
28235  windows_path="$new_path"
28236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28237    unix_path=`$CYGPATH -u "$windows_path"`
28238    new_path="$unix_path"
28239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28241    new_path="$unix_path"
28242  fi
28243
28244
28245    new_path=`$WHICH "$new_path" 2> /dev/null`
28246
28247    if test "x$new_path" = x; then
28248      # It's still not found. Now this is an unrecoverable error.
28249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28250$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28251      has_space=`$ECHO "$complete" | $GREP " "`
28252      if test "x$has_space" != x; then
28253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28255      fi
28256      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28257    fi
28258  fi
28259
28260  # Now new_path has a complete unix path to the binary
28261  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28262    # Keep paths in /bin as-is, but remove trailing .exe if any
28263    new_path="${new_path/%.exe/}"
28264    # Do not save /bin paths to all_fixpath_prefixes!
28265  else
28266    # Not in mixed or Windows style, start by that.
28267    new_path=`cmd //c echo $new_path`
28268
28269  input_path="$new_path"
28270  # Check if we need to convert this using DOS-style short mode. If the path
28271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28272  # take no chances and rewrite it.
28273  # Note: m4 eats our [], so we need to use [ and ] instead.
28274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28275  if test "x$has_forbidden_chars" != x; then
28276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28278  fi
28279
28280    # Output is in $new_path
28281
28282  windows_path="$new_path"
28283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28284    unix_path=`$CYGPATH -u "$windows_path"`
28285    new_path="$unix_path"
28286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28288    new_path="$unix_path"
28289  fi
28290
28291    # remove trailing .exe if any
28292    new_path="${new_path/%.exe/}"
28293
28294    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28295    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28296  fi
28297
28298  else
28299    # We're on a posix platform. Hooray! :)
28300    # First separate the path from the arguments. This will split at the first
28301    # space.
28302    complete="$OBJDUMP"
28303    path="${complete%% *}"
28304    tmp="$complete EOL"
28305    arguments="${tmp#* }"
28306
28307    # Cannot rely on the command "which" here since it doesn't always work.
28308    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28309    if test -z "$is_absolute_path"; then
28310      # Path to executable is not absolute. Find it.
28311      IFS_save="$IFS"
28312      IFS=:
28313      for p in $PATH; do
28314        if test -f "$p/$path" && test -x "$p/$path"; then
28315          new_path="$p/$path"
28316          break
28317        fi
28318      done
28319      IFS="$IFS_save"
28320    else
28321      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28322$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28323      new_path="$path"
28324    fi
28325
28326    if test "x$new_path" = x; then
28327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28328$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28329      has_space=`$ECHO "$complete" | $GREP " "`
28330      if test "x$has_space" != x; then
28331        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28332$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28333      fi
28334      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28335    fi
28336  fi
28337
28338  # Now join together the path and the arguments once again
28339  if test "x$arguments" != xEOL; then
28340    new_complete="$new_path ${arguments% *}"
28341  else
28342    new_complete="$new_path"
28343  fi
28344
28345  if test "x$complete" != "x$new_complete"; then
28346    OBJDUMP="$new_complete"
28347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28348$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28349  fi
28350
28351  fi
28352
28353  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28354    # Extract the first word of "lipo", so it can be a program name with args.
28355set dummy lipo; ac_word=$2
28356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28357$as_echo_n "checking for $ac_word... " >&6; }
28358if ${ac_cv_path_LIPO+:} false; then :
28359  $as_echo_n "(cached) " >&6
28360else
28361  case $LIPO in
28362  [\\/]* | ?:[\\/]*)
28363  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28364  ;;
28365  *)
28366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28367for as_dir in $PATH
28368do
28369  IFS=$as_save_IFS
28370  test -z "$as_dir" && as_dir=.
28371    for ac_exec_ext in '' $ac_executable_extensions; do
28372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28373    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28375    break 2
28376  fi
28377done
28378  done
28379IFS=$as_save_IFS
28380
28381  ;;
28382esac
28383fi
28384LIPO=$ac_cv_path_LIPO
28385if test -n "$LIPO"; then
28386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28387$as_echo "$LIPO" >&6; }
28388else
28389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28390$as_echo "no" >&6; }
28391fi
28392
28393
28394
28395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28396
28397  # First separate the path from the arguments. This will split at the first
28398  # space.
28399  complete="$LIPO"
28400  path="${complete%% *}"
28401  tmp="$complete EOL"
28402  arguments="${tmp#* }"
28403
28404  # Input might be given as Windows format, start by converting to
28405  # unix format.
28406  new_path=`$CYGPATH -u "$path"`
28407
28408  # Now try to locate executable using which
28409  new_path=`$WHICH "$new_path" 2> /dev/null`
28410  # bat and cmd files are not always considered executable in cygwin causing which
28411  # to not find them
28412  if test "x$new_path" = x \
28413      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28414      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28415    new_path=`$CYGPATH -u "$path"`
28416  fi
28417  if test "x$new_path" = x; then
28418    # Oops. Which didn't find the executable.
28419    # The splitting of arguments from the executable at a space might have been incorrect,
28420    # since paths with space are more likely in Windows. Give it another try with the whole
28421    # argument.
28422    path="$complete"
28423    arguments="EOL"
28424    new_path=`$CYGPATH -u "$path"`
28425    new_path=`$WHICH "$new_path" 2> /dev/null`
28426    # bat and cmd files are not always considered executable in cygwin causing which
28427    # to not find them
28428    if test "x$new_path" = x \
28429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28431      new_path=`$CYGPATH -u "$path"`
28432    fi
28433    if test "x$new_path" = x; then
28434      # It's still not found. Now this is an unrecoverable error.
28435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28436$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28437      has_space=`$ECHO "$complete" | $GREP " "`
28438      if test "x$has_space" != x; then
28439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28441      fi
28442      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28443    fi
28444  fi
28445
28446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28449  # "foo.exe" is OK but "foo" is an error.
28450  #
28451  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28452  # It is also a way to make sure we got the proper file name for the real test later on.
28453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28454  if test "x$test_shortpath" = x; then
28455    # Short path failed, file does not exist as specified.
28456    # Try adding .exe or .cmd
28457    if test -f "${new_path}.exe"; then
28458      input_to_shortpath="${new_path}.exe"
28459    elif test -f "${new_path}.cmd"; then
28460      input_to_shortpath="${new_path}.cmd"
28461    else
28462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28463$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28464      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28465$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28466      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28467    fi
28468  else
28469    input_to_shortpath="$new_path"
28470  fi
28471
28472  # Call helper function which possibly converts this using DOS-style short mode.
28473  # If so, the updated path is stored in $new_path.
28474  new_path="$input_to_shortpath"
28475
28476  input_path="$input_to_shortpath"
28477  # Check if we need to convert this using DOS-style short mode. If the path
28478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28479  # take no chances and rewrite it.
28480  # Note: m4 eats our [], so we need to use [ and ] instead.
28481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28482  if test "x$has_forbidden_chars" != x; then
28483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28487      # Going to short mode and back again did indeed matter. Since short mode is
28488      # case insensitive, let's make it lowercase to improve readability.
28489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28490      # Now convert it back to Unix-stile (cygpath)
28491      input_path=`$CYGPATH -u "$shortmode_path"`
28492      new_path="$input_path"
28493    fi
28494  fi
28495
28496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28497  if test "x$test_cygdrive_prefix" = x; then
28498    # As a simple fix, exclude /usr/bin since it's not a real path.
28499    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28501      # a path prefixed by /cygdrive for fixpath to work.
28502      new_path="$CYGWIN_ROOT_PATH$input_path"
28503    fi
28504  fi
28505
28506  # remove trailing .exe if any
28507  new_path="${new_path/%.exe/}"
28508
28509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28510
28511  # First separate the path from the arguments. This will split at the first
28512  # space.
28513  complete="$LIPO"
28514  path="${complete%% *}"
28515  tmp="$complete EOL"
28516  arguments="${tmp#* }"
28517
28518  # Input might be given as Windows format, start by converting to
28519  # unix format.
28520  new_path="$path"
28521
28522  windows_path="$new_path"
28523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28524    unix_path=`$CYGPATH -u "$windows_path"`
28525    new_path="$unix_path"
28526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28528    new_path="$unix_path"
28529  fi
28530
28531
28532  # Now try to locate executable using which
28533  new_path=`$WHICH "$new_path" 2> /dev/null`
28534
28535  if test "x$new_path" = x; then
28536    # Oops. Which didn't find the executable.
28537    # The splitting of arguments from the executable at a space might have been incorrect,
28538    # since paths with space are more likely in Windows. Give it another try with the whole
28539    # argument.
28540    path="$complete"
28541    arguments="EOL"
28542    new_path="$path"
28543
28544  windows_path="$new_path"
28545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28546    unix_path=`$CYGPATH -u "$windows_path"`
28547    new_path="$unix_path"
28548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28550    new_path="$unix_path"
28551  fi
28552
28553
28554    new_path=`$WHICH "$new_path" 2> /dev/null`
28555
28556    if test "x$new_path" = x; then
28557      # It's still not found. Now this is an unrecoverable error.
28558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28559$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28560      has_space=`$ECHO "$complete" | $GREP " "`
28561      if test "x$has_space" != x; then
28562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28564      fi
28565      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28566    fi
28567  fi
28568
28569  # Now new_path has a complete unix path to the binary
28570  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28571    # Keep paths in /bin as-is, but remove trailing .exe if any
28572    new_path="${new_path/%.exe/}"
28573    # Do not save /bin paths to all_fixpath_prefixes!
28574  else
28575    # Not in mixed or Windows style, start by that.
28576    new_path=`cmd //c echo $new_path`
28577
28578  input_path="$new_path"
28579  # Check if we need to convert this using DOS-style short mode. If the path
28580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28581  # take no chances and rewrite it.
28582  # Note: m4 eats our [], so we need to use [ and ] instead.
28583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28584  if test "x$has_forbidden_chars" != x; then
28585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28587  fi
28588
28589    # Output is in $new_path
28590
28591  windows_path="$new_path"
28592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28593    unix_path=`$CYGPATH -u "$windows_path"`
28594    new_path="$unix_path"
28595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28597    new_path="$unix_path"
28598  fi
28599
28600    # remove trailing .exe if any
28601    new_path="${new_path/%.exe/}"
28602
28603    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28604    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28605  fi
28606
28607  else
28608    # We're on a posix platform. Hooray! :)
28609    # First separate the path from the arguments. This will split at the first
28610    # space.
28611    complete="$LIPO"
28612    path="${complete%% *}"
28613    tmp="$complete EOL"
28614    arguments="${tmp#* }"
28615
28616    # Cannot rely on the command "which" here since it doesn't always work.
28617    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28618    if test -z "$is_absolute_path"; then
28619      # Path to executable is not absolute. Find it.
28620      IFS_save="$IFS"
28621      IFS=:
28622      for p in $PATH; do
28623        if test -f "$p/$path" && test -x "$p/$path"; then
28624          new_path="$p/$path"
28625          break
28626        fi
28627      done
28628      IFS="$IFS_save"
28629    else
28630      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28631$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28632      new_path="$path"
28633    fi
28634
28635    if test "x$new_path" = x; then
28636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28637$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28638      has_space=`$ECHO "$complete" | $GREP " "`
28639      if test "x$has_space" != x; then
28640        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28641$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28642      fi
28643      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28644    fi
28645  fi
28646
28647  # Now join together the path and the arguments once again
28648  if test "x$arguments" != xEOL; then
28649    new_complete="$new_path ${arguments% *}"
28650  else
28651    new_complete="$new_path"
28652  fi
28653
28654  if test "x$complete" != "x$new_complete"; then
28655    LIPO="$new_complete"
28656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28657$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28658  fi
28659
28660  fi
28661
28662
28663
28664  # Restore old path without tools dir
28665  PATH="$OLD_PATH"
28666
28667
28668# FIXME: Currently we must test this after paths but before flags. Fix!
28669
28670# And we can test some aspects on the target using configure macros.
28671
28672
28673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28674$as_echo_n "checking for ANSI C header files... " >&6; }
28675if ${ac_cv_header_stdc+:} false; then :
28676  $as_echo_n "(cached) " >&6
28677else
28678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28679/* end confdefs.h.  */
28680#include <stdlib.h>
28681#include <stdarg.h>
28682#include <string.h>
28683#include <float.h>
28684
28685int
28686main ()
28687{
28688
28689  ;
28690  return 0;
28691}
28692_ACEOF
28693if ac_fn_cxx_try_compile "$LINENO"; then :
28694  ac_cv_header_stdc=yes
28695else
28696  ac_cv_header_stdc=no
28697fi
28698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28699
28700if test $ac_cv_header_stdc = yes; then
28701  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28703/* end confdefs.h.  */
28704#include <string.h>
28705
28706_ACEOF
28707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28708  $EGREP "memchr" >/dev/null 2>&1; then :
28709
28710else
28711  ac_cv_header_stdc=no
28712fi
28713rm -f conftest*
28714
28715fi
28716
28717if test $ac_cv_header_stdc = yes; then
28718  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28720/* end confdefs.h.  */
28721#include <stdlib.h>
28722
28723_ACEOF
28724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28725  $EGREP "free" >/dev/null 2>&1; then :
28726
28727else
28728  ac_cv_header_stdc=no
28729fi
28730rm -f conftest*
28731
28732fi
28733
28734if test $ac_cv_header_stdc = yes; then
28735  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28736  if test "$cross_compiling" = yes; then :
28737  :
28738else
28739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28740/* end confdefs.h.  */
28741#include <ctype.h>
28742#include <stdlib.h>
28743#if ((' ' & 0x0FF) == 0x020)
28744# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28745# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28746#else
28747# define ISLOWER(c) \
28748		   (('a' <= (c) && (c) <= 'i') \
28749		     || ('j' <= (c) && (c) <= 'r') \
28750		     || ('s' <= (c) && (c) <= 'z'))
28751# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28752#endif
28753
28754#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28755int
28756main ()
28757{
28758  int i;
28759  for (i = 0; i < 256; i++)
28760    if (XOR (islower (i), ISLOWER (i))
28761	|| toupper (i) != TOUPPER (i))
28762      return 2;
28763  return 0;
28764}
28765_ACEOF
28766if ac_fn_cxx_try_run "$LINENO"; then :
28767
28768else
28769  ac_cv_header_stdc=no
28770fi
28771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28772  conftest.$ac_objext conftest.beam conftest.$ac_ext
28773fi
28774
28775fi
28776fi
28777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28778$as_echo "$ac_cv_header_stdc" >&6; }
28779if test $ac_cv_header_stdc = yes; then
28780
28781$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28782
28783fi
28784
28785# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28786for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28787		  inttypes.h stdint.h unistd.h
28788do :
28789  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28790ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28791"
28792if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28793  cat >>confdefs.h <<_ACEOF
28794#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28795_ACEOF
28796
28797fi
28798
28799done
28800
28801
28802
28803  ###############################################################################
28804  #
28805  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28806  # (The JVM can use 32 or 64 bit Java pointers but that decision
28807  # is made at runtime.)
28808  #
28809
28810  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28811    # Always specify -m flags on Solaris
28812
28813  # When we add flags to the "official" CFLAGS etc, we need to
28814  # keep track of these additions in ADDED_CFLAGS etc. These
28815  # will later be checked to make sure only controlled additions
28816  # have been made to CFLAGS etc.
28817  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28818  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28819  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28820
28821  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28822  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28823  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28824
28825  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28826  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28827  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28828
28829  elif test "x$COMPILE_TYPE" = xreduced; then
28830    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28831      # Specify -m if running reduced on other Posix platforms
28832
28833  # When we add flags to the "official" CFLAGS etc, we need to
28834  # keep track of these additions in ADDED_CFLAGS etc. These
28835  # will later be checked to make sure only controlled additions
28836  # have been made to CFLAGS etc.
28837  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28838  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28839  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28840
28841  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28842  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28843  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28844
28845  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28846  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28847  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28848
28849    fi
28850  fi
28851
28852  # Make compilation sanity check
28853  for ac_header in stdio.h
28854do :
28855  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28856if test "x$ac_cv_header_stdio_h" = xyes; then :
28857  cat >>confdefs.h <<_ACEOF
28858#define HAVE_STDIO_H 1
28859_ACEOF
28860
28861else
28862
28863    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28864$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28865    if test "x$COMPILE_TYPE" = xreduced; then
28866      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28867$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28868    elif test "x$COMPILE_TYPE" = xcross; then
28869      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28870$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28871    fi
28872    as_fn_error $? "Cannot continue." "$LINENO" 5
28873
28874fi
28875
28876done
28877
28878
28879  # The cast to long int works around a bug in the HP C Compiler
28880# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28881# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28882# This bug is HP SR number 8606223364.
28883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28884$as_echo_n "checking size of int *... " >&6; }
28885if ${ac_cv_sizeof_int_p+:} false; then :
28886  $as_echo_n "(cached) " >&6
28887else
28888  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28889
28890else
28891  if test "$ac_cv_type_int_p" = yes; then
28892     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28894as_fn_error 77 "cannot compute sizeof (int *)
28895See \`config.log' for more details" "$LINENO" 5; }
28896   else
28897     ac_cv_sizeof_int_p=0
28898   fi
28899fi
28900
28901fi
28902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28903$as_echo "$ac_cv_sizeof_int_p" >&6; }
28904
28905
28906
28907cat >>confdefs.h <<_ACEOF
28908#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28909_ACEOF
28910
28911
28912
28913  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28914    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28915    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28916  fi
28917
28918  if test "x$SIZEOF_INT_P" = x; then
28919    # The test failed, lets stick to the assumed value.
28920    { $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
28921$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28922  else
28923    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28924
28925    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28926      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
28927    fi
28928  fi
28929
28930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28931$as_echo_n "checking for target address size... " >&6; }
28932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28933$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28934
28935
28936  ###############################################################################
28937  #
28938  # Is the target little of big endian?
28939  #
28940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28941$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28942if ${ac_cv_c_bigendian+:} false; then :
28943  $as_echo_n "(cached) " >&6
28944else
28945  ac_cv_c_bigendian=unknown
28946    # See if we're dealing with a universal compiler.
28947    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28948/* end confdefs.h.  */
28949#ifndef __APPLE_CC__
28950	       not a universal capable compiler
28951	     #endif
28952	     typedef int dummy;
28953
28954_ACEOF
28955if ac_fn_cxx_try_compile "$LINENO"; then :
28956
28957	# Check for potential -arch flags.  It is not universal unless
28958	# there are at least two -arch flags with different values.
28959	ac_arch=
28960	ac_prev=
28961	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28962	 if test -n "$ac_prev"; then
28963	   case $ac_word in
28964	     i?86 | x86_64 | ppc | ppc64)
28965	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28966		 ac_arch=$ac_word
28967	       else
28968		 ac_cv_c_bigendian=universal
28969		 break
28970	       fi
28971	       ;;
28972	   esac
28973	   ac_prev=
28974	 elif test "x$ac_word" = "x-arch"; then
28975	   ac_prev=arch
28976	 fi
28977       done
28978fi
28979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28980    if test $ac_cv_c_bigendian = unknown; then
28981      # See if sys/param.h defines the BYTE_ORDER macro.
28982      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28983/* end confdefs.h.  */
28984#include <sys/types.h>
28985	     #include <sys/param.h>
28986
28987int
28988main ()
28989{
28990#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28991		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28992		     && LITTLE_ENDIAN)
28993	      bogus endian macros
28994	     #endif
28995
28996  ;
28997  return 0;
28998}
28999_ACEOF
29000if ac_fn_cxx_try_compile "$LINENO"; then :
29001  # It does; now see whether it defined to BIG_ENDIAN or not.
29002	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29003/* end confdefs.h.  */
29004#include <sys/types.h>
29005		#include <sys/param.h>
29006
29007int
29008main ()
29009{
29010#if BYTE_ORDER != BIG_ENDIAN
29011		 not big endian
29012		#endif
29013
29014  ;
29015  return 0;
29016}
29017_ACEOF
29018if ac_fn_cxx_try_compile "$LINENO"; then :
29019  ac_cv_c_bigendian=yes
29020else
29021  ac_cv_c_bigendian=no
29022fi
29023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29024fi
29025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29026    fi
29027    if test $ac_cv_c_bigendian = unknown; then
29028      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29029      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29030/* end confdefs.h.  */
29031#include <limits.h>
29032
29033int
29034main ()
29035{
29036#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29037	      bogus endian macros
29038	     #endif
29039
29040  ;
29041  return 0;
29042}
29043_ACEOF
29044if ac_fn_cxx_try_compile "$LINENO"; then :
29045  # It does; now see whether it defined to _BIG_ENDIAN or not.
29046	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29047/* end confdefs.h.  */
29048#include <limits.h>
29049
29050int
29051main ()
29052{
29053#ifndef _BIG_ENDIAN
29054		 not big endian
29055		#endif
29056
29057  ;
29058  return 0;
29059}
29060_ACEOF
29061if ac_fn_cxx_try_compile "$LINENO"; then :
29062  ac_cv_c_bigendian=yes
29063else
29064  ac_cv_c_bigendian=no
29065fi
29066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29067fi
29068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29069    fi
29070    if test $ac_cv_c_bigendian = unknown; then
29071      # Compile a test program.
29072      if test "$cross_compiling" = yes; then :
29073  # Try to guess by grepping values from an object file.
29074	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29075/* end confdefs.h.  */
29076short int ascii_mm[] =
29077		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29078		short int ascii_ii[] =
29079		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29080		int use_ascii (int i) {
29081		  return ascii_mm[i] + ascii_ii[i];
29082		}
29083		short int ebcdic_ii[] =
29084		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29085		short int ebcdic_mm[] =
29086		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29087		int use_ebcdic (int i) {
29088		  return ebcdic_mm[i] + ebcdic_ii[i];
29089		}
29090		extern int foo;
29091
29092int
29093main ()
29094{
29095return use_ascii (foo) == use_ebcdic (foo);
29096  ;
29097  return 0;
29098}
29099_ACEOF
29100if ac_fn_cxx_try_compile "$LINENO"; then :
29101  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29102	      ac_cv_c_bigendian=yes
29103	    fi
29104	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29105	      if test "$ac_cv_c_bigendian" = unknown; then
29106		ac_cv_c_bigendian=no
29107	      else
29108		# finding both strings is unlikely to happen, but who knows?
29109		ac_cv_c_bigendian=unknown
29110	      fi
29111	    fi
29112fi
29113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29114else
29115  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29116/* end confdefs.h.  */
29117$ac_includes_default
29118int
29119main ()
29120{
29121
29122	     /* Are we little or big endian?  From Harbison&Steele.  */
29123	     union
29124	     {
29125	       long int l;
29126	       char c[sizeof (long int)];
29127	     } u;
29128	     u.l = 1;
29129	     return u.c[sizeof (long int) - 1] == 1;
29130
29131  ;
29132  return 0;
29133}
29134_ACEOF
29135if ac_fn_cxx_try_run "$LINENO"; then :
29136  ac_cv_c_bigendian=no
29137else
29138  ac_cv_c_bigendian=yes
29139fi
29140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29141  conftest.$ac_objext conftest.beam conftest.$ac_ext
29142fi
29143
29144    fi
29145fi
29146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29147$as_echo "$ac_cv_c_bigendian" >&6; }
29148 case $ac_cv_c_bigendian in #(
29149   yes)
29150     ENDIAN="big";; #(
29151   no)
29152     ENDIAN="little" ;; #(
29153   universal)
29154     ENDIAN="universal_endianness"
29155     ;; #(
29156   *)
29157     ENDIAN="unknown" ;;
29158 esac
29159
29160
29161  if test "x$ENDIAN" = xuniversal_endianness; then
29162    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29163  fi
29164  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29165    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
29166  fi
29167
29168
29169# Configure flags for the tools
29170
29171
29172  ###############################################################################
29173  #
29174  # How to compile shared libraries.
29175  #
29176
29177  if test "x$GCC" = xyes; then
29178    COMPILER_NAME=gcc
29179    PICFLAG="-fPIC"
29180    LIBRARY_PREFIX=lib
29181    SHARED_LIBRARY='lib$1.so'
29182    STATIC_LIBRARY='lib$1.a'
29183    SHARED_LIBRARY_FLAGS="-shared"
29184    SHARED_LIBRARY_SUFFIX='.so'
29185    STATIC_LIBRARY_SUFFIX='.a'
29186    OBJ_SUFFIX='.o'
29187    EXE_SUFFIX=''
29188    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29189    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29190    C_FLAG_REORDER=''
29191    CXX_FLAG_REORDER=''
29192    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29193    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29194    LD="$CC"
29195    LDEXE="$CC"
29196    LDCXX="$CXX"
29197    LDEXECXX="$CXX"
29198    POST_STRIP_CMD="$STRIP -g"
29199
29200    # Linking is different on MacOSX
29201    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29202      # Might change in the future to clang.
29203      COMPILER_NAME=gcc
29204      SHARED_LIBRARY='lib$1.dylib'
29205      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29206      SHARED_LIBRARY_SUFFIX='.dylib'
29207      EXE_SUFFIX=''
29208      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29209      SET_SHARED_LIBRARY_MAPFILE=''
29210      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29211      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29212      POST_STRIP_CMD="$STRIP -S"
29213    fi
29214  else
29215    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29216      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29217      COMPILER_NAME=ossc
29218      PICFLAG="-KPIC"
29219      LIBRARY_PREFIX=lib
29220      SHARED_LIBRARY='lib$1.so'
29221      STATIC_LIBRARY='lib$1.a'
29222      SHARED_LIBRARY_FLAGS="-G"
29223      SHARED_LIBRARY_SUFFIX='.so'
29224      STATIC_LIBRARY_SUFFIX='.a'
29225      OBJ_SUFFIX='.o'
29226      EXE_SUFFIX=''
29227      SET_SHARED_LIBRARY_NAME=''
29228      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29229      C_FLAG_REORDER='-xF'
29230      CXX_FLAG_REORDER='-xF'
29231      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29232      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29233      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29234      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29235      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29236      POST_STRIP_CMD="$STRIP -x"
29237      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29238    fi
29239    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29240      # If it is not gcc, then assume it is the MS Visual Studio compiler
29241      COMPILER_NAME=cl
29242      PICFLAG=""
29243      LIBRARY_PREFIX=
29244      SHARED_LIBRARY='$1.dll'
29245      STATIC_LIBRARY='$1.lib'
29246      SHARED_LIBRARY_FLAGS="-LD"
29247      SHARED_LIBRARY_SUFFIX='.dll'
29248      STATIC_LIBRARY_SUFFIX='.lib'
29249      OBJ_SUFFIX='.obj'
29250      EXE_SUFFIX='.exe'
29251      SET_SHARED_LIBRARY_NAME=''
29252      SET_SHARED_LIBRARY_MAPFILE=''
29253      SET_SHARED_LIBRARY_ORIGIN=''
29254      SET_EXECUTABLE_ORIGIN=''
29255    fi
29256  fi
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276  # The (cross) compiler is now configured, we can now test capabilities
29277  # of the target platform.
29278
29279
29280
29281  ###############################################################################
29282  #
29283  # Setup the opt flags for different compilers
29284  # and different operating systems.
29285  #
29286
29287  #
29288  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29289  #
29290  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29291    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29292    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29293    CFLAGS="$CFLAGS -mstackrealign"
29294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29295$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29296    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29297/* end confdefs.h.  */
29298int main() { return 0; }
29299_ACEOF
29300if ac_fn_cxx_try_link "$LINENO"; then :
29301
29302          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29303$as_echo "yes" >&6; }
29304
29305else
29306
29307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29308$as_echo "no" >&6; }
29309          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29310
29311
29312fi
29313rm -f core conftest.err conftest.$ac_objext \
29314    conftest$ac_exeext conftest.$ac_ext
29315  fi
29316
29317  C_FLAG_DEPS="-MMD -MF"
29318  CXX_FLAG_DEPS="-MMD -MF"
29319
29320  case $COMPILER_TYPE in
29321    CC )
29322      case $COMPILER_NAME in
29323        gcc )
29324          case $OPENJDK_TARGET_OS in
29325            macosx )
29326              # On MacOSX we optimize for size, something
29327              # we should do for all platforms?
29328              C_O_FLAG_HI="-Os"
29329              C_O_FLAG_NORM="-Os"
29330              C_O_FLAG_NONE=""
29331              ;;
29332            *)
29333              C_O_FLAG_HI="-O3"
29334              C_O_FLAG_NORM="-O2"
29335              C_O_FLAG_NONE="-O0"
29336              ;;
29337          esac
29338          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29339          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29340          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29341          CFLAGS_DEBUG_SYMBOLS="-g"
29342          CXXFLAGS_DEBUG_SYMBOLS="-g"
29343          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29344            CFLAGS_DEBUG_SYMBOLS="-g1"
29345            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29346          fi
29347          ;;
29348        ossc )
29349          #
29350          # Forte has different names for this with their C++ compiler...
29351          #
29352          C_FLAG_DEPS="-xMMD -xMF"
29353          CXX_FLAG_DEPS="-xMMD -xMF"
29354
29355          # Extra options used with HIGHEST
29356          #
29357          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29358          #          done with care, there are some assumptions below that need to
29359          #          be understood about the use of pointers, and IEEE behavior.
29360          #
29361          # Use non-standard floating point mode (not IEEE 754)
29362          CC_HIGHEST="$CC_HIGHEST -fns"
29363          # Do some simplification of floating point arithmetic (not IEEE 754)
29364          CC_HIGHEST="$CC_HIGHEST -fsimple"
29365          # Use single precision floating point with 'float'
29366          CC_HIGHEST="$CC_HIGHEST -fsingle"
29367          # Assume memory references via basic pointer types do not alias
29368          #   (Source with excessing pointer casting and data access with mixed
29369          #    pointer types are not recommended)
29370          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29371          # Use intrinsic or inline versions for math/std functions
29372          #   (If you expect perfect errno behavior, do not use this)
29373          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29374          # Loop data dependency optimizations (need -xO3 or higher)
29375          CC_HIGHEST="$CC_HIGHEST -xdepend"
29376          # Pointer parameters to functions do not overlap
29377          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29378          #    If you pass in multiple pointers to the same data, do not use this)
29379          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29380          # Inline some library routines
29381          #   (If you expect perfect errno behavior, do not use this)
29382          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29383          # Use optimized math routines
29384          #   (If you expect perfect errno behavior, do not use this)
29385          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29386          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29387
29388          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29389            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29390            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29391          fi
29392
29393          case $OPENJDK_TARGET_CPU_ARCH in
29394            x86)
29395              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29396              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29397              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29398              C_O_FLAG_NONE="-xregs=no%frameptr"
29399              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29400              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29401              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29402              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29403              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29404                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29405                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29406              fi
29407              ;;
29408            sparc)
29409              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29410              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29411              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29412              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29413              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29414              C_O_FLAG_NONE=""
29415              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29416              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29417              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29418              CXX_O_FLAG_NONE=""
29419              ;;
29420          esac
29421
29422          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29423          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29424      esac
29425      ;;
29426    CL )
29427      C_O_FLAG_HIGHEST="-O2"
29428      C_O_FLAG_HI="-O1"
29429      C_O_FLAG_NORM="-O1"
29430      C_O_FLAG_NONE="-Od"
29431      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29432      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29433      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29434      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29435      ;;
29436  esac
29437
29438  if test -z "$C_O_FLAG_HIGHEST"; then
29439    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29440  fi
29441
29442  if test -z "$CXX_O_FLAG_HIGHEST"; then
29443    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29444  fi
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29461$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29462  fi
29463
29464  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29465    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29466$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29467  fi
29468
29469  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29471$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29472  fi
29473
29474
29475# Check whether --with-extra-cflags was given.
29476if test "${with_extra_cflags+set}" = set; then :
29477  withval=$with_extra_cflags;
29478fi
29479
29480
29481
29482# Check whether --with-extra-cxxflags was given.
29483if test "${with_extra_cxxflags+set}" = set; then :
29484  withval=$with_extra_cxxflags;
29485fi
29486
29487
29488
29489# Check whether --with-extra-ldflags was given.
29490if test "${with_extra_ldflags+set}" = set; then :
29491  withval=$with_extra_ldflags;
29492fi
29493
29494
29495  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29496  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29497  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29498
29499  # Hotspot needs these set in their legacy form
29500  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29501  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29502  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29503
29504
29505
29506
29507
29508  ###############################################################################
29509  #
29510  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29511  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29512  #
29513  case $COMPILER_NAME in
29514    gcc )
29515      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29516      -pipe \
29517      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29518      case $OPENJDK_TARGET_CPU_ARCH in
29519        arm )
29520          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29521          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29522          ;;
29523        ppc )
29524          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29525          ;;
29526        * )
29527          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29528          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29529          ;;
29530      esac
29531      ;;
29532    ossc )
29533      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29534      case $OPENJDK_TARGET_CPU_ARCH in
29535        x86 )
29536          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29537          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29538          ;;
29539      esac
29540
29541      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29542      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29543
29544      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29545      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29546      ;;
29547    cl )
29548      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29549      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29550      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29551      -DWIN32 -DIAL"
29552      case $OPENJDK_TARGET_CPU in
29553        x86 )
29554          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29555          ;;
29556        x86_64 )
29557          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29558          ;;
29559      esac
29560      ;;
29561  esac
29562
29563  ###############################################################################
29564
29565  # Adjust flags according to debug level.
29566  case $DEBUG_LEVEL in
29567    fastdebug )
29568      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29569      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29570      C_O_FLAG_HI="$C_O_FLAG_NORM"
29571      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29572      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29573      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29574      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29575      ;;
29576    slowdebug )
29577      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29578      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29579      C_O_FLAG_HI="$C_O_FLAG_NONE"
29580      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29581      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29582      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29583      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29584      ;;
29585  esac
29586
29587  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29588
29589  # The package path is used only on macosx?
29590  PACKAGE_PATH=/opt/local
29591
29592
29593  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29594    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29595    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29596    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29597    #   Note: -Dmacro         is the same as    #define macro 1
29598    #         -Dmacro=        is the same as    #define macro
29599    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29600      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29601    else
29602      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29603    fi
29604  else
29605    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29606  fi
29607  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29608    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29609  fi
29610  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29611    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29612  fi
29613  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29614    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29615  fi
29616  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29617    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29618    # Setting these parameters makes it an error to link to macosx APIs that are
29619    # newer than the given OS version and makes the linked binaries compatible even
29620    # if built on a newer version of the OS.
29621    # The expected format is X.Y.Z
29622    MACOSX_VERSION_MIN=10.7.0
29623
29624    # The macro takes the version with no dots, ex: 1070
29625    # Let the flags variables get resolved in make for easier override on make
29626    # command line.
29627    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29628    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29629  fi
29630  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29631    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29632  fi
29633  if test "x$DEBUG_LEVEL" = xrelease; then
29634    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29635  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29636    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29637  fi
29638  else
29639    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29640  fi
29641
29642  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29643  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29644
29645  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29646      -I${JDK_OUTPUTDIR}/include \
29647      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29648      -I${JDK_TOPDIR}/src/share/javavm/export \
29649      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29650      -I${JDK_TOPDIR}/src/share/native/common \
29651      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29652
29653  # The shared libraries are compiled using the picflag.
29654  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29655  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29656
29657  # Executable flags
29658  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29659  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29660
29661  # Now this is odd. The JDK native libraries have to link against libjvm.so
29662  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29663  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29664  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29665  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29666  # libraries will link to whatever is in memory. Yuck.
29667  #
29668  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29669  if test "x$COMPILER_NAME" = xcl; then
29670    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29671    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29672      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29673    fi
29674    # TODO: make -debug optional "--disable-full-debug-symbols"
29675    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29676    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29677    LDFLAGS_JDKLIB_SUFFIX=""
29678    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29679      LDFLAGS_STACK_SIZE=1048576
29680    else
29681      LDFLAGS_STACK_SIZE=327680
29682    fi
29683    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29684  else
29685    if test "x$COMPILER_NAME" = xgcc; then
29686      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29687      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29688      if test -n "$HAS_GNU_HASH"; then
29689        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29690      fi
29691      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29692        # And since we now know that the linker is gnu, then add -z defs, to forbid
29693        # undefined symbols in object files.
29694        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29695        if test "x$DEBUG_LEVEL" = "xrelease"; then
29696          # When building release libraries, tell the linker optimize them.
29697          # Should this be supplied to the OSS linker as well?
29698          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29699        fi
29700      fi
29701    fi
29702    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29703        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29704
29705    # On some platforms (mac) the linker warns about non existing -L dirs.
29706    # Add server first if available. Linking aginst client does not always produce the same results.
29707    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29708    # Default to server for other variants.
29709    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29710      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29711    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29712      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29713    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29714      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29715    else
29716      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29717    fi
29718
29719    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29720    if test "x$COMPILER_NAME" = xossc; then
29721      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29722    fi
29723
29724    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29725    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29726      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29727    fi
29728  fi
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744  # Some Zero and Shark settings.
29745  # ZERO_ARCHFLAG tells the compiler which mode to build for
29746  case "${OPENJDK_TARGET_CPU}" in
29747    s390)
29748      ZERO_ARCHFLAG="-m31"
29749      ;;
29750    *)
29751      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29752  esac
29753
29754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29755$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29756  supports=yes
29757
29758  saved_cflags="$CFLAGS"
29759  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29760  ac_ext=c
29761ac_cpp='$CPP $CPPFLAGS'
29762ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29763ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29764ac_compiler_gnu=$ac_cv_c_compiler_gnu
29765
29766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29767/* end confdefs.h.  */
29768int i;
29769_ACEOF
29770if ac_fn_c_try_compile "$LINENO"; then :
29771
29772else
29773  supports=no
29774fi
29775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29776  ac_ext=cpp
29777ac_cpp='$CXXCPP $CPPFLAGS'
29778ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29779ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29780ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29781
29782  CFLAGS="$saved_cflags"
29783
29784  saved_cxxflags="$CXXFLAGS"
29785  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29786  ac_ext=cpp
29787ac_cpp='$CXXCPP $CPPFLAGS'
29788ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29789ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29790ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29791
29792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29793/* end confdefs.h.  */
29794int i;
29795_ACEOF
29796if ac_fn_cxx_try_compile "$LINENO"; then :
29797
29798else
29799  supports=no
29800fi
29801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29802  ac_ext=cpp
29803ac_cpp='$CXXCPP $CPPFLAGS'
29804ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29805ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29806ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29807
29808  CXXFLAGS="$saved_cxxflags"
29809
29810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29811$as_echo "$supports" >&6; }
29812  if test "x$supports" = "xyes" ; then
29813    :
29814  else
29815    ZERO_ARCHFLAG=""
29816  fi
29817
29818
29819
29820  # Check that the compiler supports -mX flags
29821  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29822
29823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29824$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29825  supports=yes
29826
29827  saved_cflags="$CFLAGS"
29828  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29829  ac_ext=c
29830ac_cpp='$CPP $CPPFLAGS'
29831ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29832ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29833ac_compiler_gnu=$ac_cv_c_compiler_gnu
29834
29835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29836/* end confdefs.h.  */
29837int i;
29838_ACEOF
29839if ac_fn_c_try_compile "$LINENO"; then :
29840
29841else
29842  supports=no
29843fi
29844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29845  ac_ext=cpp
29846ac_cpp='$CXXCPP $CPPFLAGS'
29847ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29848ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29849ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29850
29851  CFLAGS="$saved_cflags"
29852
29853  saved_cxxflags="$CXXFLAGS"
29854  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29855  ac_ext=cpp
29856ac_cpp='$CXXCPP $CPPFLAGS'
29857ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29858ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29859ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29860
29861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29862/* end confdefs.h.  */
29863int i;
29864_ACEOF
29865if ac_fn_cxx_try_compile "$LINENO"; then :
29866
29867else
29868  supports=no
29869fi
29870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29871  ac_ext=cpp
29872ac_cpp='$CXXCPP $CPPFLAGS'
29873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29874ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29876
29877  CXXFLAGS="$saved_cxxflags"
29878
29879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29880$as_echo "$supports" >&6; }
29881  if test "x$supports" = "xyes" ; then
29882    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29883  else
29884    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29885  fi
29886
29887
29888
29889
29890# Setup debug symbols (need objcopy from the toolchain for that)
29891
29892  #
29893  # ENABLE_DEBUG_SYMBOLS
29894  # This must be done after the toolchain is setup, since we're looking at objcopy.
29895  #
29896  # Check whether --enable-debug-symbols was given.
29897if test "${enable_debug_symbols+set}" = set; then :
29898  enableval=$enable_debug_symbols;
29899fi
29900
29901
29902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29903$as_echo_n "checking if we should generate debug symbols... " >&6; }
29904
29905  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29906    # explicit enabling of enable-debug-symbols and can't find objcopy
29907    #   this is an error
29908    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29909  fi
29910
29911  if test "x$enable_debug_symbols" = "xyes"; then
29912    ENABLE_DEBUG_SYMBOLS=true
29913  elif test "x$enable_debug_symbols" = "xno"; then
29914    ENABLE_DEBUG_SYMBOLS=false
29915  else
29916    # Default is on if objcopy is found
29917    if test "x$OBJCOPY" != x; then
29918      ENABLE_DEBUG_SYMBOLS=true
29919    # MacOS X and Windows don't use objcopy but default is on for those OSes
29920    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
29921      ENABLE_DEBUG_SYMBOLS=true
29922    else
29923      ENABLE_DEBUG_SYMBOLS=false
29924    fi
29925  fi
29926
29927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29928$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29929
29930  #
29931  # ZIP_DEBUGINFO_FILES
29932  #
29933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29934$as_echo_n "checking if we should zip debug-info files... " >&6; }
29935  # Check whether --enable-zip-debug-info was given.
29936if test "${enable_zip_debug_info+set}" = set; then :
29937  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29938else
29939  enable_zip_debug_info="yes"
29940fi
29941
29942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29943$as_echo "${enable_zip_debug_info}" >&6; }
29944
29945  if test "x${enable_zip_debug_info}" = "xno"; then
29946    ZIP_DEBUGINFO_FILES=false
29947  else
29948    ZIP_DEBUGINFO_FILES=true
29949  fi
29950
29951
29952
29953
29954
29955
29956
29957###############################################################################
29958#
29959# Check dependencies for external and internal libraries.
29960#
29961###############################################################################
29962
29963# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
29964
29965  # When using cygwin or msys, we need a wrapper binary that renames
29966  # /cygdrive/c/ arguments into c:/ arguments and peeks into
29967  # @files and rewrites these too! This wrapper binary is
29968  # called fixpath.
29969  FIXPATH=
29970  if test "x$OPENJDK_BUILD_OS" = xwindows; then
29971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
29972$as_echo_n "checking if fixpath can be created... " >&6; }
29973    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
29974    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
29975    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
29976      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
29977      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
29978      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
29979      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
29980    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
29981      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
29982      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
29983
29984      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
29985      # @ was chosen as separator to minimize risk of other tools messing around with it
29986      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
29987      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
29988
29989      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
29990    fi
29991    rm -f $OUTPUT_ROOT/fixpath*
29992    cd $OUTPUT_ROOT
29993    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
29994    cd $CURDIR
29995
29996    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
29997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29998$as_echo "no" >&6; }
29999      cat $OUTPUT_ROOT/fixpath1.log
30000      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30001    fi
30002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30003$as_echo "yes" >&6; }
30004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30005$as_echo_n "checking if fixpath.exe works... " >&6; }
30006    cd $OUTPUT_ROOT
30007    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30008    cd $CURDIR
30009    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30010      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30011$as_echo "no" >&6; }
30012      cat $OUTPUT_ROOT/fixpath2.log
30013      as_fn_error $? "fixpath did not work!" "$LINENO" 5
30014    fi
30015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30016$as_echo "yes" >&6; }
30017    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30018  fi
30019
30020
30021
30022
30023
30024
30025  ###############################################################################
30026  #
30027  # OS specific settings that we never will need to probe.
30028  #
30029  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30031$as_echo_n "checking what is not needed on Linux?... " >&6; }
30032    PULSE_NOT_NEEDED=yes
30033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30034$as_echo "pulse" >&6; }
30035  fi
30036
30037  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30039$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30040    ALSA_NOT_NEEDED=yes
30041    PULSE_NOT_NEEDED=yes
30042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30043$as_echo "alsa pulse" >&6; }
30044  fi
30045
30046  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30048$as_echo_n "checking what is not needed on Windows?... " >&6; }
30049    CUPS_NOT_NEEDED=yes
30050    ALSA_NOT_NEEDED=yes
30051    PULSE_NOT_NEEDED=yes
30052    X11_NOT_NEEDED=yes
30053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30054$as_echo "alsa cups pulse x11" >&6; }
30055  fi
30056
30057  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30059$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30060    ALSA_NOT_NEEDED=yes
30061    PULSE_NOT_NEEDED=yes
30062    X11_NOT_NEEDED=yes
30063    # If the java runtime framework is disabled, then we need X11.
30064    # This will be adjusted below.
30065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30066$as_echo "alsa pulse x11" >&6; }
30067  fi
30068
30069  if test "x$OPENJDK_TARGET_OS" = xbsd; then
30070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30071$as_echo_n "checking what is not needed on bsd?... " >&6; }
30072    ALSA_NOT_NEEDED=yes
30073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30074$as_echo "alsa" >&6; }
30075  fi
30076
30077  if test "x$OPENJDK" = "xfalse"; then
30078    FREETYPE_NOT_NEEDED=yes
30079  fi
30080
30081  if test "x$SUPPORT_HEADFUL" = xno; then
30082    X11_NOT_NEEDED=yes
30083  fi
30084
30085  ###############################################################################
30086  #
30087  # Check for MacOSX support for OpenJDK.
30088  #
30089
30090
30091  # Check whether --enable-macosx-runtime-support was given.
30092if test "${enable_macosx_runtime_support+set}" = set; then :
30093  enableval=$enable_macosx_runtime_support;
30094fi
30095
30096  if test "x$enable_macosx_runtime_support" != x; then
30097    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30098$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30099  fi
30100
30101
30102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30103$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30104  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30106$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30107  else
30108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30109$as_echo "no" >&6; }
30110  fi
30111
30112
30113
30114  ###############################################################################
30115  #
30116  # Check for X Windows
30117  #
30118
30119  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30120  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30121  # --x-libraries for the sysroot, if that seems to be correct.
30122  if test "x$SYS_ROOT" != "x/"; then
30123    if test "x$x_includes" = xNONE; then
30124      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30125        x_includes="$SYS_ROOT/usr/X11R6/include"
30126      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30127        x_includes="$SYS_ROOT/usr/include"
30128      fi
30129    fi
30130    if test "x$x_libraries" = xNONE; then
30131      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30132        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30133      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30134        x_libraries="$SYS_ROOT/usr/lib64"
30135      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30136        x_libraries="$SYS_ROOT/usr/lib"
30137      fi
30138    fi
30139  fi
30140
30141  # Now let autoconf do it's magic
30142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30143$as_echo_n "checking for X... " >&6; }
30144
30145
30146# Check whether --with-x was given.
30147if test "${with_x+set}" = set; then :
30148  withval=$with_x;
30149fi
30150
30151# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30152if test "x$with_x" = xno; then
30153  # The user explicitly disabled X.
30154  have_x=disabled
30155else
30156  case $x_includes,$x_libraries in #(
30157    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30158    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30159  $as_echo_n "(cached) " >&6
30160else
30161  # One or both of the vars are not set, and there is no cached value.
30162ac_x_includes=no ac_x_libraries=no
30163rm -f -r conftest.dir
30164if mkdir conftest.dir; then
30165  cd conftest.dir
30166  cat >Imakefile <<'_ACEOF'
30167incroot:
30168	@echo incroot='${INCROOT}'
30169usrlibdir:
30170	@echo usrlibdir='${USRLIBDIR}'
30171libdir:
30172	@echo libdir='${LIBDIR}'
30173_ACEOF
30174  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30175    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30176    for ac_var in incroot usrlibdir libdir; do
30177      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30178    done
30179    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30180    for ac_extension in a so sl dylib la dll; do
30181      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30182	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30183	ac_im_usrlibdir=$ac_im_libdir; break
30184      fi
30185    done
30186    # Screen out bogus values from the imake configuration.  They are
30187    # bogus both because they are the default anyway, and because
30188    # using them would break gcc on systems where it needs fixed includes.
30189    case $ac_im_incroot in
30190	/usr/include) ac_x_includes= ;;
30191	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30192    esac
30193    case $ac_im_usrlibdir in
30194	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30195	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30196    esac
30197  fi
30198  cd ..
30199  rm -f -r conftest.dir
30200fi
30201
30202# Standard set of common directories for X headers.
30203# Check X11 before X11Rn because it is often a symlink to the current release.
30204ac_x_header_dirs='
30205/usr/X11/include
30206/usr/X11R7/include
30207/usr/X11R6/include
30208/usr/X11R5/include
30209/usr/X11R4/include
30210
30211/usr/include/X11
30212/usr/include/X11R7
30213/usr/include/X11R6
30214/usr/include/X11R5
30215/usr/include/X11R4
30216
30217/usr/local/X11/include
30218/usr/local/X11R7/include
30219/usr/local/X11R6/include
30220/usr/local/X11R5/include
30221/usr/local/X11R4/include
30222
30223/usr/local/include/X11
30224/usr/local/include/X11R7
30225/usr/local/include/X11R6
30226/usr/local/include/X11R5
30227/usr/local/include/X11R4
30228
30229/usr/X386/include
30230/usr/x386/include
30231/usr/XFree86/include/X11
30232
30233/usr/include
30234/usr/local/include
30235/usr/unsupported/include
30236/usr/athena/include
30237/usr/local/x11r5/include
30238/usr/lpp/Xamples/include
30239
30240/usr/openwin/include
30241/usr/openwin/share/include'
30242
30243if test "$ac_x_includes" = no; then
30244  # Guess where to find include files, by looking for Xlib.h.
30245  # First, try using that file with no special directory specified.
30246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30247/* end confdefs.h.  */
30248#include <X11/Xlib.h>
30249_ACEOF
30250if ac_fn_cxx_try_cpp "$LINENO"; then :
30251  # We can compile using X headers with no special include directory.
30252ac_x_includes=
30253else
30254  for ac_dir in $ac_x_header_dirs; do
30255  if test -r "$ac_dir/X11/Xlib.h"; then
30256    ac_x_includes=$ac_dir
30257    break
30258  fi
30259done
30260fi
30261rm -f conftest.err conftest.i conftest.$ac_ext
30262fi # $ac_x_includes = no
30263
30264if test "$ac_x_libraries" = no; then
30265  # Check for the libraries.
30266  # See if we find them without any special options.
30267  # Don't add to $LIBS permanently.
30268  ac_save_LIBS=$LIBS
30269  LIBS="-lX11 $LIBS"
30270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30271/* end confdefs.h.  */
30272#include <X11/Xlib.h>
30273int
30274main ()
30275{
30276XrmInitialize ()
30277  ;
30278  return 0;
30279}
30280_ACEOF
30281if ac_fn_cxx_try_link "$LINENO"; then :
30282  LIBS=$ac_save_LIBS
30283# We can link X programs with no special library path.
30284ac_x_libraries=
30285else
30286  LIBS=$ac_save_LIBS
30287for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30288do
30289  # Don't even attempt the hair of trying to link an X program!
30290  for ac_extension in a so sl dylib la dll; do
30291    if test -r "$ac_dir/libX11.$ac_extension"; then
30292      ac_x_libraries=$ac_dir
30293      break 2
30294    fi
30295  done
30296done
30297fi
30298rm -f core conftest.err conftest.$ac_objext \
30299    conftest$ac_exeext conftest.$ac_ext
30300fi # $ac_x_libraries = no
30301
30302case $ac_x_includes,$ac_x_libraries in #(
30303  no,* | *,no | *\'*)
30304    # Didn't find X, or a directory has "'" in its name.
30305    ac_cv_have_x="have_x=no";; #(
30306  *)
30307    # Record where we found X for the cache.
30308    ac_cv_have_x="have_x=yes\
30309	ac_x_includes='$ac_x_includes'\
30310	ac_x_libraries='$ac_x_libraries'"
30311esac
30312fi
30313;; #(
30314    *) have_x=yes;;
30315  esac
30316  eval "$ac_cv_have_x"
30317fi # $with_x != no
30318
30319if test "$have_x" != yes; then
30320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30321$as_echo "$have_x" >&6; }
30322  no_x=yes
30323else
30324  # If each of the values was on the command line, it overrides each guess.
30325  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30326  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30327  # Update the cache value to reflect the command line values.
30328  ac_cv_have_x="have_x=yes\
30329	ac_x_includes='$x_includes'\
30330	ac_x_libraries='$x_libraries'"
30331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30332$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30333fi
30334
30335  if test "$no_x" = yes; then
30336  # Not all programs may use this symbol, but it does not hurt to define it.
30337
30338$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30339
30340  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30341else
30342  if test -n "$x_includes"; then
30343    X_CFLAGS="$X_CFLAGS -I$x_includes"
30344  fi
30345
30346  # It would also be nice to do this for all -L options, not just this one.
30347  if test -n "$x_libraries"; then
30348    X_LIBS="$X_LIBS -L$x_libraries"
30349    # For Solaris; some versions of Sun CC require a space after -R and
30350    # others require no space.  Words are not sufficient . . . .
30351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30352$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30353    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30354    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30355    ac_cxx_werror_flag=yes
30356    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30357/* end confdefs.h.  */
30358
30359int
30360main ()
30361{
30362
30363  ;
30364  return 0;
30365}
30366_ACEOF
30367if ac_fn_cxx_try_link "$LINENO"; then :
30368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30369$as_echo "no" >&6; }
30370       X_LIBS="$X_LIBS -R$x_libraries"
30371else
30372  LIBS="$ac_xsave_LIBS -R $x_libraries"
30373       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30374/* end confdefs.h.  */
30375
30376int
30377main ()
30378{
30379
30380  ;
30381  return 0;
30382}
30383_ACEOF
30384if ac_fn_cxx_try_link "$LINENO"; then :
30385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30386$as_echo "yes" >&6; }
30387	  X_LIBS="$X_LIBS -R $x_libraries"
30388else
30389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30390$as_echo "neither works" >&6; }
30391fi
30392rm -f core conftest.err conftest.$ac_objext \
30393    conftest$ac_exeext conftest.$ac_ext
30394fi
30395rm -f core conftest.err conftest.$ac_objext \
30396    conftest$ac_exeext conftest.$ac_ext
30397    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30398    LIBS=$ac_xsave_LIBS
30399  fi
30400
30401  # Check for system-dependent libraries X programs must link with.
30402  # Do this before checking for the system-independent R6 libraries
30403  # (-lICE), since we may need -lsocket or whatever for X linking.
30404
30405  if test "$ISC" = yes; then
30406    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30407  else
30408    # Martyn Johnson says this is needed for Ultrix, if the X
30409    # libraries were built with DECnet support.  And Karl Berry says
30410    # the Alpha needs dnet_stub (dnet does not exist).
30411    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30412    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30413/* end confdefs.h.  */
30414
30415/* Override any GCC internal prototype to avoid an error.
30416   Use char because int might match the return type of a GCC
30417   builtin and then its argument prototype would still apply.  */
30418#ifdef __cplusplus
30419extern "C"
30420#endif
30421char XOpenDisplay ();
30422int
30423main ()
30424{
30425return XOpenDisplay ();
30426  ;
30427  return 0;
30428}
30429_ACEOF
30430if ac_fn_cxx_try_link "$LINENO"; then :
30431
30432else
30433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30434$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30435if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30436  $as_echo_n "(cached) " >&6
30437else
30438  ac_check_lib_save_LIBS=$LIBS
30439LIBS="-ldnet  $LIBS"
30440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30441/* end confdefs.h.  */
30442
30443/* Override any GCC internal prototype to avoid an error.
30444   Use char because int might match the return type of a GCC
30445   builtin and then its argument prototype would still apply.  */
30446#ifdef __cplusplus
30447extern "C"
30448#endif
30449char dnet_ntoa ();
30450int
30451main ()
30452{
30453return dnet_ntoa ();
30454  ;
30455  return 0;
30456}
30457_ACEOF
30458if ac_fn_cxx_try_link "$LINENO"; then :
30459  ac_cv_lib_dnet_dnet_ntoa=yes
30460else
30461  ac_cv_lib_dnet_dnet_ntoa=no
30462fi
30463rm -f core conftest.err conftest.$ac_objext \
30464    conftest$ac_exeext conftest.$ac_ext
30465LIBS=$ac_check_lib_save_LIBS
30466fi
30467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30468$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30469if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30470  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30471fi
30472
30473    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30474      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30475$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30476if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30477  $as_echo_n "(cached) " >&6
30478else
30479  ac_check_lib_save_LIBS=$LIBS
30480LIBS="-ldnet_stub  $LIBS"
30481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30482/* end confdefs.h.  */
30483
30484/* Override any GCC internal prototype to avoid an error.
30485   Use char because int might match the return type of a GCC
30486   builtin and then its argument prototype would still apply.  */
30487#ifdef __cplusplus
30488extern "C"
30489#endif
30490char dnet_ntoa ();
30491int
30492main ()
30493{
30494return dnet_ntoa ();
30495  ;
30496  return 0;
30497}
30498_ACEOF
30499if ac_fn_cxx_try_link "$LINENO"; then :
30500  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30501else
30502  ac_cv_lib_dnet_stub_dnet_ntoa=no
30503fi
30504rm -f core conftest.err conftest.$ac_objext \
30505    conftest$ac_exeext conftest.$ac_ext
30506LIBS=$ac_check_lib_save_LIBS
30507fi
30508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30509$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30510if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30511  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30512fi
30513
30514    fi
30515fi
30516rm -f core conftest.err conftest.$ac_objext \
30517    conftest$ac_exeext conftest.$ac_ext
30518    LIBS="$ac_xsave_LIBS"
30519
30520    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30521    # to get the SysV transport functions.
30522    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30523    # needs -lnsl.
30524    # The nsl library prevents programs from opening the X display
30525    # on Irix 5.2, according to T.E. Dickey.
30526    # The functions gethostbyname, getservbyname, and inet_addr are
30527    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30528    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30529if test "x$ac_cv_func_gethostbyname" = xyes; then :
30530
30531fi
30532
30533    if test $ac_cv_func_gethostbyname = no; then
30534      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30535$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30536if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30537  $as_echo_n "(cached) " >&6
30538else
30539  ac_check_lib_save_LIBS=$LIBS
30540LIBS="-lnsl  $LIBS"
30541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30542/* end confdefs.h.  */
30543
30544/* Override any GCC internal prototype to avoid an error.
30545   Use char because int might match the return type of a GCC
30546   builtin and then its argument prototype would still apply.  */
30547#ifdef __cplusplus
30548extern "C"
30549#endif
30550char gethostbyname ();
30551int
30552main ()
30553{
30554return gethostbyname ();
30555  ;
30556  return 0;
30557}
30558_ACEOF
30559if ac_fn_cxx_try_link "$LINENO"; then :
30560  ac_cv_lib_nsl_gethostbyname=yes
30561else
30562  ac_cv_lib_nsl_gethostbyname=no
30563fi
30564rm -f core conftest.err conftest.$ac_objext \
30565    conftest$ac_exeext conftest.$ac_ext
30566LIBS=$ac_check_lib_save_LIBS
30567fi
30568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30569$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30570if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30571  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30572fi
30573
30574      if test $ac_cv_lib_nsl_gethostbyname = no; then
30575	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30576$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30577if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30578  $as_echo_n "(cached) " >&6
30579else
30580  ac_check_lib_save_LIBS=$LIBS
30581LIBS="-lbsd  $LIBS"
30582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30583/* end confdefs.h.  */
30584
30585/* Override any GCC internal prototype to avoid an error.
30586   Use char because int might match the return type of a GCC
30587   builtin and then its argument prototype would still apply.  */
30588#ifdef __cplusplus
30589extern "C"
30590#endif
30591char gethostbyname ();
30592int
30593main ()
30594{
30595return gethostbyname ();
30596  ;
30597  return 0;
30598}
30599_ACEOF
30600if ac_fn_cxx_try_link "$LINENO"; then :
30601  ac_cv_lib_bsd_gethostbyname=yes
30602else
30603  ac_cv_lib_bsd_gethostbyname=no
30604fi
30605rm -f core conftest.err conftest.$ac_objext \
30606    conftest$ac_exeext conftest.$ac_ext
30607LIBS=$ac_check_lib_save_LIBS
30608fi
30609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30610$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30611if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30612  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30613fi
30614
30615      fi
30616    fi
30617
30618    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30619    # socket/setsockopt and other routines are undefined under SCO ODT
30620    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30621    # on later versions), says Simon Leinen: it contains gethostby*
30622    # variants that don't use the name server (or something).  -lsocket
30623    # must be given before -lnsl if both are needed.  We assume that
30624    # if connect needs -lnsl, so does gethostbyname.
30625    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30626if test "x$ac_cv_func_connect" = xyes; then :
30627
30628fi
30629
30630    if test $ac_cv_func_connect = no; then
30631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30632$as_echo_n "checking for connect in -lsocket... " >&6; }
30633if ${ac_cv_lib_socket_connect+:} false; then :
30634  $as_echo_n "(cached) " >&6
30635else
30636  ac_check_lib_save_LIBS=$LIBS
30637LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30639/* end confdefs.h.  */
30640
30641/* Override any GCC internal prototype to avoid an error.
30642   Use char because int might match the return type of a GCC
30643   builtin and then its argument prototype would still apply.  */
30644#ifdef __cplusplus
30645extern "C"
30646#endif
30647char connect ();
30648int
30649main ()
30650{
30651return connect ();
30652  ;
30653  return 0;
30654}
30655_ACEOF
30656if ac_fn_cxx_try_link "$LINENO"; then :
30657  ac_cv_lib_socket_connect=yes
30658else
30659  ac_cv_lib_socket_connect=no
30660fi
30661rm -f core conftest.err conftest.$ac_objext \
30662    conftest$ac_exeext conftest.$ac_ext
30663LIBS=$ac_check_lib_save_LIBS
30664fi
30665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30666$as_echo "$ac_cv_lib_socket_connect" >&6; }
30667if test "x$ac_cv_lib_socket_connect" = xyes; then :
30668  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30669fi
30670
30671    fi
30672
30673    # Guillermo Gomez says -lposix is necessary on A/UX.
30674    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30675if test "x$ac_cv_func_remove" = xyes; then :
30676
30677fi
30678
30679    if test $ac_cv_func_remove = no; then
30680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30681$as_echo_n "checking for remove in -lposix... " >&6; }
30682if ${ac_cv_lib_posix_remove+:} false; then :
30683  $as_echo_n "(cached) " >&6
30684else
30685  ac_check_lib_save_LIBS=$LIBS
30686LIBS="-lposix  $LIBS"
30687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30688/* end confdefs.h.  */
30689
30690/* Override any GCC internal prototype to avoid an error.
30691   Use char because int might match the return type of a GCC
30692   builtin and then its argument prototype would still apply.  */
30693#ifdef __cplusplus
30694extern "C"
30695#endif
30696char remove ();
30697int
30698main ()
30699{
30700return remove ();
30701  ;
30702  return 0;
30703}
30704_ACEOF
30705if ac_fn_cxx_try_link "$LINENO"; then :
30706  ac_cv_lib_posix_remove=yes
30707else
30708  ac_cv_lib_posix_remove=no
30709fi
30710rm -f core conftest.err conftest.$ac_objext \
30711    conftest$ac_exeext conftest.$ac_ext
30712LIBS=$ac_check_lib_save_LIBS
30713fi
30714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30715$as_echo "$ac_cv_lib_posix_remove" >&6; }
30716if test "x$ac_cv_lib_posix_remove" = xyes; then :
30717  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30718fi
30719
30720    fi
30721
30722    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30723    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30724if test "x$ac_cv_func_shmat" = xyes; then :
30725
30726fi
30727
30728    if test $ac_cv_func_shmat = no; then
30729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30730$as_echo_n "checking for shmat in -lipc... " >&6; }
30731if ${ac_cv_lib_ipc_shmat+:} false; then :
30732  $as_echo_n "(cached) " >&6
30733else
30734  ac_check_lib_save_LIBS=$LIBS
30735LIBS="-lipc  $LIBS"
30736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30737/* end confdefs.h.  */
30738
30739/* Override any GCC internal prototype to avoid an error.
30740   Use char because int might match the return type of a GCC
30741   builtin and then its argument prototype would still apply.  */
30742#ifdef __cplusplus
30743extern "C"
30744#endif
30745char shmat ();
30746int
30747main ()
30748{
30749return shmat ();
30750  ;
30751  return 0;
30752}
30753_ACEOF
30754if ac_fn_cxx_try_link "$LINENO"; then :
30755  ac_cv_lib_ipc_shmat=yes
30756else
30757  ac_cv_lib_ipc_shmat=no
30758fi
30759rm -f core conftest.err conftest.$ac_objext \
30760    conftest$ac_exeext conftest.$ac_ext
30761LIBS=$ac_check_lib_save_LIBS
30762fi
30763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30764$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30765if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30766  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30767fi
30768
30769    fi
30770  fi
30771
30772  # Check for libraries that X11R6 Xt/Xaw programs need.
30773  ac_save_LDFLAGS=$LDFLAGS
30774  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30775  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30776  # check for ICE first), but we must link in the order -lSM -lICE or
30777  # we get undefined symbols.  So assume we have SM if we have ICE.
30778  # These have to be linked with before -lX11, unlike the other
30779  # libraries we check for below, so use a different variable.
30780  # John Interrante, Karl Berry
30781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30782$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30783if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30784  $as_echo_n "(cached) " >&6
30785else
30786  ac_check_lib_save_LIBS=$LIBS
30787LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30789/* end confdefs.h.  */
30790
30791/* Override any GCC internal prototype to avoid an error.
30792   Use char because int might match the return type of a GCC
30793   builtin and then its argument prototype would still apply.  */
30794#ifdef __cplusplus
30795extern "C"
30796#endif
30797char IceConnectionNumber ();
30798int
30799main ()
30800{
30801return IceConnectionNumber ();
30802  ;
30803  return 0;
30804}
30805_ACEOF
30806if ac_fn_cxx_try_link "$LINENO"; then :
30807  ac_cv_lib_ICE_IceConnectionNumber=yes
30808else
30809  ac_cv_lib_ICE_IceConnectionNumber=no
30810fi
30811rm -f core conftest.err conftest.$ac_objext \
30812    conftest$ac_exeext conftest.$ac_ext
30813LIBS=$ac_check_lib_save_LIBS
30814fi
30815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30816$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30817if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30818  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30819fi
30820
30821  LDFLAGS=$ac_save_LDFLAGS
30822
30823fi
30824
30825
30826  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30827  # this doesn't make sense so we remove it.
30828  if test "x$COMPILE_TYPE" = xcross; then
30829    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30830  fi
30831
30832  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30833
30834  # Print a helpful message on how to acquire the necessary build dependency.
30835  # x11 is the help tag: freetype, cups, pulse, alsa etc
30836  MISSING_DEPENDENCY=x11
30837
30838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30839    cygwin_help $MISSING_DEPENDENCY
30840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30841    msys_help $MISSING_DEPENDENCY
30842  else
30843    PKGHANDLER_COMMAND=
30844
30845    case $PKGHANDLER in
30846      apt-get)
30847        apt_help     $MISSING_DEPENDENCY ;;
30848      yum)
30849        yum_help     $MISSING_DEPENDENCY ;;
30850      port)
30851        port_help    $MISSING_DEPENDENCY ;;
30852      pkgutil)
30853        pkgutil_help $MISSING_DEPENDENCY ;;
30854      pkgadd)
30855        pkgadd_help  $MISSING_DEPENDENCY ;;
30856      * )
30857        break ;;
30858    esac
30859
30860    if test "x$PKGHANDLER_COMMAND" != x; then
30861      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30862    fi
30863  fi
30864
30865    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30866  fi
30867
30868  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30869    OPENWIN_HOME="/usr/openwin"
30870  fi
30871
30872
30873
30874  #
30875  # Weird Sol10 something check...TODO change to try compile
30876  #
30877  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30878    if test "`uname -r`" = "5.10"; then
30879      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30880        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30881      fi
30882    fi
30883  fi
30884
30885  ac_ext=c
30886ac_cpp='$CPP $CPPFLAGS'
30887ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30888ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30889ac_compiler_gnu=$ac_cv_c_compiler_gnu
30890
30891  OLD_CFLAGS="$CFLAGS"
30892  CFLAGS="$CFLAGS $X_CFLAGS"
30893
30894  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30895  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30896do :
30897  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30898ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30899        # include <X11/Xlib.h>
30900        # include <X11/Xutil.h>
30901
30902
30903"
30904if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30905  cat >>confdefs.h <<_ACEOF
30906#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30907_ACEOF
30908 X11_A_OK=yes
30909else
30910  X11_A_OK=no; break
30911fi
30912
30913done
30914
30915
30916  CFLAGS="$OLD_CFLAGS"
30917  ac_ext=cpp
30918ac_cpp='$CXXCPP $CPPFLAGS'
30919ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30920ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30921ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30922
30923
30924  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30925
30926  # Print a helpful message on how to acquire the necessary build dependency.
30927  # x11 is the help tag: freetype, cups, pulse, alsa etc
30928  MISSING_DEPENDENCY=x11
30929
30930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30931    cygwin_help $MISSING_DEPENDENCY
30932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30933    msys_help $MISSING_DEPENDENCY
30934  else
30935    PKGHANDLER_COMMAND=
30936
30937    case $PKGHANDLER in
30938      apt-get)
30939        apt_help     $MISSING_DEPENDENCY ;;
30940      yum)
30941        yum_help     $MISSING_DEPENDENCY ;;
30942      port)
30943        port_help    $MISSING_DEPENDENCY ;;
30944      pkgutil)
30945        pkgutil_help $MISSING_DEPENDENCY ;;
30946      pkgadd)
30947        pkgadd_help  $MISSING_DEPENDENCY ;;
30948      * )
30949        break ;;
30950    esac
30951
30952    if test "x$PKGHANDLER_COMMAND" != x; then
30953      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30954    fi
30955  fi
30956
30957    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30958  fi
30959
30960
30961
30962
30963
30964
30965  ###############################################################################
30966  #
30967  # The common unix printing system cups is used to print from java.
30968  #
30969
30970# Check whether --with-cups was given.
30971if test "${with_cups+set}" = set; then :
30972  withval=$with_cups;
30973fi
30974
30975
30976# Check whether --with-cups-include was given.
30977if test "${with_cups_include+set}" = set; then :
30978  withval=$with_cups_include;
30979fi
30980
30981
30982  if test "x$CUPS_NOT_NEEDED" = xyes; then
30983    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30984      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30985$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30986    fi
30987    CUPS_CFLAGS=
30988  else
30989    CUPS_FOUND=no
30990
30991    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30992      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30993    fi
30994
30995    if test "x${with_cups}" != x; then
30996      CUPS_CFLAGS="-I${with_cups}/include"
30997      CUPS_FOUND=yes
30998    fi
30999    if test "x${with_cups_include}" != x; then
31000      CUPS_CFLAGS="-I${with_cups_include}"
31001      CUPS_FOUND=yes
31002    fi
31003    if test "x$CUPS_FOUND" = xno; then
31004
31005
31006  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31007    # Source the builddeps file again, to make sure it uses the latest variables!
31008    . $builddepsfile
31009    # Look for a target and build machine specific resource!
31010    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31011    if test "x$resource" = x; then
31012      # Ok, lets instead look for a target specific resource
31013      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31014    fi
31015    if test "x$resource" = x; then
31016      # Ok, lets instead look for a build specific resource
31017      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31018    fi
31019    if test "x$resource" = x; then
31020      # Ok, lets instead look for a generic resource
31021      # (The cups comes from M4 and not the shell, thus no need for eval here.)
31022      resource=${builddep_cups}
31023    fi
31024    if test "x$resource" != x; then
31025      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31026$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31027      # If the resource in the builddeps.conf file is an existing directory,
31028      # for example /java/linux/cups
31029      if test -d ${resource}; then
31030        depdir=${resource}
31031      else
31032
31033  # cups is for example mymodule
31034  # $resource is for example libs/general/libmymod_1_2_3.zip
31035  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31036  # $with_builddeps_dir is for example /localhome/builddeps
31037  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31038  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31039  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31040  filename=`basename $resource`
31041  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31042  filebase=${filename%%.*}
31043  extension=${filename#*.}
31044  installdir=$with_builddeps_dir/$filebase
31045  if test ! -f $installdir/$filename.unpacked; then
31046    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31047$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31048    if test ! -d $installdir; then
31049      mkdir -p $installdir
31050    fi
31051    if test ! -d $installdir; then
31052      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31053    fi
31054    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31055    touch $tmpfile
31056    if test ! -f $tmpfile; then
31057      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31058    fi
31059
31060  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31061  # $tmpfile is the local file name for the downloaded file.
31062  VALID_TOOL=no
31063  if test "x$BDEPS_FTP" = xwget; then
31064    VALID_TOOL=yes
31065    wget -O $tmpfile $with_builddeps_server/$resource
31066  fi
31067  if test "x$BDEPS_FTP" = xlftp; then
31068    VALID_TOOL=yes
31069    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31070  fi
31071  if test "x$BDEPS_FTP" = xftp; then
31072    VALID_TOOL=yes
31073    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31074    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31075    FTPUSERPWD=${FTPSERVER%%@*}
31076    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31077      FTPUSER=${userpwd%%:*}
31078      FTPPWD=${userpwd#*@}
31079      FTPSERVER=${FTPSERVER#*@}
31080    else
31081      FTPUSER=ftp
31082      FTPPWD=ftp
31083    fi
31084    # the "pass" command does not work on some
31085    # ftp clients (read ftp.exe) but if it works,
31086    # passive mode is better!
31087    ( \
31088        echo "user $FTPUSER $FTPPWD"        ; \
31089        echo "pass"                         ; \
31090        echo "bin"                          ; \
31091        echo "get $FTPPATH $tmpfile"              ; \
31092    ) | ftp -in $FTPSERVER
31093  fi
31094  if test "x$VALID_TOOL" != xyes; then
31095    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31096  fi
31097
31098    mv $tmpfile $installdir/$filename
31099    if test ! -s $installdir/$filename; then
31100      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31101    fi
31102    case "$extension" in
31103      zip)  echo "Unzipping $installdir/$filename..."
31104        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31105        ;;
31106      tar.gz) echo "Untaring $installdir/$filename..."
31107        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31108        ;;
31109      tgz) echo "Untaring $installdir/$filename..."
31110        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31111        ;;
31112      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31113        ;;
31114    esac
31115  fi
31116  if test -f $installdir/$filename.unpacked; then
31117    depdir=$installdir
31118  fi
31119
31120      fi
31121      # Source the builddeps file again, because in the previous command, the depdir
31122      # was updated to point at the current build dependency install directory.
31123      . $builddepsfile
31124      # Now extract variables from the builddeps.conf files.
31125      theroot=${builddep_cups_ROOT}
31126      thecflags=${builddep_cups_CFLAGS}
31127      thelibs=${builddep_cups_LIBS}
31128      if test "x$depdir" = x; then
31129        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31130      fi
31131      CUPS=$depdir
31132      if test "x$theroot" != x; then
31133        CUPS="$theroot"
31134      fi
31135      if test "x$thecflags" != x; then
31136        CUPS_CFLAGS="$thecflags"
31137      fi
31138      if test "x$thelibs" != x; then
31139        CUPS_LIBS="$thelibs"
31140      fi
31141      CUPS_FOUND=yes
31142
31143    fi
31144
31145  fi
31146
31147    fi
31148    if test "x$CUPS_FOUND" = xno; then
31149      # Are the cups headers installed in the default /usr/include location?
31150      for ac_header in cups/cups.h cups/ppd.h
31151do :
31152  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31153ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31154if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31155  cat >>confdefs.h <<_ACEOF
31156#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31157_ACEOF
31158
31159            CUPS_FOUND=yes
31160            CUPS_CFLAGS=
31161            DEFAULT_CUPS=yes
31162
31163
31164fi
31165
31166done
31167
31168    fi
31169    if test "x$CUPS_FOUND" = xno; then
31170      # Getting nervous now? Lets poke around for standard Solaris third-party
31171      # package installation locations.
31172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31173$as_echo_n "checking for cups headers... " >&6; }
31174      if test -s /opt/sfw/cups/include/cups/cups.h; then
31175        # An SFW package seems to be installed!
31176        CUPS_FOUND=yes
31177        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31178      elif test -s /opt/csw/include/cups/cups.h; then
31179        # A CSW package seems to be installed!
31180        CUPS_FOUND=yes
31181        CUPS_CFLAGS="-I/opt/csw/include"
31182      fi
31183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31184$as_echo "$CUPS_FOUND" >&6; }
31185    fi
31186    if test "x$CUPS_FOUND" = xno; then
31187
31188  # Print a helpful message on how to acquire the necessary build dependency.
31189  # cups is the help tag: freetype, cups, pulse, alsa etc
31190  MISSING_DEPENDENCY=cups
31191
31192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31193    cygwin_help $MISSING_DEPENDENCY
31194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31195    msys_help $MISSING_DEPENDENCY
31196  else
31197    PKGHANDLER_COMMAND=
31198
31199    case $PKGHANDLER in
31200      apt-get)
31201        apt_help     $MISSING_DEPENDENCY ;;
31202      yum)
31203        yum_help     $MISSING_DEPENDENCY ;;
31204      port)
31205        port_help    $MISSING_DEPENDENCY ;;
31206      pkgutil)
31207        pkgutil_help $MISSING_DEPENDENCY ;;
31208      pkgadd)
31209        pkgadd_help  $MISSING_DEPENDENCY ;;
31210      * )
31211        break ;;
31212    esac
31213
31214    if test "x$PKGHANDLER_COMMAND" != x; then
31215      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31216    fi
31217  fi
31218
31219      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31220    fi
31221  fi
31222
31223
31224
31225
31226
31227
31228  ###############################################################################
31229  #
31230  # The ubiquitous freetype library is used to render fonts.
31231  #
31232
31233# Check whether --with-freetype was given.
31234if test "${with_freetype+set}" = set; then :
31235  withval=$with_freetype;
31236fi
31237
31238
31239# Check whether --with-freetype-include was given.
31240if test "${with_freetype_include+set}" = set; then :
31241  withval=$with_freetype_include;
31242fi
31243
31244
31245# Check whether --with-freetype-lib was given.
31246if test "${with_freetype_lib+set}" = set; then :
31247  withval=$with_freetype_lib;
31248fi
31249
31250  # Check whether --enable-freetype-bundling was given.
31251if test "${enable_freetype_bundling+set}" = set; then :
31252  enableval=$enable_freetype_bundling;
31253fi
31254
31255
31256  FREETYPE_CFLAGS=
31257  FREETYPE_LIBS=
31258  FREETYPE_BUNDLE_LIB_PATH=
31259
31260  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31261    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31262      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31263$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31264    fi
31265    if test "x$enable_freetype_bundling" != x; then
31266      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31267$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31268    fi
31269  else
31270    # freetype is needed to build; go get it!
31271
31272    BUNDLE_FREETYPE="$enable_freetype_bundling"
31273
31274    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31275      # User has specified settings
31276
31277      if test "x$BUNDLE_FREETYPE" = x; then
31278        # If not specified, default is to bundle freetype
31279        BUNDLE_FREETYPE=yes
31280      fi
31281
31282      if test "x$with_freetype" != x; then
31283        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31284        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31285      fi
31286
31287      # Allow --with-freetype-lib and --with-freetype-include to override
31288      if test "x$with_freetype_include" != x; then
31289        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31290      fi
31291      if test "x$with_freetype_lib" != x; then
31292        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31293      fi
31294
31295      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31296        # Okay, we got it. Check that it works.
31297
31298  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31299  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31300  METHOD="--with-freetype"
31301
31302  # First check if the files exists.
31303  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31304    # We found an arbitrary include file. That's a good sign.
31305    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31306$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31307    FOUND_FREETYPE=yes
31308
31309    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31310    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31311      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31312$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31313      FOUND_FREETYPE=no
31314    else
31315      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31316        # On Windows, we will need both .lib and .dll file.
31317        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31318          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31319$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31320          FOUND_FREETYPE=no
31321        fi
31322      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
31323        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31324        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31325      fi
31326    fi
31327  fi
31328
31329  if test "x$FOUND_FREETYPE" = xyes; then
31330
31331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31332
31333  # Input might be given as Windows format, start by converting to
31334  # unix format.
31335  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31336  new_path=`$CYGPATH -u "$path"`
31337
31338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31341  # "foo.exe" is OK but "foo" is an error.
31342  #
31343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31344  # It is also a way to make sure we got the proper file name for the real test later on.
31345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31346  if test "x$test_shortpath" = x; then
31347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31348$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31349    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31350  fi
31351
31352  # Call helper function which possibly converts this using DOS-style short mode.
31353  # If so, the updated path is stored in $new_path.
31354
31355  input_path="$new_path"
31356  # Check if we need to convert this using DOS-style short mode. If the path
31357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31358  # take no chances and rewrite it.
31359  # Note: m4 eats our [], so we need to use [ and ] instead.
31360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31361  if test "x$has_forbidden_chars" != x; then
31362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31366      # Going to short mode and back again did indeed matter. Since short mode is
31367      # case insensitive, let's make it lowercase to improve readability.
31368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31369      # Now convert it back to Unix-stile (cygpath)
31370      input_path=`$CYGPATH -u "$shortmode_path"`
31371      new_path="$input_path"
31372    fi
31373  fi
31374
31375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31376  if test "x$test_cygdrive_prefix" = x; then
31377    # As a simple fix, exclude /usr/bin since it's not a real path.
31378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31380      # a path prefixed by /cygdrive for fixpath to work.
31381      new_path="$CYGWIN_ROOT_PATH$input_path"
31382    fi
31383  fi
31384
31385
31386  if test "x$path" != "x$new_path"; then
31387    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31389$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31390  fi
31391
31392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31393
31394  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31395  has_colon=`$ECHO $path | $GREP ^.:`
31396  new_path="$path"
31397  if test "x$has_colon" = x; then
31398    # Not in mixed or Windows style, start by that.
31399    new_path=`cmd //c echo $path`
31400  fi
31401
31402
31403  input_path="$new_path"
31404  # Check if we need to convert this using DOS-style short mode. If the path
31405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31406  # take no chances and rewrite it.
31407  # Note: m4 eats our [], so we need to use [ and ] instead.
31408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31409  if test "x$has_forbidden_chars" != x; then
31410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31412  fi
31413
31414
31415  windows_path="$new_path"
31416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31417    unix_path=`$CYGPATH -u "$windows_path"`
31418    new_path="$unix_path"
31419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31421    new_path="$unix_path"
31422  fi
31423
31424  if test "x$path" != "x$new_path"; then
31425    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31427$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31428  fi
31429
31430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31432
31433  else
31434    # We're on a posix platform. Hooray! :)
31435    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31436    has_space=`$ECHO "$path" | $GREP " "`
31437    if test "x$has_space" != x; then
31438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31439$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31440      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31441    fi
31442
31443    # Use eval to expand a potential ~
31444    eval path="$path"
31445    if test ! -f "$path" && test ! -d "$path"; then
31446      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31447    fi
31448
31449    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31450  fi
31451
31452
31453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31454
31455  # Input might be given as Windows format, start by converting to
31456  # unix format.
31457  path="$POTENTIAL_FREETYPE_LIB_PATH"
31458  new_path=`$CYGPATH -u "$path"`
31459
31460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31463  # "foo.exe" is OK but "foo" is an error.
31464  #
31465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31466  # It is also a way to make sure we got the proper file name for the real test later on.
31467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31468  if test "x$test_shortpath" = x; then
31469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31470$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31471    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31472  fi
31473
31474  # Call helper function which possibly converts this using DOS-style short mode.
31475  # If so, the updated path is stored in $new_path.
31476
31477  input_path="$new_path"
31478  # Check if we need to convert this using DOS-style short mode. If the path
31479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31480  # take no chances and rewrite it.
31481  # Note: m4 eats our [], so we need to use [ and ] instead.
31482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31483  if test "x$has_forbidden_chars" != x; then
31484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31488      # Going to short mode and back again did indeed matter. Since short mode is
31489      # case insensitive, let's make it lowercase to improve readability.
31490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31491      # Now convert it back to Unix-stile (cygpath)
31492      input_path=`$CYGPATH -u "$shortmode_path"`
31493      new_path="$input_path"
31494    fi
31495  fi
31496
31497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31498  if test "x$test_cygdrive_prefix" = x; then
31499    # As a simple fix, exclude /usr/bin since it's not a real path.
31500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31502      # a path prefixed by /cygdrive for fixpath to work.
31503      new_path="$CYGWIN_ROOT_PATH$input_path"
31504    fi
31505  fi
31506
31507
31508  if test "x$path" != "x$new_path"; then
31509    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31511$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31512  fi
31513
31514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31515
31516  path="$POTENTIAL_FREETYPE_LIB_PATH"
31517  has_colon=`$ECHO $path | $GREP ^.:`
31518  new_path="$path"
31519  if test "x$has_colon" = x; then
31520    # Not in mixed or Windows style, start by that.
31521    new_path=`cmd //c echo $path`
31522  fi
31523
31524
31525  input_path="$new_path"
31526  # Check if we need to convert this using DOS-style short mode. If the path
31527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31528  # take no chances and rewrite it.
31529  # Note: m4 eats our [], so we need to use [ and ] instead.
31530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31531  if test "x$has_forbidden_chars" != x; then
31532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31534  fi
31535
31536
31537  windows_path="$new_path"
31538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31539    unix_path=`$CYGPATH -u "$windows_path"`
31540    new_path="$unix_path"
31541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31543    new_path="$unix_path"
31544  fi
31545
31546  if test "x$path" != "x$new_path"; then
31547    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31550  fi
31551
31552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31554
31555  else
31556    # We're on a posix platform. Hooray! :)
31557    path="$POTENTIAL_FREETYPE_LIB_PATH"
31558    has_space=`$ECHO "$path" | $GREP " "`
31559    if test "x$has_space" != x; then
31560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31561$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31562      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31563    fi
31564
31565    # Use eval to expand a potential ~
31566    eval path="$path"
31567    if test ! -f "$path" && test ! -d "$path"; then
31568      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31569    fi
31570
31571    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31572  fi
31573
31574
31575    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31577$as_echo_n "checking for freetype includes... " >&6; }
31578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31579$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31580    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31582$as_echo_n "checking for freetype libraries... " >&6; }
31583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31584$as_echo "$FREETYPE_LIB_PATH" >&6; }
31585  fi
31586
31587        if test "x$FOUND_FREETYPE" != xyes; then
31588          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31589        fi
31590      else
31591        # User specified only one of lib or include. This is an error.
31592        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31593          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31594$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31595          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31596        else
31597          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31598$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31599          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31600        fi
31601      fi
31602    else
31603      # User did not specify settings, but we need freetype. Try to locate it.
31604
31605      if test "x$BUNDLE_FREETYPE" = x; then
31606        # If not specified, default is to bundle freetype only on windows
31607        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31608          BUNDLE_FREETYPE=yes
31609        else
31610          BUNDLE_FREETYPE=no
31611        fi
31612      fi
31613
31614      if test "x$FOUND_FREETYPE" != xyes; then
31615        # Check builddeps
31616
31617
31618  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31619    # Source the builddeps file again, to make sure it uses the latest variables!
31620    . $builddepsfile
31621    # Look for a target and build machine specific resource!
31622    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31623    if test "x$resource" = x; then
31624      # Ok, lets instead look for a target specific resource
31625      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31626    fi
31627    if test "x$resource" = x; then
31628      # Ok, lets instead look for a build specific resource
31629      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31630    fi
31631    if test "x$resource" = x; then
31632      # Ok, lets instead look for a generic resource
31633      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31634      resource=${builddep_freetype2}
31635    fi
31636    if test "x$resource" != x; then
31637      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31638$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31639      # If the resource in the builddeps.conf file is an existing directory,
31640      # for example /java/linux/cups
31641      if test -d ${resource}; then
31642        depdir=${resource}
31643      else
31644
31645  # freetype2 is for example mymodule
31646  # $resource is for example libs/general/libmymod_1_2_3.zip
31647  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31648  # $with_builddeps_dir is for example /localhome/builddeps
31649  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31650  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31651  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31652  filename=`basename $resource`
31653  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31654  filebase=${filename%%.*}
31655  extension=${filename#*.}
31656  installdir=$with_builddeps_dir/$filebase
31657  if test ! -f $installdir/$filename.unpacked; then
31658    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31659$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31660    if test ! -d $installdir; then
31661      mkdir -p $installdir
31662    fi
31663    if test ! -d $installdir; then
31664      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31665    fi
31666    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31667    touch $tmpfile
31668    if test ! -f $tmpfile; then
31669      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31670    fi
31671
31672  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31673  # $tmpfile is the local file name for the downloaded file.
31674  VALID_TOOL=no
31675  if test "x$BDEPS_FTP" = xwget; then
31676    VALID_TOOL=yes
31677    wget -O $tmpfile $with_builddeps_server/$resource
31678  fi
31679  if test "x$BDEPS_FTP" = xlftp; then
31680    VALID_TOOL=yes
31681    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31682  fi
31683  if test "x$BDEPS_FTP" = xftp; then
31684    VALID_TOOL=yes
31685    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31686    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31687    FTPUSERPWD=${FTPSERVER%%@*}
31688    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31689      FTPUSER=${userpwd%%:*}
31690      FTPPWD=${userpwd#*@}
31691      FTPSERVER=${FTPSERVER#*@}
31692    else
31693      FTPUSER=ftp
31694      FTPPWD=ftp
31695    fi
31696    # the "pass" command does not work on some
31697    # ftp clients (read ftp.exe) but if it works,
31698    # passive mode is better!
31699    ( \
31700        echo "user $FTPUSER $FTPPWD"        ; \
31701        echo "pass"                         ; \
31702        echo "bin"                          ; \
31703        echo "get $FTPPATH $tmpfile"              ; \
31704    ) | ftp -in $FTPSERVER
31705  fi
31706  if test "x$VALID_TOOL" != xyes; then
31707    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31708  fi
31709
31710    mv $tmpfile $installdir/$filename
31711    if test ! -s $installdir/$filename; then
31712      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31713    fi
31714    case "$extension" in
31715      zip)  echo "Unzipping $installdir/$filename..."
31716        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31717        ;;
31718      tar.gz) echo "Untaring $installdir/$filename..."
31719        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31720        ;;
31721      tgz) echo "Untaring $installdir/$filename..."
31722        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31723        ;;
31724      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31725        ;;
31726    esac
31727  fi
31728  if test -f $installdir/$filename.unpacked; then
31729    depdir=$installdir
31730  fi
31731
31732      fi
31733      # Source the builddeps file again, because in the previous command, the depdir
31734      # was updated to point at the current build dependency install directory.
31735      . $builddepsfile
31736      # Now extract variables from the builddeps.conf files.
31737      theroot=${builddep_freetype2_ROOT}
31738      thecflags=${builddep_freetype2_CFLAGS}
31739      thelibs=${builddep_freetype2_LIBS}
31740      if test "x$depdir" = x; then
31741        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31742      fi
31743      FREETYPE=$depdir
31744      if test "x$theroot" != x; then
31745        FREETYPE="$theroot"
31746      fi
31747      if test "x$thecflags" != x; then
31748        FREETYPE_CFLAGS="$thecflags"
31749      fi
31750      if test "x$thelibs" != x; then
31751        FREETYPE_LIBS="$thelibs"
31752      fi
31753      FOUND_FREETYPE=yes
31754      else FOUND_FREETYPE=no
31755
31756    fi
31757    else FOUND_FREETYPE=no
31758
31759  fi
31760
31761        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31762        if test "x$FOUND_FREETYPE" = xyes; then
31763          if test "x$BUNDLE_FREETYPE" = xyes; then
31764            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31765$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31766            FOUND_FREETYPE=no
31767          else
31768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31769$as_echo_n "checking for freetype... " >&6; }
31770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31771$as_echo "yes (using builddeps)" >&6; }
31772          fi
31773        fi
31774      fi
31775
31776      if test "x$FOUND_FREETYPE" != xyes; then
31777        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31778        if test "x$PKG_CONFIG" != x; then
31779
31780pkg_failed=no
31781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31782$as_echo_n "checking for FREETYPE... " >&6; }
31783
31784if test -n "$FREETYPE_CFLAGS"; then
31785    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
31786 elif test -n "$PKG_CONFIG"; then
31787    if test -n "$PKG_CONFIG" && \
31788    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31789  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31790  ac_status=$?
31791  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31792  test $ac_status = 0; }; then
31793  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31794else
31795  pkg_failed=yes
31796fi
31797 else
31798    pkg_failed=untried
31799fi
31800if test -n "$FREETYPE_LIBS"; then
31801    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
31802 elif test -n "$PKG_CONFIG"; then
31803    if test -n "$PKG_CONFIG" && \
31804    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31805  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31806  ac_status=$?
31807  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31808  test $ac_status = 0; }; then
31809  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31810else
31811  pkg_failed=yes
31812fi
31813 else
31814    pkg_failed=untried
31815fi
31816
31817
31818
31819if test $pkg_failed = yes; then
31820
31821if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31822        _pkg_short_errors_supported=yes
31823else
31824        _pkg_short_errors_supported=no
31825fi
31826        if test $_pkg_short_errors_supported = yes; then
31827	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31828        else
31829	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31830        fi
31831	# Put the nasty error message in config.log where it belongs
31832	echo "$FREETYPE_PKG_ERRORS" >&5
31833
31834	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31835$as_echo "no" >&6; }
31836                FOUND_FREETYPE=no
31837elif test $pkg_failed = untried; then
31838	FOUND_FREETYPE=no
31839else
31840	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
31841	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
31842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31843$as_echo "yes" >&6; }
31844	FOUND_FREETYPE=yes
31845fi
31846          if test "x$FOUND_FREETYPE" = xyes; then
31847            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31848            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
31849            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31850            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31851              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
31852            fi
31853            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31854            if test "x$BUNDLE_FREETYPE" = xyes; then
31855              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
31856$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
31857              FOUND_FREETYPE=no
31858            else
31859              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31860$as_echo_n "checking for freetype... " >&6; }
31861              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
31862$as_echo "yes (using pkg-config)" >&6; }
31863            fi
31864          fi
31865        fi
31866      fi
31867
31868      if test "x$FOUND_FREETYPE" != xyes; then
31869        # Check in well-known locations
31870        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31871          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
31872
31873  windows_path="$FREETYPE_BASE_DIR"
31874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31875    unix_path=`$CYGPATH -u "$windows_path"`
31876    FREETYPE_BASE_DIR="$unix_path"
31877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31879    FREETYPE_BASE_DIR="$unix_path"
31880  fi
31881
31882
31883  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
31884  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
31885  METHOD="well-known location"
31886
31887  # First check if the files exists.
31888  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31889    # We found an arbitrary include file. That's a good sign.
31890    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31891$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31892    FOUND_FREETYPE=yes
31893
31894    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31895    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31896      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31897$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31898      FOUND_FREETYPE=no
31899    else
31900      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31901        # On Windows, we will need both .lib and .dll file.
31902        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31903          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31904$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31905          FOUND_FREETYPE=no
31906        fi
31907      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
31908        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31909        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31910      fi
31911    fi
31912  fi
31913
31914  if test "x$FOUND_FREETYPE" = xyes; then
31915
31916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31917
31918  # Input might be given as Windows format, start by converting to
31919  # unix format.
31920  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31921  new_path=`$CYGPATH -u "$path"`
31922
31923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31926  # "foo.exe" is OK but "foo" is an error.
31927  #
31928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31929  # It is also a way to make sure we got the proper file name for the real test later on.
31930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31931  if test "x$test_shortpath" = x; then
31932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31934    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31935  fi
31936
31937  # Call helper function which possibly converts this using DOS-style short mode.
31938  # If so, the updated path is stored in $new_path.
31939
31940  input_path="$new_path"
31941  # Check if we need to convert this using DOS-style short mode. If the path
31942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31943  # take no chances and rewrite it.
31944  # Note: m4 eats our [], so we need to use [ and ] instead.
31945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31946  if test "x$has_forbidden_chars" != x; then
31947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31951      # Going to short mode and back again did indeed matter. Since short mode is
31952      # case insensitive, let's make it lowercase to improve readability.
31953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31954      # Now convert it back to Unix-stile (cygpath)
31955      input_path=`$CYGPATH -u "$shortmode_path"`
31956      new_path="$input_path"
31957    fi
31958  fi
31959
31960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31961  if test "x$test_cygdrive_prefix" = x; then
31962    # As a simple fix, exclude /usr/bin since it's not a real path.
31963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31965      # a path prefixed by /cygdrive for fixpath to work.
31966      new_path="$CYGWIN_ROOT_PATH$input_path"
31967    fi
31968  fi
31969
31970
31971  if test "x$path" != "x$new_path"; then
31972    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31975  fi
31976
31977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31978
31979  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31980  has_colon=`$ECHO $path | $GREP ^.:`
31981  new_path="$path"
31982  if test "x$has_colon" = x; then
31983    # Not in mixed or Windows style, start by that.
31984    new_path=`cmd //c echo $path`
31985  fi
31986
31987
31988  input_path="$new_path"
31989  # Check if we need to convert this using DOS-style short mode. If the path
31990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31991  # take no chances and rewrite it.
31992  # Note: m4 eats our [], so we need to use [ and ] instead.
31993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31994  if test "x$has_forbidden_chars" != x; then
31995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31997  fi
31998
31999
32000  windows_path="$new_path"
32001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32002    unix_path=`$CYGPATH -u "$windows_path"`
32003    new_path="$unix_path"
32004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32006    new_path="$unix_path"
32007  fi
32008
32009  if test "x$path" != "x$new_path"; then
32010    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32013  fi
32014
32015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32017
32018  else
32019    # We're on a posix platform. Hooray! :)
32020    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32021    has_space=`$ECHO "$path" | $GREP " "`
32022    if test "x$has_space" != x; then
32023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32025      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32026    fi
32027
32028    # Use eval to expand a potential ~
32029    eval path="$path"
32030    if test ! -f "$path" && test ! -d "$path"; then
32031      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32032    fi
32033
32034    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32035  fi
32036
32037
32038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32039
32040  # Input might be given as Windows format, start by converting to
32041  # unix format.
32042  path="$POTENTIAL_FREETYPE_LIB_PATH"
32043  new_path=`$CYGPATH -u "$path"`
32044
32045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32048  # "foo.exe" is OK but "foo" is an error.
32049  #
32050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32051  # It is also a way to make sure we got the proper file name for the real test later on.
32052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32053  if test "x$test_shortpath" = x; then
32054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32055$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32056    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32057  fi
32058
32059  # Call helper function which possibly converts this using DOS-style short mode.
32060  # If so, the updated path is stored in $new_path.
32061
32062  input_path="$new_path"
32063  # Check if we need to convert this using DOS-style short mode. If the path
32064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32065  # take no chances and rewrite it.
32066  # Note: m4 eats our [], so we need to use [ and ] instead.
32067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32068  if test "x$has_forbidden_chars" != x; then
32069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32073      # Going to short mode and back again did indeed matter. Since short mode is
32074      # case insensitive, let's make it lowercase to improve readability.
32075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32076      # Now convert it back to Unix-stile (cygpath)
32077      input_path=`$CYGPATH -u "$shortmode_path"`
32078      new_path="$input_path"
32079    fi
32080  fi
32081
32082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32083  if test "x$test_cygdrive_prefix" = x; then
32084    # As a simple fix, exclude /usr/bin since it's not a real path.
32085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32087      # a path prefixed by /cygdrive for fixpath to work.
32088      new_path="$CYGWIN_ROOT_PATH$input_path"
32089    fi
32090  fi
32091
32092
32093  if test "x$path" != "x$new_path"; then
32094    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32096$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32097  fi
32098
32099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32100
32101  path="$POTENTIAL_FREETYPE_LIB_PATH"
32102  has_colon=`$ECHO $path | $GREP ^.:`
32103  new_path="$path"
32104  if test "x$has_colon" = x; then
32105    # Not in mixed or Windows style, start by that.
32106    new_path=`cmd //c echo $path`
32107  fi
32108
32109
32110  input_path="$new_path"
32111  # Check if we need to convert this using DOS-style short mode. If the path
32112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32113  # take no chances and rewrite it.
32114  # Note: m4 eats our [], so we need to use [ and ] instead.
32115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32116  if test "x$has_forbidden_chars" != x; then
32117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32119  fi
32120
32121
32122  windows_path="$new_path"
32123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32124    unix_path=`$CYGPATH -u "$windows_path"`
32125    new_path="$unix_path"
32126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32128    new_path="$unix_path"
32129  fi
32130
32131  if test "x$path" != "x$new_path"; then
32132    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32134$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32135  fi
32136
32137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32139
32140  else
32141    # We're on a posix platform. Hooray! :)
32142    path="$POTENTIAL_FREETYPE_LIB_PATH"
32143    has_space=`$ECHO "$path" | $GREP " "`
32144    if test "x$has_space" != x; then
32145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32146$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32147      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32148    fi
32149
32150    # Use eval to expand a potential ~
32151    eval path="$path"
32152    if test ! -f "$path" && test ! -d "$path"; then
32153      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32154    fi
32155
32156    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32157  fi
32158
32159
32160    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32162$as_echo_n "checking for freetype includes... " >&6; }
32163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32164$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32165    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32167$as_echo_n "checking for freetype libraries... " >&6; }
32168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32169$as_echo "$FREETYPE_LIB_PATH" >&6; }
32170  fi
32171
32172          if test "x$FOUND_FREETYPE" != xyes; then
32173            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32174
32175  windows_path="$FREETYPE_BASE_DIR"
32176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32177    unix_path=`$CYGPATH -u "$windows_path"`
32178    FREETYPE_BASE_DIR="$unix_path"
32179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32181    FREETYPE_BASE_DIR="$unix_path"
32182  fi
32183
32184
32185  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32186  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32187  METHOD="well-known location"
32188
32189  # First check if the files exists.
32190  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32191    # We found an arbitrary include file. That's a good sign.
32192    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32193$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32194    FOUND_FREETYPE=yes
32195
32196    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32197    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32198      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32199$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32200      FOUND_FREETYPE=no
32201    else
32202      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32203        # On Windows, we will need both .lib and .dll file.
32204        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32205          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32206$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32207          FOUND_FREETYPE=no
32208        fi
32209      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32210        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32211        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32212      fi
32213    fi
32214  fi
32215
32216  if test "x$FOUND_FREETYPE" = xyes; then
32217
32218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32219
32220  # Input might be given as Windows format, start by converting to
32221  # unix format.
32222  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32223  new_path=`$CYGPATH -u "$path"`
32224
32225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32228  # "foo.exe" is OK but "foo" is an error.
32229  #
32230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32231  # It is also a way to make sure we got the proper file name for the real test later on.
32232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32233  if test "x$test_shortpath" = x; then
32234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32235$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32236    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32237  fi
32238
32239  # Call helper function which possibly converts this using DOS-style short mode.
32240  # If so, the updated path is stored in $new_path.
32241
32242  input_path="$new_path"
32243  # Check if we need to convert this using DOS-style short mode. If the path
32244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32245  # take no chances and rewrite it.
32246  # Note: m4 eats our [], so we need to use [ and ] instead.
32247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32248  if test "x$has_forbidden_chars" != x; then
32249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32253      # Going to short mode and back again did indeed matter. Since short mode is
32254      # case insensitive, let's make it lowercase to improve readability.
32255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32256      # Now convert it back to Unix-stile (cygpath)
32257      input_path=`$CYGPATH -u "$shortmode_path"`
32258      new_path="$input_path"
32259    fi
32260  fi
32261
32262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32263  if test "x$test_cygdrive_prefix" = x; then
32264    # As a simple fix, exclude /usr/bin since it's not a real path.
32265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32267      # a path prefixed by /cygdrive for fixpath to work.
32268      new_path="$CYGWIN_ROOT_PATH$input_path"
32269    fi
32270  fi
32271
32272
32273  if test "x$path" != "x$new_path"; then
32274    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32277  fi
32278
32279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32280
32281  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32282  has_colon=`$ECHO $path | $GREP ^.:`
32283  new_path="$path"
32284  if test "x$has_colon" = x; then
32285    # Not in mixed or Windows style, start by that.
32286    new_path=`cmd //c echo $path`
32287  fi
32288
32289
32290  input_path="$new_path"
32291  # Check if we need to convert this using DOS-style short mode. If the path
32292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32293  # take no chances and rewrite it.
32294  # Note: m4 eats our [], so we need to use [ and ] instead.
32295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32296  if test "x$has_forbidden_chars" != x; then
32297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32299  fi
32300
32301
32302  windows_path="$new_path"
32303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32304    unix_path=`$CYGPATH -u "$windows_path"`
32305    new_path="$unix_path"
32306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32308    new_path="$unix_path"
32309  fi
32310
32311  if test "x$path" != "x$new_path"; then
32312    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32314$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32315  fi
32316
32317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32319
32320  else
32321    # We're on a posix platform. Hooray! :)
32322    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32323    has_space=`$ECHO "$path" | $GREP " "`
32324    if test "x$has_space" != x; then
32325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32326$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32327      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32328    fi
32329
32330    # Use eval to expand a potential ~
32331    eval path="$path"
32332    if test ! -f "$path" && test ! -d "$path"; then
32333      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32334    fi
32335
32336    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32337  fi
32338
32339
32340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32341
32342  # Input might be given as Windows format, start by converting to
32343  # unix format.
32344  path="$POTENTIAL_FREETYPE_LIB_PATH"
32345  new_path=`$CYGPATH -u "$path"`
32346
32347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32350  # "foo.exe" is OK but "foo" is an error.
32351  #
32352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32353  # It is also a way to make sure we got the proper file name for the real test later on.
32354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32355  if test "x$test_shortpath" = x; then
32356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32357$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32358    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32359  fi
32360
32361  # Call helper function which possibly converts this using DOS-style short mode.
32362  # If so, the updated path is stored in $new_path.
32363
32364  input_path="$new_path"
32365  # Check if we need to convert this using DOS-style short mode. If the path
32366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32367  # take no chances and rewrite it.
32368  # Note: m4 eats our [], so we need to use [ and ] instead.
32369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32370  if test "x$has_forbidden_chars" != x; then
32371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32375      # Going to short mode and back again did indeed matter. Since short mode is
32376      # case insensitive, let's make it lowercase to improve readability.
32377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32378      # Now convert it back to Unix-stile (cygpath)
32379      input_path=`$CYGPATH -u "$shortmode_path"`
32380      new_path="$input_path"
32381    fi
32382  fi
32383
32384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32385  if test "x$test_cygdrive_prefix" = x; then
32386    # As a simple fix, exclude /usr/bin since it's not a real path.
32387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32389      # a path prefixed by /cygdrive for fixpath to work.
32390      new_path="$CYGWIN_ROOT_PATH$input_path"
32391    fi
32392  fi
32393
32394
32395  if test "x$path" != "x$new_path"; then
32396    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32399  fi
32400
32401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32402
32403  path="$POTENTIAL_FREETYPE_LIB_PATH"
32404  has_colon=`$ECHO $path | $GREP ^.:`
32405  new_path="$path"
32406  if test "x$has_colon" = x; then
32407    # Not in mixed or Windows style, start by that.
32408    new_path=`cmd //c echo $path`
32409  fi
32410
32411
32412  input_path="$new_path"
32413  # Check if we need to convert this using DOS-style short mode. If the path
32414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32415  # take no chances and rewrite it.
32416  # Note: m4 eats our [], so we need to use [ and ] instead.
32417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32418  if test "x$has_forbidden_chars" != x; then
32419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32421  fi
32422
32423
32424  windows_path="$new_path"
32425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32426    unix_path=`$CYGPATH -u "$windows_path"`
32427    new_path="$unix_path"
32428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32430    new_path="$unix_path"
32431  fi
32432
32433  if test "x$path" != "x$new_path"; then
32434    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32436$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32437  fi
32438
32439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32441
32442  else
32443    # We're on a posix platform. Hooray! :)
32444    path="$POTENTIAL_FREETYPE_LIB_PATH"
32445    has_space=`$ECHO "$path" | $GREP " "`
32446    if test "x$has_space" != x; then
32447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32448$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32449      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32450    fi
32451
32452    # Use eval to expand a potential ~
32453    eval path="$path"
32454    if test ! -f "$path" && test ! -d "$path"; then
32455      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32456    fi
32457
32458    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32459  fi
32460
32461
32462    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32464$as_echo_n "checking for freetype includes... " >&6; }
32465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32466$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32467    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32469$as_echo_n "checking for freetype libraries... " >&6; }
32470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32471$as_echo "$FREETYPE_LIB_PATH" >&6; }
32472  fi
32473
32474          fi
32475        else
32476          if test "x$SYS_ROOT" = "x/"; then
32477            FREETYPE_ROOT=
32478          else
32479            FREETYPE_ROOT="$SYS_ROOT"
32480          fi
32481          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32482
32483  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32484  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32485  METHOD="well-known location"
32486
32487  # First check if the files exists.
32488  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32489    # We found an arbitrary include file. That's a good sign.
32490    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32491$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32492    FOUND_FREETYPE=yes
32493
32494    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32495    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32496      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32497$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32498      FOUND_FREETYPE=no
32499    else
32500      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32501        # On Windows, we will need both .lib and .dll file.
32502        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32503          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32504$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32505          FOUND_FREETYPE=no
32506        fi
32507      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32508        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32509        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32510      fi
32511    fi
32512  fi
32513
32514  if test "x$FOUND_FREETYPE" = xyes; then
32515
32516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32517
32518  # Input might be given as Windows format, start by converting to
32519  # unix format.
32520  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32521  new_path=`$CYGPATH -u "$path"`
32522
32523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32526  # "foo.exe" is OK but "foo" is an error.
32527  #
32528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32529  # It is also a way to make sure we got the proper file name for the real test later on.
32530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32531  if test "x$test_shortpath" = x; then
32532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32533$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32534    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32535  fi
32536
32537  # Call helper function which possibly converts this using DOS-style short mode.
32538  # If so, the updated path is stored in $new_path.
32539
32540  input_path="$new_path"
32541  # Check if we need to convert this using DOS-style short mode. If the path
32542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32543  # take no chances and rewrite it.
32544  # Note: m4 eats our [], so we need to use [ and ] instead.
32545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32546  if test "x$has_forbidden_chars" != x; then
32547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32551      # Going to short mode and back again did indeed matter. Since short mode is
32552      # case insensitive, let's make it lowercase to improve readability.
32553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32554      # Now convert it back to Unix-stile (cygpath)
32555      input_path=`$CYGPATH -u "$shortmode_path"`
32556      new_path="$input_path"
32557    fi
32558  fi
32559
32560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32561  if test "x$test_cygdrive_prefix" = x; then
32562    # As a simple fix, exclude /usr/bin since it's not a real path.
32563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32565      # a path prefixed by /cygdrive for fixpath to work.
32566      new_path="$CYGWIN_ROOT_PATH$input_path"
32567    fi
32568  fi
32569
32570
32571  if test "x$path" != "x$new_path"; then
32572    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32574$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32575  fi
32576
32577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32578
32579  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32580  has_colon=`$ECHO $path | $GREP ^.:`
32581  new_path="$path"
32582  if test "x$has_colon" = x; then
32583    # Not in mixed or Windows style, start by that.
32584    new_path=`cmd //c echo $path`
32585  fi
32586
32587
32588  input_path="$new_path"
32589  # Check if we need to convert this using DOS-style short mode. If the path
32590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32591  # take no chances and rewrite it.
32592  # Note: m4 eats our [], so we need to use [ and ] instead.
32593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32594  if test "x$has_forbidden_chars" != x; then
32595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32597  fi
32598
32599
32600  windows_path="$new_path"
32601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32602    unix_path=`$CYGPATH -u "$windows_path"`
32603    new_path="$unix_path"
32604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32606    new_path="$unix_path"
32607  fi
32608
32609  if test "x$path" != "x$new_path"; then
32610    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32612$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32613  fi
32614
32615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32617
32618  else
32619    # We're on a posix platform. Hooray! :)
32620    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32621    has_space=`$ECHO "$path" | $GREP " "`
32622    if test "x$has_space" != x; then
32623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32624$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32625      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32626    fi
32627
32628    # Use eval to expand a potential ~
32629    eval path="$path"
32630    if test ! -f "$path" && test ! -d "$path"; then
32631      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32632    fi
32633
32634    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32635  fi
32636
32637
32638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32639
32640  # Input might be given as Windows format, start by converting to
32641  # unix format.
32642  path="$POTENTIAL_FREETYPE_LIB_PATH"
32643  new_path=`$CYGPATH -u "$path"`
32644
32645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32648  # "foo.exe" is OK but "foo" is an error.
32649  #
32650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32651  # It is also a way to make sure we got the proper file name for the real test later on.
32652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32653  if test "x$test_shortpath" = x; then
32654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32655$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32656    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32657  fi
32658
32659  # Call helper function which possibly converts this using DOS-style short mode.
32660  # If so, the updated path is stored in $new_path.
32661
32662  input_path="$new_path"
32663  # Check if we need to convert this using DOS-style short mode. If the path
32664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32665  # take no chances and rewrite it.
32666  # Note: m4 eats our [], so we need to use [ and ] instead.
32667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32668  if test "x$has_forbidden_chars" != x; then
32669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32673      # Going to short mode and back again did indeed matter. Since short mode is
32674      # case insensitive, let's make it lowercase to improve readability.
32675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32676      # Now convert it back to Unix-stile (cygpath)
32677      input_path=`$CYGPATH -u "$shortmode_path"`
32678      new_path="$input_path"
32679    fi
32680  fi
32681
32682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32683  if test "x$test_cygdrive_prefix" = x; then
32684    # As a simple fix, exclude /usr/bin since it's not a real path.
32685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32687      # a path prefixed by /cygdrive for fixpath to work.
32688      new_path="$CYGWIN_ROOT_PATH$input_path"
32689    fi
32690  fi
32691
32692
32693  if test "x$path" != "x$new_path"; then
32694    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32696$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32697  fi
32698
32699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32700
32701  path="$POTENTIAL_FREETYPE_LIB_PATH"
32702  has_colon=`$ECHO $path | $GREP ^.:`
32703  new_path="$path"
32704  if test "x$has_colon" = x; then
32705    # Not in mixed or Windows style, start by that.
32706    new_path=`cmd //c echo $path`
32707  fi
32708
32709
32710  input_path="$new_path"
32711  # Check if we need to convert this using DOS-style short mode. If the path
32712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32713  # take no chances and rewrite it.
32714  # Note: m4 eats our [], so we need to use [ and ] instead.
32715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32716  if test "x$has_forbidden_chars" != x; then
32717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32719  fi
32720
32721
32722  windows_path="$new_path"
32723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32724    unix_path=`$CYGPATH -u "$windows_path"`
32725    new_path="$unix_path"
32726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32728    new_path="$unix_path"
32729  fi
32730
32731  if test "x$path" != "x$new_path"; then
32732    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32734$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32735  fi
32736
32737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32739
32740  else
32741    # We're on a posix platform. Hooray! :)
32742    path="$POTENTIAL_FREETYPE_LIB_PATH"
32743    has_space=`$ECHO "$path" | $GREP " "`
32744    if test "x$has_space" != x; then
32745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32747      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32748    fi
32749
32750    # Use eval to expand a potential ~
32751    eval path="$path"
32752    if test ! -f "$path" && test ! -d "$path"; then
32753      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32754    fi
32755
32756    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32757  fi
32758
32759
32760    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32762$as_echo_n "checking for freetype includes... " >&6; }
32763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32764$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32765    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32767$as_echo_n "checking for freetype libraries... " >&6; }
32768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32769$as_echo "$FREETYPE_LIB_PATH" >&6; }
32770  fi
32771
32772
32773          if test "x$FOUND_FREETYPE" != xyes; then
32774            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32775
32776  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32777  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32778  METHOD="well-known location"
32779
32780  # First check if the files exists.
32781  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32782    # We found an arbitrary include file. That's a good sign.
32783    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32784$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32785    FOUND_FREETYPE=yes
32786
32787    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32788    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32789      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32790$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32791      FOUND_FREETYPE=no
32792    else
32793      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32794        # On Windows, we will need both .lib and .dll file.
32795        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32796          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32797$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32798          FOUND_FREETYPE=no
32799        fi
32800      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32801        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32802        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32803      fi
32804    fi
32805  fi
32806
32807  if test "x$FOUND_FREETYPE" = xyes; then
32808
32809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32810
32811  # Input might be given as Windows format, start by converting to
32812  # unix format.
32813  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32814  new_path=`$CYGPATH -u "$path"`
32815
32816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32819  # "foo.exe" is OK but "foo" is an error.
32820  #
32821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32822  # It is also a way to make sure we got the proper file name for the real test later on.
32823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32824  if test "x$test_shortpath" = x; then
32825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32826$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32827    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32828  fi
32829
32830  # Call helper function which possibly converts this using DOS-style short mode.
32831  # If so, the updated path is stored in $new_path.
32832
32833  input_path="$new_path"
32834  # Check if we need to convert this using DOS-style short mode. If the path
32835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32836  # take no chances and rewrite it.
32837  # Note: m4 eats our [], so we need to use [ and ] instead.
32838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32839  if test "x$has_forbidden_chars" != x; then
32840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32844      # Going to short mode and back again did indeed matter. Since short mode is
32845      # case insensitive, let's make it lowercase to improve readability.
32846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32847      # Now convert it back to Unix-stile (cygpath)
32848      input_path=`$CYGPATH -u "$shortmode_path"`
32849      new_path="$input_path"
32850    fi
32851  fi
32852
32853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32854  if test "x$test_cygdrive_prefix" = x; then
32855    # As a simple fix, exclude /usr/bin since it's not a real path.
32856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32858      # a path prefixed by /cygdrive for fixpath to work.
32859      new_path="$CYGWIN_ROOT_PATH$input_path"
32860    fi
32861  fi
32862
32863
32864  if test "x$path" != "x$new_path"; then
32865    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32867$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32868  fi
32869
32870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32871
32872  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32873  has_colon=`$ECHO $path | $GREP ^.:`
32874  new_path="$path"
32875  if test "x$has_colon" = x; then
32876    # Not in mixed or Windows style, start by that.
32877    new_path=`cmd //c echo $path`
32878  fi
32879
32880
32881  input_path="$new_path"
32882  # Check if we need to convert this using DOS-style short mode. If the path
32883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32884  # take no chances and rewrite it.
32885  # Note: m4 eats our [], so we need to use [ and ] instead.
32886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32887  if test "x$has_forbidden_chars" != x; then
32888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32890  fi
32891
32892
32893  windows_path="$new_path"
32894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32895    unix_path=`$CYGPATH -u "$windows_path"`
32896    new_path="$unix_path"
32897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32899    new_path="$unix_path"
32900  fi
32901
32902  if test "x$path" != "x$new_path"; then
32903    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32905$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32906  fi
32907
32908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32910
32911  else
32912    # We're on a posix platform. Hooray! :)
32913    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32914    has_space=`$ECHO "$path" | $GREP " "`
32915    if test "x$has_space" != x; then
32916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32917$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32918      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32919    fi
32920
32921    # Use eval to expand a potential ~
32922    eval path="$path"
32923    if test ! -f "$path" && test ! -d "$path"; then
32924      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32925    fi
32926
32927    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32928  fi
32929
32930
32931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32932
32933  # Input might be given as Windows format, start by converting to
32934  # unix format.
32935  path="$POTENTIAL_FREETYPE_LIB_PATH"
32936  new_path=`$CYGPATH -u "$path"`
32937
32938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32941  # "foo.exe" is OK but "foo" is an error.
32942  #
32943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32944  # It is also a way to make sure we got the proper file name for the real test later on.
32945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32946  if test "x$test_shortpath" = x; then
32947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32948$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32949    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32950  fi
32951
32952  # Call helper function which possibly converts this using DOS-style short mode.
32953  # If so, the updated path is stored in $new_path.
32954
32955  input_path="$new_path"
32956  # Check if we need to convert this using DOS-style short mode. If the path
32957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32958  # take no chances and rewrite it.
32959  # Note: m4 eats our [], so we need to use [ and ] instead.
32960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32961  if test "x$has_forbidden_chars" != x; then
32962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32966      # Going to short mode and back again did indeed matter. Since short mode is
32967      # case insensitive, let's make it lowercase to improve readability.
32968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32969      # Now convert it back to Unix-stile (cygpath)
32970      input_path=`$CYGPATH -u "$shortmode_path"`
32971      new_path="$input_path"
32972    fi
32973  fi
32974
32975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32976  if test "x$test_cygdrive_prefix" = x; then
32977    # As a simple fix, exclude /usr/bin since it's not a real path.
32978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32980      # a path prefixed by /cygdrive for fixpath to work.
32981      new_path="$CYGWIN_ROOT_PATH$input_path"
32982    fi
32983  fi
32984
32985
32986  if test "x$path" != "x$new_path"; then
32987    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32989$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32990  fi
32991
32992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32993
32994  path="$POTENTIAL_FREETYPE_LIB_PATH"
32995  has_colon=`$ECHO $path | $GREP ^.:`
32996  new_path="$path"
32997  if test "x$has_colon" = x; then
32998    # Not in mixed or Windows style, start by that.
32999    new_path=`cmd //c echo $path`
33000  fi
33001
33002
33003  input_path="$new_path"
33004  # Check if we need to convert this using DOS-style short mode. If the path
33005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33006  # take no chances and rewrite it.
33007  # Note: m4 eats our [], so we need to use [ and ] instead.
33008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33009  if test "x$has_forbidden_chars" != x; then
33010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33012  fi
33013
33014
33015  windows_path="$new_path"
33016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33017    unix_path=`$CYGPATH -u "$windows_path"`
33018    new_path="$unix_path"
33019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33021    new_path="$unix_path"
33022  fi
33023
33024  if test "x$path" != "x$new_path"; then
33025    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33027$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33028  fi
33029
33030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33032
33033  else
33034    # We're on a posix platform. Hooray! :)
33035    path="$POTENTIAL_FREETYPE_LIB_PATH"
33036    has_space=`$ECHO "$path" | $GREP " "`
33037    if test "x$has_space" != x; then
33038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33039$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33040      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33041    fi
33042
33043    # Use eval to expand a potential ~
33044    eval path="$path"
33045    if test ! -f "$path" && test ! -d "$path"; then
33046      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33047    fi
33048
33049    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33050  fi
33051
33052
33053    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33055$as_echo_n "checking for freetype includes... " >&6; }
33056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33057$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33058    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33060$as_echo_n "checking for freetype libraries... " >&6; }
33061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33062$as_echo "$FREETYPE_LIB_PATH" >&6; }
33063  fi
33064
33065          fi
33066
33067          if test "x$FOUND_FREETYPE" != xyes; then
33068            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33069            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33070
33071  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33072  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33073  METHOD="well-known location"
33074
33075  # First check if the files exists.
33076  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33077    # We found an arbitrary include file. That's a good sign.
33078    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33079$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33080    FOUND_FREETYPE=yes
33081
33082    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33083    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33084      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33085$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33086      FOUND_FREETYPE=no
33087    else
33088      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33089        # On Windows, we will need both .lib and .dll file.
33090        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33091          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33092$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33093          FOUND_FREETYPE=no
33094        fi
33095      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33096        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33097        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33098      fi
33099    fi
33100  fi
33101
33102  if test "x$FOUND_FREETYPE" = xyes; then
33103
33104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33105
33106  # Input might be given as Windows format, start by converting to
33107  # unix format.
33108  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33109  new_path=`$CYGPATH -u "$path"`
33110
33111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33114  # "foo.exe" is OK but "foo" is an error.
33115  #
33116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33117  # It is also a way to make sure we got the proper file name for the real test later on.
33118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33119  if test "x$test_shortpath" = x; then
33120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33121$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33122    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33123  fi
33124
33125  # Call helper function which possibly converts this using DOS-style short mode.
33126  # If so, the updated path is stored in $new_path.
33127
33128  input_path="$new_path"
33129  # Check if we need to convert this using DOS-style short mode. If the path
33130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33131  # take no chances and rewrite it.
33132  # Note: m4 eats our [], so we need to use [ and ] instead.
33133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33134  if test "x$has_forbidden_chars" != x; then
33135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33139      # Going to short mode and back again did indeed matter. Since short mode is
33140      # case insensitive, let's make it lowercase to improve readability.
33141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33142      # Now convert it back to Unix-stile (cygpath)
33143      input_path=`$CYGPATH -u "$shortmode_path"`
33144      new_path="$input_path"
33145    fi
33146  fi
33147
33148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33149  if test "x$test_cygdrive_prefix" = x; then
33150    # As a simple fix, exclude /usr/bin since it's not a real path.
33151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33153      # a path prefixed by /cygdrive for fixpath to work.
33154      new_path="$CYGWIN_ROOT_PATH$input_path"
33155    fi
33156  fi
33157
33158
33159  if test "x$path" != "x$new_path"; then
33160    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33162$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33163  fi
33164
33165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33166
33167  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33168  has_colon=`$ECHO $path | $GREP ^.:`
33169  new_path="$path"
33170  if test "x$has_colon" = x; then
33171    # Not in mixed or Windows style, start by that.
33172    new_path=`cmd //c echo $path`
33173  fi
33174
33175
33176  input_path="$new_path"
33177  # Check if we need to convert this using DOS-style short mode. If the path
33178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33179  # take no chances and rewrite it.
33180  # Note: m4 eats our [], so we need to use [ and ] instead.
33181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33182  if test "x$has_forbidden_chars" != x; then
33183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33185  fi
33186
33187
33188  windows_path="$new_path"
33189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33190    unix_path=`$CYGPATH -u "$windows_path"`
33191    new_path="$unix_path"
33192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33194    new_path="$unix_path"
33195  fi
33196
33197  if test "x$path" != "x$new_path"; then
33198    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33200$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33201  fi
33202
33203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33205
33206  else
33207    # We're on a posix platform. Hooray! :)
33208    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33209    has_space=`$ECHO "$path" | $GREP " "`
33210    if test "x$has_space" != x; then
33211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33212$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33213      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33214    fi
33215
33216    # Use eval to expand a potential ~
33217    eval path="$path"
33218    if test ! -f "$path" && test ! -d "$path"; then
33219      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33220    fi
33221
33222    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33223  fi
33224
33225
33226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33227
33228  # Input might be given as Windows format, start by converting to
33229  # unix format.
33230  path="$POTENTIAL_FREETYPE_LIB_PATH"
33231  new_path=`$CYGPATH -u "$path"`
33232
33233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33236  # "foo.exe" is OK but "foo" is an error.
33237  #
33238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33239  # It is also a way to make sure we got the proper file name for the real test later on.
33240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33241  if test "x$test_shortpath" = x; then
33242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33244    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33245  fi
33246
33247  # Call helper function which possibly converts this using DOS-style short mode.
33248  # If so, the updated path is stored in $new_path.
33249
33250  input_path="$new_path"
33251  # Check if we need to convert this using DOS-style short mode. If the path
33252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33253  # take no chances and rewrite it.
33254  # Note: m4 eats our [], so we need to use [ and ] instead.
33255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33256  if test "x$has_forbidden_chars" != x; then
33257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33261      # Going to short mode and back again did indeed matter. Since short mode is
33262      # case insensitive, let's make it lowercase to improve readability.
33263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33264      # Now convert it back to Unix-stile (cygpath)
33265      input_path=`$CYGPATH -u "$shortmode_path"`
33266      new_path="$input_path"
33267    fi
33268  fi
33269
33270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33271  if test "x$test_cygdrive_prefix" = x; then
33272    # As a simple fix, exclude /usr/bin since it's not a real path.
33273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33275      # a path prefixed by /cygdrive for fixpath to work.
33276      new_path="$CYGWIN_ROOT_PATH$input_path"
33277    fi
33278  fi
33279
33280
33281  if test "x$path" != "x$new_path"; then
33282    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33284$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33285  fi
33286
33287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33288
33289  path="$POTENTIAL_FREETYPE_LIB_PATH"
33290  has_colon=`$ECHO $path | $GREP ^.:`
33291  new_path="$path"
33292  if test "x$has_colon" = x; then
33293    # Not in mixed or Windows style, start by that.
33294    new_path=`cmd //c echo $path`
33295  fi
33296
33297
33298  input_path="$new_path"
33299  # Check if we need to convert this using DOS-style short mode. If the path
33300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33301  # take no chances and rewrite it.
33302  # Note: m4 eats our [], so we need to use [ and ] instead.
33303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33304  if test "x$has_forbidden_chars" != x; then
33305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33307  fi
33308
33309
33310  windows_path="$new_path"
33311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33312    unix_path=`$CYGPATH -u "$windows_path"`
33313    new_path="$unix_path"
33314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33316    new_path="$unix_path"
33317  fi
33318
33319  if test "x$path" != "x$new_path"; then
33320    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33322$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33323  fi
33324
33325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33327
33328  else
33329    # We're on a posix platform. Hooray! :)
33330    path="$POTENTIAL_FREETYPE_LIB_PATH"
33331    has_space=`$ECHO "$path" | $GREP " "`
33332    if test "x$has_space" != x; then
33333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33334$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33335      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33336    fi
33337
33338    # Use eval to expand a potential ~
33339    eval path="$path"
33340    if test ! -f "$path" && test ! -d "$path"; then
33341      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33342    fi
33343
33344    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33345  fi
33346
33347
33348    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33350$as_echo_n "checking for freetype includes... " >&6; }
33351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33352$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33353    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33355$as_echo_n "checking for freetype libraries... " >&6; }
33356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33357$as_echo "$FREETYPE_LIB_PATH" >&6; }
33358  fi
33359
33360            else
33361
33362  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33363  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33364  METHOD="well-known location"
33365
33366  # First check if the files exists.
33367  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33368    # We found an arbitrary include file. That's a good sign.
33369    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33370$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33371    FOUND_FREETYPE=yes
33372
33373    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33374    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33375      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33376$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33377      FOUND_FREETYPE=no
33378    else
33379      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33380        # On Windows, we will need both .lib and .dll file.
33381        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33382          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33383$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33384          FOUND_FREETYPE=no
33385        fi
33386      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33387        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33388        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33389      fi
33390    fi
33391  fi
33392
33393  if test "x$FOUND_FREETYPE" = xyes; then
33394
33395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33396
33397  # Input might be given as Windows format, start by converting to
33398  # unix format.
33399  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33400  new_path=`$CYGPATH -u "$path"`
33401
33402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33405  # "foo.exe" is OK but "foo" is an error.
33406  #
33407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33408  # It is also a way to make sure we got the proper file name for the real test later on.
33409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33410  if test "x$test_shortpath" = x; then
33411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33412$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33413    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33414  fi
33415
33416  # Call helper function which possibly converts this using DOS-style short mode.
33417  # If so, the updated path is stored in $new_path.
33418
33419  input_path="$new_path"
33420  # Check if we need to convert this using DOS-style short mode. If the path
33421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33422  # take no chances and rewrite it.
33423  # Note: m4 eats our [], so we need to use [ and ] instead.
33424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33425  if test "x$has_forbidden_chars" != x; then
33426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33430      # Going to short mode and back again did indeed matter. Since short mode is
33431      # case insensitive, let's make it lowercase to improve readability.
33432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33433      # Now convert it back to Unix-stile (cygpath)
33434      input_path=`$CYGPATH -u "$shortmode_path"`
33435      new_path="$input_path"
33436    fi
33437  fi
33438
33439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33440  if test "x$test_cygdrive_prefix" = x; then
33441    # As a simple fix, exclude /usr/bin since it's not a real path.
33442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33444      # a path prefixed by /cygdrive for fixpath to work.
33445      new_path="$CYGWIN_ROOT_PATH$input_path"
33446    fi
33447  fi
33448
33449
33450  if test "x$path" != "x$new_path"; then
33451    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33454  fi
33455
33456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33457
33458  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33459  has_colon=`$ECHO $path | $GREP ^.:`
33460  new_path="$path"
33461  if test "x$has_colon" = x; then
33462    # Not in mixed or Windows style, start by that.
33463    new_path=`cmd //c echo $path`
33464  fi
33465
33466
33467  input_path="$new_path"
33468  # Check if we need to convert this using DOS-style short mode. If the path
33469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33470  # take no chances and rewrite it.
33471  # Note: m4 eats our [], so we need to use [ and ] instead.
33472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33473  if test "x$has_forbidden_chars" != x; then
33474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33476  fi
33477
33478
33479  windows_path="$new_path"
33480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33481    unix_path=`$CYGPATH -u "$windows_path"`
33482    new_path="$unix_path"
33483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33485    new_path="$unix_path"
33486  fi
33487
33488  if test "x$path" != "x$new_path"; then
33489    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33491$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33492  fi
33493
33494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33496
33497  else
33498    # We're on a posix platform. Hooray! :)
33499    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33500    has_space=`$ECHO "$path" | $GREP " "`
33501    if test "x$has_space" != x; then
33502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33503$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33504      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33505    fi
33506
33507    # Use eval to expand a potential ~
33508    eval path="$path"
33509    if test ! -f "$path" && test ! -d "$path"; then
33510      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33511    fi
33512
33513    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33514  fi
33515
33516
33517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33518
33519  # Input might be given as Windows format, start by converting to
33520  # unix format.
33521  path="$POTENTIAL_FREETYPE_LIB_PATH"
33522  new_path=`$CYGPATH -u "$path"`
33523
33524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33527  # "foo.exe" is OK but "foo" is an error.
33528  #
33529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33530  # It is also a way to make sure we got the proper file name for the real test later on.
33531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33532  if test "x$test_shortpath" = x; then
33533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33535    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33536  fi
33537
33538  # Call helper function which possibly converts this using DOS-style short mode.
33539  # If so, the updated path is stored in $new_path.
33540
33541  input_path="$new_path"
33542  # Check if we need to convert this using DOS-style short mode. If the path
33543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33544  # take no chances and rewrite it.
33545  # Note: m4 eats our [], so we need to use [ and ] instead.
33546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33547  if test "x$has_forbidden_chars" != x; then
33548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33552      # Going to short mode and back again did indeed matter. Since short mode is
33553      # case insensitive, let's make it lowercase to improve readability.
33554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33555      # Now convert it back to Unix-stile (cygpath)
33556      input_path=`$CYGPATH -u "$shortmode_path"`
33557      new_path="$input_path"
33558    fi
33559  fi
33560
33561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33562  if test "x$test_cygdrive_prefix" = x; then
33563    # As a simple fix, exclude /usr/bin since it's not a real path.
33564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33566      # a path prefixed by /cygdrive for fixpath to work.
33567      new_path="$CYGWIN_ROOT_PATH$input_path"
33568    fi
33569  fi
33570
33571
33572  if test "x$path" != "x$new_path"; then
33573    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33576  fi
33577
33578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33579
33580  path="$POTENTIAL_FREETYPE_LIB_PATH"
33581  has_colon=`$ECHO $path | $GREP ^.:`
33582  new_path="$path"
33583  if test "x$has_colon" = x; then
33584    # Not in mixed or Windows style, start by that.
33585    new_path=`cmd //c echo $path`
33586  fi
33587
33588
33589  input_path="$new_path"
33590  # Check if we need to convert this using DOS-style short mode. If the path
33591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33592  # take no chances and rewrite it.
33593  # Note: m4 eats our [], so we need to use [ and ] instead.
33594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33595  if test "x$has_forbidden_chars" != x; then
33596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33598  fi
33599
33600
33601  windows_path="$new_path"
33602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33603    unix_path=`$CYGPATH -u "$windows_path"`
33604    new_path="$unix_path"
33605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33607    new_path="$unix_path"
33608  fi
33609
33610  if test "x$path" != "x$new_path"; then
33611    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33613$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33614  fi
33615
33616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33618
33619  else
33620    # We're on a posix platform. Hooray! :)
33621    path="$POTENTIAL_FREETYPE_LIB_PATH"
33622    has_space=`$ECHO "$path" | $GREP " "`
33623    if test "x$has_space" != x; then
33624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33626      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33627    fi
33628
33629    # Use eval to expand a potential ~
33630    eval path="$path"
33631    if test ! -f "$path" && test ! -d "$path"; then
33632      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33633    fi
33634
33635    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33636  fi
33637
33638
33639    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33641$as_echo_n "checking for freetype includes... " >&6; }
33642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33643$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33644    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33646$as_echo_n "checking for freetype libraries... " >&6; }
33647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33648$as_echo "$FREETYPE_LIB_PATH" >&6; }
33649  fi
33650
33651              if test "x$FOUND_FREETYPE" != xyes; then
33652
33653  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33654  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33655  METHOD="well-known location"
33656
33657  # First check if the files exists.
33658  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33659    # We found an arbitrary include file. That's a good sign.
33660    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33661$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33662    FOUND_FREETYPE=yes
33663
33664    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33665    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33666      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33667$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33668      FOUND_FREETYPE=no
33669    else
33670      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33671        # On Windows, we will need both .lib and .dll file.
33672        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33673          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33674$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33675          FOUND_FREETYPE=no
33676        fi
33677      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33678        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33679        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33680      fi
33681    fi
33682  fi
33683
33684  if test "x$FOUND_FREETYPE" = xyes; then
33685
33686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33687
33688  # Input might be given as Windows format, start by converting to
33689  # unix format.
33690  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33691  new_path=`$CYGPATH -u "$path"`
33692
33693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33696  # "foo.exe" is OK but "foo" is an error.
33697  #
33698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33699  # It is also a way to make sure we got the proper file name for the real test later on.
33700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33701  if test "x$test_shortpath" = x; then
33702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33704    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33705  fi
33706
33707  # Call helper function which possibly converts this using DOS-style short mode.
33708  # If so, the updated path is stored in $new_path.
33709
33710  input_path="$new_path"
33711  # Check if we need to convert this using DOS-style short mode. If the path
33712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33713  # take no chances and rewrite it.
33714  # Note: m4 eats our [], so we need to use [ and ] instead.
33715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33716  if test "x$has_forbidden_chars" != x; then
33717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33721      # Going to short mode and back again did indeed matter. Since short mode is
33722      # case insensitive, let's make it lowercase to improve readability.
33723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33724      # Now convert it back to Unix-stile (cygpath)
33725      input_path=`$CYGPATH -u "$shortmode_path"`
33726      new_path="$input_path"
33727    fi
33728  fi
33729
33730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33731  if test "x$test_cygdrive_prefix" = x; then
33732    # As a simple fix, exclude /usr/bin since it's not a real path.
33733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33735      # a path prefixed by /cygdrive for fixpath to work.
33736      new_path="$CYGWIN_ROOT_PATH$input_path"
33737    fi
33738  fi
33739
33740
33741  if test "x$path" != "x$new_path"; then
33742    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33745  fi
33746
33747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33748
33749  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33750  has_colon=`$ECHO $path | $GREP ^.:`
33751  new_path="$path"
33752  if test "x$has_colon" = x; then
33753    # Not in mixed or Windows style, start by that.
33754    new_path=`cmd //c echo $path`
33755  fi
33756
33757
33758  input_path="$new_path"
33759  # Check if we need to convert this using DOS-style short mode. If the path
33760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33761  # take no chances and rewrite it.
33762  # Note: m4 eats our [], so we need to use [ and ] instead.
33763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33764  if test "x$has_forbidden_chars" != x; then
33765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33767  fi
33768
33769
33770  windows_path="$new_path"
33771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33772    unix_path=`$CYGPATH -u "$windows_path"`
33773    new_path="$unix_path"
33774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33776    new_path="$unix_path"
33777  fi
33778
33779  if test "x$path" != "x$new_path"; then
33780    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33783  fi
33784
33785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33787
33788  else
33789    # We're on a posix platform. Hooray! :)
33790    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33791    has_space=`$ECHO "$path" | $GREP " "`
33792    if test "x$has_space" != x; then
33793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33795      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33796    fi
33797
33798    # Use eval to expand a potential ~
33799    eval path="$path"
33800    if test ! -f "$path" && test ! -d "$path"; then
33801      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33802    fi
33803
33804    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33805  fi
33806
33807
33808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33809
33810  # Input might be given as Windows format, start by converting to
33811  # unix format.
33812  path="$POTENTIAL_FREETYPE_LIB_PATH"
33813  new_path=`$CYGPATH -u "$path"`
33814
33815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33818  # "foo.exe" is OK but "foo" is an error.
33819  #
33820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33821  # It is also a way to make sure we got the proper file name for the real test later on.
33822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33823  if test "x$test_shortpath" = x; then
33824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33826    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33827  fi
33828
33829  # Call helper function which possibly converts this using DOS-style short mode.
33830  # If so, the updated path is stored in $new_path.
33831
33832  input_path="$new_path"
33833  # Check if we need to convert this using DOS-style short mode. If the path
33834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33835  # take no chances and rewrite it.
33836  # Note: m4 eats our [], so we need to use [ and ] instead.
33837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33838  if test "x$has_forbidden_chars" != x; then
33839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33843      # Going to short mode and back again did indeed matter. Since short mode is
33844      # case insensitive, let's make it lowercase to improve readability.
33845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33846      # Now convert it back to Unix-stile (cygpath)
33847      input_path=`$CYGPATH -u "$shortmode_path"`
33848      new_path="$input_path"
33849    fi
33850  fi
33851
33852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33853  if test "x$test_cygdrive_prefix" = x; then
33854    # As a simple fix, exclude /usr/bin since it's not a real path.
33855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33857      # a path prefixed by /cygdrive for fixpath to work.
33858      new_path="$CYGWIN_ROOT_PATH$input_path"
33859    fi
33860  fi
33861
33862
33863  if test "x$path" != "x$new_path"; then
33864    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33866$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33867  fi
33868
33869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33870
33871  path="$POTENTIAL_FREETYPE_LIB_PATH"
33872  has_colon=`$ECHO $path | $GREP ^.:`
33873  new_path="$path"
33874  if test "x$has_colon" = x; then
33875    # Not in mixed or Windows style, start by that.
33876    new_path=`cmd //c echo $path`
33877  fi
33878
33879
33880  input_path="$new_path"
33881  # Check if we need to convert this using DOS-style short mode. If the path
33882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33883  # take no chances and rewrite it.
33884  # Note: m4 eats our [], so we need to use [ and ] instead.
33885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33886  if test "x$has_forbidden_chars" != x; then
33887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33889  fi
33890
33891
33892  windows_path="$new_path"
33893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33894    unix_path=`$CYGPATH -u "$windows_path"`
33895    new_path="$unix_path"
33896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33898    new_path="$unix_path"
33899  fi
33900
33901  if test "x$path" != "x$new_path"; then
33902    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33904$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33905  fi
33906
33907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33909
33910  else
33911    # We're on a posix platform. Hooray! :)
33912    path="$POTENTIAL_FREETYPE_LIB_PATH"
33913    has_space=`$ECHO "$path" | $GREP " "`
33914    if test "x$has_space" != x; then
33915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33916$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33917      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33918    fi
33919
33920    # Use eval to expand a potential ~
33921    eval path="$path"
33922    if test ! -f "$path" && test ! -d "$path"; then
33923      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33924    fi
33925
33926    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33927  fi
33928
33929
33930    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33931    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33932$as_echo_n "checking for freetype includes... " >&6; }
33933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33934$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33935    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33937$as_echo_n "checking for freetype libraries... " >&6; }
33938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33939$as_echo "$FREETYPE_LIB_PATH" >&6; }
33940  fi
33941
33942              fi
33943            fi
33944          fi
33945        fi
33946      fi # end check in well-known locations
33947
33948      if test "x$FOUND_FREETYPE" != xyes; then
33949
33950  # Print a helpful message on how to acquire the necessary build dependency.
33951  # freetype is the help tag: freetype, cups, pulse, alsa etc
33952  MISSING_DEPENDENCY=freetype
33953
33954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33955    cygwin_help $MISSING_DEPENDENCY
33956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33957    msys_help $MISSING_DEPENDENCY
33958  else
33959    PKGHANDLER_COMMAND=
33960
33961    case $PKGHANDLER in
33962      apt-get)
33963        apt_help     $MISSING_DEPENDENCY ;;
33964      yum)
33965        yum_help     $MISSING_DEPENDENCY ;;
33966      port)
33967        port_help    $MISSING_DEPENDENCY ;;
33968      pkgutil)
33969        pkgutil_help $MISSING_DEPENDENCY ;;
33970      pkgadd)
33971        pkgadd_help  $MISSING_DEPENDENCY ;;
33972      * )
33973        break ;;
33974    esac
33975
33976    if test "x$PKGHANDLER_COMMAND" != x; then
33977      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33978    fi
33979  fi
33980
33981        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
33982      fi
33983    fi # end user specified settings
33984
33985    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
33986    if test "x$FREETYPE_CFLAGS" = x; then
33987
33988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33989
33990  # Input might be given as Windows format, start by converting to
33991  # unix format.
33992  path="$FREETYPE_INCLUDE_PATH"
33993  new_path=`$CYGPATH -u "$path"`
33994
33995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33998  # "foo.exe" is OK but "foo" is an error.
33999  #
34000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34001  # It is also a way to make sure we got the proper file name for the real test later on.
34002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34003  if test "x$test_shortpath" = x; then
34004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34005$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34006    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34007  fi
34008
34009  # Call helper function which possibly converts this using DOS-style short mode.
34010  # If so, the updated path is stored in $new_path.
34011
34012  input_path="$new_path"
34013  # Check if we need to convert this using DOS-style short mode. If the path
34014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34015  # take no chances and rewrite it.
34016  # Note: m4 eats our [], so we need to use [ and ] instead.
34017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34018  if test "x$has_forbidden_chars" != x; then
34019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34023      # Going to short mode and back again did indeed matter. Since short mode is
34024      # case insensitive, let's make it lowercase to improve readability.
34025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34026      # Now convert it back to Unix-stile (cygpath)
34027      input_path=`$CYGPATH -u "$shortmode_path"`
34028      new_path="$input_path"
34029    fi
34030  fi
34031
34032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34033  if test "x$test_cygdrive_prefix" = x; then
34034    # As a simple fix, exclude /usr/bin since it's not a real path.
34035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34037      # a path prefixed by /cygdrive for fixpath to work.
34038      new_path="$CYGWIN_ROOT_PATH$input_path"
34039    fi
34040  fi
34041
34042
34043  if test "x$path" != "x$new_path"; then
34044    FREETYPE_INCLUDE_PATH="$new_path"
34045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34046$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34047  fi
34048
34049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34050
34051  path="$FREETYPE_INCLUDE_PATH"
34052  has_colon=`$ECHO $path | $GREP ^.:`
34053  new_path="$path"
34054  if test "x$has_colon" = x; then
34055    # Not in mixed or Windows style, start by that.
34056    new_path=`cmd //c echo $path`
34057  fi
34058
34059
34060  input_path="$new_path"
34061  # Check if we need to convert this using DOS-style short mode. If the path
34062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34063  # take no chances and rewrite it.
34064  # Note: m4 eats our [], so we need to use [ and ] instead.
34065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34066  if test "x$has_forbidden_chars" != x; then
34067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34069  fi
34070
34071
34072  windows_path="$new_path"
34073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34074    unix_path=`$CYGPATH -u "$windows_path"`
34075    new_path="$unix_path"
34076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34078    new_path="$unix_path"
34079  fi
34080
34081  if test "x$path" != "x$new_path"; then
34082    FREETYPE_INCLUDE_PATH="$new_path"
34083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34084$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34085  fi
34086
34087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34089
34090  else
34091    # We're on a posix platform. Hooray! :)
34092    path="$FREETYPE_INCLUDE_PATH"
34093    has_space=`$ECHO "$path" | $GREP " "`
34094    if test "x$has_space" != x; then
34095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34096$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34097      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34098    fi
34099
34100    # Use eval to expand a potential ~
34101    eval path="$path"
34102    if test ! -f "$path" && test ! -d "$path"; then
34103      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34104    fi
34105
34106    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34107  fi
34108
34109      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34110        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34111      else
34112        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34113      fi
34114    fi
34115
34116    if test "x$FREETYPE_LIBS" = x; then
34117
34118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34119
34120  # Input might be given as Windows format, start by converting to
34121  # unix format.
34122  path="$FREETYPE_LIB_PATH"
34123  new_path=`$CYGPATH -u "$path"`
34124
34125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34128  # "foo.exe" is OK but "foo" is an error.
34129  #
34130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34131  # It is also a way to make sure we got the proper file name for the real test later on.
34132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34133  if test "x$test_shortpath" = x; then
34134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34135$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34136    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34137  fi
34138
34139  # Call helper function which possibly converts this using DOS-style short mode.
34140  # If so, the updated path is stored in $new_path.
34141
34142  input_path="$new_path"
34143  # Check if we need to convert this using DOS-style short mode. If the path
34144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34145  # take no chances and rewrite it.
34146  # Note: m4 eats our [], so we need to use [ and ] instead.
34147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34148  if test "x$has_forbidden_chars" != x; then
34149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34153      # Going to short mode and back again did indeed matter. Since short mode is
34154      # case insensitive, let's make it lowercase to improve readability.
34155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34156      # Now convert it back to Unix-stile (cygpath)
34157      input_path=`$CYGPATH -u "$shortmode_path"`
34158      new_path="$input_path"
34159    fi
34160  fi
34161
34162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34163  if test "x$test_cygdrive_prefix" = x; then
34164    # As a simple fix, exclude /usr/bin since it's not a real path.
34165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34167      # a path prefixed by /cygdrive for fixpath to work.
34168      new_path="$CYGWIN_ROOT_PATH$input_path"
34169    fi
34170  fi
34171
34172
34173  if test "x$path" != "x$new_path"; then
34174    FREETYPE_LIB_PATH="$new_path"
34175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34176$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34177  fi
34178
34179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34180
34181  path="$FREETYPE_LIB_PATH"
34182  has_colon=`$ECHO $path | $GREP ^.:`
34183  new_path="$path"
34184  if test "x$has_colon" = x; then
34185    # Not in mixed or Windows style, start by that.
34186    new_path=`cmd //c echo $path`
34187  fi
34188
34189
34190  input_path="$new_path"
34191  # Check if we need to convert this using DOS-style short mode. If the path
34192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34193  # take no chances and rewrite it.
34194  # Note: m4 eats our [], so we need to use [ and ] instead.
34195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34196  if test "x$has_forbidden_chars" != x; then
34197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34199  fi
34200
34201
34202  windows_path="$new_path"
34203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34204    unix_path=`$CYGPATH -u "$windows_path"`
34205    new_path="$unix_path"
34206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34208    new_path="$unix_path"
34209  fi
34210
34211  if test "x$path" != "x$new_path"; then
34212    FREETYPE_LIB_PATH="$new_path"
34213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34214$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34215  fi
34216
34217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34219
34220  else
34221    # We're on a posix platform. Hooray! :)
34222    path="$FREETYPE_LIB_PATH"
34223    has_space=`$ECHO "$path" | $GREP " "`
34224    if test "x$has_space" != x; then
34225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34226$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34227      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34228    fi
34229
34230    # Use eval to expand a potential ~
34231    eval path="$path"
34232    if test ! -f "$path" && test ! -d "$path"; then
34233      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34234    fi
34235
34236    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34237  fi
34238
34239      if test "x$OPENJDK_TARGET_OS" = xwindows; then
34240        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34241      else
34242        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34243      fi
34244    fi
34245
34246    # Try to compile it
34247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34248$as_echo_n "checking if we can compile and link with freetype... " >&6; }
34249    ac_ext=cpp
34250ac_cpp='$CXXCPP $CPPFLAGS'
34251ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34252ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34253ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34254
34255    PREV_CXXCFLAGS="$CXXFLAGS"
34256    PREV_LIBS="$LIBS"
34257    PREV_CXX="$CXX"
34258    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34259    LIBS="$LIBS $FREETYPE_LIBS"
34260    CXX="$FIXPATH $CXX"
34261    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34262/* end confdefs.h.  */
34263
34264          #include<ft2build.h>
34265          #include FT_FREETYPE_H
34266          int main () {
34267            FT_Init_FreeType(NULL);
34268            return 0;
34269          }
34270
34271_ACEOF
34272if ac_fn_cxx_try_link "$LINENO"; then :
34273
34274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34275$as_echo "yes" >&6; }
34276
34277else
34278
34279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34280$as_echo "no" >&6; }
34281          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34282$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34283          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34284$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34285
34286
34287  # Print a helpful message on how to acquire the necessary build dependency.
34288  # freetype is the help tag: freetype, cups, pulse, alsa etc
34289  MISSING_DEPENDENCY=freetype
34290
34291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34292    cygwin_help $MISSING_DEPENDENCY
34293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34294    msys_help $MISSING_DEPENDENCY
34295  else
34296    PKGHANDLER_COMMAND=
34297
34298    case $PKGHANDLER in
34299      apt-get)
34300        apt_help     $MISSING_DEPENDENCY ;;
34301      yum)
34302        yum_help     $MISSING_DEPENDENCY ;;
34303      port)
34304        port_help    $MISSING_DEPENDENCY ;;
34305      pkgutil)
34306        pkgutil_help $MISSING_DEPENDENCY ;;
34307      pkgadd)
34308        pkgadd_help  $MISSING_DEPENDENCY ;;
34309      * )
34310        break ;;
34311    esac
34312
34313    if test "x$PKGHANDLER_COMMAND" != x; then
34314      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34315    fi
34316  fi
34317
34318
34319          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34320
34321
34322fi
34323rm -f core conftest.err conftest.$ac_objext \
34324    conftest$ac_exeext conftest.$ac_ext
34325    CXXCFLAGS="$PREV_CXXFLAGS"
34326    LIBS="$PREV_LIBS"
34327    CXX="$PREV_CXX"
34328    ac_ext=cpp
34329ac_cpp='$CXXCPP $CPPFLAGS'
34330ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34331ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34332ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34333
34334
34335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34336$as_echo_n "checking if we should bundle freetype... " >&6; }
34337    if test "x$BUNDLE_FREETYPE" = xyes; then
34338      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34339    fi
34340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34341$as_echo "$BUNDLE_FREETYPE" >&6; }
34342
34343  fi # end freetype needed
34344
34345
34346
34347
34348
34349
34350
34351  ###############################################################################
34352  #
34353  # Check for alsa headers and libraries. Used on Linux/GNU systems.
34354  #
34355
34356# Check whether --with-alsa was given.
34357if test "${with_alsa+set}" = set; then :
34358  withval=$with_alsa;
34359fi
34360
34361
34362# Check whether --with-alsa-include was given.
34363if test "${with_alsa_include+set}" = set; then :
34364  withval=$with_alsa_include;
34365fi
34366
34367
34368# Check whether --with-alsa-lib was given.
34369if test "${with_alsa_lib+set}" = set; then :
34370  withval=$with_alsa_lib;
34371fi
34372
34373
34374  if test "x$ALSA_NOT_NEEDED" = xyes; then
34375    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34376      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34377$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34378    fi
34379    ALSA_CFLAGS=
34380    ALSA_LIBS=
34381  else
34382    ALSA_FOUND=no
34383
34384    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34385      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34386    fi
34387
34388    if test "x${with_alsa}" != x; then
34389      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34390      ALSA_CFLAGS="-I${with_alsa}/include"
34391      ALSA_FOUND=yes
34392    fi
34393    if test "x${with_alsa_include}" != x; then
34394      ALSA_CFLAGS="-I${with_alsa_include}"
34395      ALSA_FOUND=yes
34396    fi
34397    if test "x${with_alsa_lib}" != x; then
34398      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34399      ALSA_FOUND=yes
34400    fi
34401    if test "x$ALSA_FOUND" = xno; then
34402
34403
34404  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34405    # Source the builddeps file again, to make sure it uses the latest variables!
34406    . $builddepsfile
34407    # Look for a target and build machine specific resource!
34408    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34409    if test "x$resource" = x; then
34410      # Ok, lets instead look for a target specific resource
34411      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34412    fi
34413    if test "x$resource" = x; then
34414      # Ok, lets instead look for a build specific resource
34415      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34416    fi
34417    if test "x$resource" = x; then
34418      # Ok, lets instead look for a generic resource
34419      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34420      resource=${builddep_alsa}
34421    fi
34422    if test "x$resource" != x; then
34423      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34424$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34425      # If the resource in the builddeps.conf file is an existing directory,
34426      # for example /java/linux/cups
34427      if test -d ${resource}; then
34428        depdir=${resource}
34429      else
34430
34431  # alsa is for example mymodule
34432  # $resource is for example libs/general/libmymod_1_2_3.zip
34433  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34434  # $with_builddeps_dir is for example /localhome/builddeps
34435  # depdir is the name of the variable into which we store the depdir, eg MYMOD
34436  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34437  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34438  filename=`basename $resource`
34439  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34440  filebase=${filename%%.*}
34441  extension=${filename#*.}
34442  installdir=$with_builddeps_dir/$filebase
34443  if test ! -f $installdir/$filename.unpacked; then
34444    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34445$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34446    if test ! -d $installdir; then
34447      mkdir -p $installdir
34448    fi
34449    if test ! -d $installdir; then
34450      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34451    fi
34452    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34453    touch $tmpfile
34454    if test ! -f $tmpfile; then
34455      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34456    fi
34457
34458  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34459  # $tmpfile is the local file name for the downloaded file.
34460  VALID_TOOL=no
34461  if test "x$BDEPS_FTP" = xwget; then
34462    VALID_TOOL=yes
34463    wget -O $tmpfile $with_builddeps_server/$resource
34464  fi
34465  if test "x$BDEPS_FTP" = xlftp; then
34466    VALID_TOOL=yes
34467    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34468  fi
34469  if test "x$BDEPS_FTP" = xftp; then
34470    VALID_TOOL=yes
34471    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34472    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34473    FTPUSERPWD=${FTPSERVER%%@*}
34474    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34475      FTPUSER=${userpwd%%:*}
34476      FTPPWD=${userpwd#*@}
34477      FTPSERVER=${FTPSERVER#*@}
34478    else
34479      FTPUSER=ftp
34480      FTPPWD=ftp
34481    fi
34482    # the "pass" command does not work on some
34483    # ftp clients (read ftp.exe) but if it works,
34484    # passive mode is better!
34485    ( \
34486        echo "user $FTPUSER $FTPPWD"        ; \
34487        echo "pass"                         ; \
34488        echo "bin"                          ; \
34489        echo "get $FTPPATH $tmpfile"              ; \
34490    ) | ftp -in $FTPSERVER
34491  fi
34492  if test "x$VALID_TOOL" != xyes; then
34493    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34494  fi
34495
34496    mv $tmpfile $installdir/$filename
34497    if test ! -s $installdir/$filename; then
34498      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34499    fi
34500    case "$extension" in
34501      zip)  echo "Unzipping $installdir/$filename..."
34502        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34503        ;;
34504      tar.gz) echo "Untaring $installdir/$filename..."
34505        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34506        ;;
34507      tgz) echo "Untaring $installdir/$filename..."
34508        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34509        ;;
34510      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34511        ;;
34512    esac
34513  fi
34514  if test -f $installdir/$filename.unpacked; then
34515    depdir=$installdir
34516  fi
34517
34518      fi
34519      # Source the builddeps file again, because in the previous command, the depdir
34520      # was updated to point at the current build dependency install directory.
34521      . $builddepsfile
34522      # Now extract variables from the builddeps.conf files.
34523      theroot=${builddep_alsa_ROOT}
34524      thecflags=${builddep_alsa_CFLAGS}
34525      thelibs=${builddep_alsa_LIBS}
34526      if test "x$depdir" = x; then
34527        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34528      fi
34529      ALSA=$depdir
34530      if test "x$theroot" != x; then
34531        ALSA="$theroot"
34532      fi
34533      if test "x$thecflags" != x; then
34534        ALSA_CFLAGS="$thecflags"
34535      fi
34536      if test "x$thelibs" != x; then
34537        ALSA_LIBS="$thelibs"
34538      fi
34539      ALSA_FOUND=yes
34540      else ALSA_FOUND=no
34541
34542    fi
34543    else ALSA_FOUND=no
34544
34545  fi
34546
34547    fi
34548    if test "x$ALSA_FOUND" = xno; then
34549
34550pkg_failed=no
34551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34552$as_echo_n "checking for ALSA... " >&6; }
34553
34554if test -n "$ALSA_CFLAGS"; then
34555    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34556 elif test -n "$PKG_CONFIG"; then
34557    if test -n "$PKG_CONFIG" && \
34558    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34559  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34560  ac_status=$?
34561  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34562  test $ac_status = 0; }; then
34563  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34564else
34565  pkg_failed=yes
34566fi
34567 else
34568    pkg_failed=untried
34569fi
34570if test -n "$ALSA_LIBS"; then
34571    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34572 elif test -n "$PKG_CONFIG"; then
34573    if test -n "$PKG_CONFIG" && \
34574    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34575  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34576  ac_status=$?
34577  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34578  test $ac_status = 0; }; then
34579  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34580else
34581  pkg_failed=yes
34582fi
34583 else
34584    pkg_failed=untried
34585fi
34586
34587
34588
34589if test $pkg_failed = yes; then
34590
34591if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34592        _pkg_short_errors_supported=yes
34593else
34594        _pkg_short_errors_supported=no
34595fi
34596        if test $_pkg_short_errors_supported = yes; then
34597	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34598        else
34599	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34600        fi
34601	# Put the nasty error message in config.log where it belongs
34602	echo "$ALSA_PKG_ERRORS" >&5
34603
34604	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34605$as_echo "no" >&6; }
34606                ALSA_FOUND=no
34607elif test $pkg_failed = untried; then
34608	ALSA_FOUND=no
34609else
34610	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34611	ALSA_LIBS=$pkg_cv_ALSA_LIBS
34612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34613$as_echo "yes" >&6; }
34614	ALSA_FOUND=yes
34615fi
34616    fi
34617    if test "x$ALSA_FOUND" = xno; then
34618      for ac_header in alsa/asoundlib.h
34619do :
34620  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34621if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34622  cat >>confdefs.h <<_ACEOF
34623#define HAVE_ALSA_ASOUNDLIB_H 1
34624_ACEOF
34625
34626            ALSA_FOUND=yes
34627            ALSA_CFLAGS=-Iignoreme
34628            ALSA_LIBS=-lasound
34629            DEFAULT_ALSA=yes
34630
34631else
34632  ALSA_FOUND=no
34633fi
34634
34635done
34636
34637    fi
34638    if test "x$ALSA_FOUND" = xno; then
34639
34640  # Print a helpful message on how to acquire the necessary build dependency.
34641  # alsa is the help tag: freetype, cups, pulse, alsa etc
34642  MISSING_DEPENDENCY=alsa
34643
34644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34645    cygwin_help $MISSING_DEPENDENCY
34646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34647    msys_help $MISSING_DEPENDENCY
34648  else
34649    PKGHANDLER_COMMAND=
34650
34651    case $PKGHANDLER in
34652      apt-get)
34653        apt_help     $MISSING_DEPENDENCY ;;
34654      yum)
34655        yum_help     $MISSING_DEPENDENCY ;;
34656      port)
34657        port_help    $MISSING_DEPENDENCY ;;
34658      pkgutil)
34659        pkgutil_help $MISSING_DEPENDENCY ;;
34660      pkgadd)
34661        pkgadd_help  $MISSING_DEPENDENCY ;;
34662      * )
34663        break ;;
34664    esac
34665
34666    if test "x$PKGHANDLER_COMMAND" != x; then
34667      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34668    fi
34669  fi
34670
34671      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34672    fi
34673  fi
34674
34675
34676
34677
34678
34679
34680  ###############################################################################
34681  #
34682  # Check for the jpeg library
34683  #
34684
34685  USE_EXTERNAL_LIBJPEG=true
34686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34687$as_echo_n "checking for main in -ljpeg... " >&6; }
34688if ${ac_cv_lib_jpeg_main+:} false; then :
34689  $as_echo_n "(cached) " >&6
34690else
34691  ac_check_lib_save_LIBS=$LIBS
34692LIBS="-ljpeg  $LIBS"
34693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34694/* end confdefs.h.  */
34695
34696
34697int
34698main ()
34699{
34700return main ();
34701  ;
34702  return 0;
34703}
34704_ACEOF
34705if ac_fn_cxx_try_link "$LINENO"; then :
34706  ac_cv_lib_jpeg_main=yes
34707else
34708  ac_cv_lib_jpeg_main=no
34709fi
34710rm -f core conftest.err conftest.$ac_objext \
34711    conftest$ac_exeext conftest.$ac_ext
34712LIBS=$ac_check_lib_save_LIBS
34713fi
34714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34715$as_echo "$ac_cv_lib_jpeg_main" >&6; }
34716if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34717  cat >>confdefs.h <<_ACEOF
34718#define HAVE_LIBJPEG 1
34719_ACEOF
34720
34721  LIBS="-ljpeg $LIBS"
34722
34723else
34724   USE_EXTERNAL_LIBJPEG=false
34725      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34726$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34727
34728fi
34729
34730
34731
34732  ###############################################################################
34733  #
34734  # Check for the gif library
34735  #
34736
34737
34738# Check whether --with-giflib was given.
34739if test "${with_giflib+set}" = set; then :
34740  withval=$with_giflib;
34741fi
34742
34743
34744
34745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34746$as_echo_n "checking for which giflib to use... " >&6; }
34747
34748  # default is bundled
34749  DEFAULT_GIFLIB=bundled
34750
34751  #
34752  # if user didn't specify, use DEFAULT_GIFLIB
34753  #
34754  if test "x${with_giflib}" = "x"; then
34755    with_giflib=${DEFAULT_GIFLIB}
34756  fi
34757
34758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34759$as_echo "${with_giflib}" >&6; }
34760
34761  if test "x${with_giflib}" = "xbundled"; then
34762    USE_EXTERNAL_LIBGIF=false
34763  elif test "x${with_giflib}" = "xsystem"; then
34764    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34765if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34766
34767else
34768   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34769fi
34770
34771
34772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34773$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34774if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34775  $as_echo_n "(cached) " >&6
34776else
34777  ac_check_lib_save_LIBS=$LIBS
34778LIBS="-lgif  $LIBS"
34779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34780/* end confdefs.h.  */
34781
34782/* Override any GCC internal prototype to avoid an error.
34783   Use char because int might match the return type of a GCC
34784   builtin and then its argument prototype would still apply.  */
34785#ifdef __cplusplus
34786extern "C"
34787#endif
34788char DGifGetCode ();
34789int
34790main ()
34791{
34792return DGifGetCode ();
34793  ;
34794  return 0;
34795}
34796_ACEOF
34797if ac_fn_cxx_try_link "$LINENO"; then :
34798  ac_cv_lib_gif_DGifGetCode=yes
34799else
34800  ac_cv_lib_gif_DGifGetCode=no
34801fi
34802rm -f core conftest.err conftest.$ac_objext \
34803    conftest$ac_exeext conftest.$ac_ext
34804LIBS=$ac_check_lib_save_LIBS
34805fi
34806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
34807$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
34808if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
34809  cat >>confdefs.h <<_ACEOF
34810#define HAVE_LIBGIF 1
34811_ACEOF
34812
34813  LIBS="-lgif $LIBS"
34814
34815else
34816   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
34817fi
34818
34819
34820    USE_EXTERNAL_LIBGIF=true
34821  else
34822    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
34823  fi
34824
34825
34826  ###############################################################################
34827  #
34828  # Check for the zlib library
34829  #
34830
34831
34832# Check whether --with-zlib was given.
34833if test "${with_zlib+set}" = set; then :
34834  withval=$with_zlib;
34835fi
34836
34837
34838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
34839$as_echo_n "checking for compress in -lz... " >&6; }
34840if ${ac_cv_lib_z_compress+:} false; then :
34841  $as_echo_n "(cached) " >&6
34842else
34843  ac_check_lib_save_LIBS=$LIBS
34844LIBS="-lz  $LIBS"
34845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34846/* end confdefs.h.  */
34847
34848/* Override any GCC internal prototype to avoid an error.
34849   Use char because int might match the return type of a GCC
34850   builtin and then its argument prototype would still apply.  */
34851#ifdef __cplusplus
34852extern "C"
34853#endif
34854char compress ();
34855int
34856main ()
34857{
34858return compress ();
34859  ;
34860  return 0;
34861}
34862_ACEOF
34863if ac_fn_cxx_try_link "$LINENO"; then :
34864  ac_cv_lib_z_compress=yes
34865else
34866  ac_cv_lib_z_compress=no
34867fi
34868rm -f core conftest.err conftest.$ac_objext \
34869    conftest$ac_exeext conftest.$ac_ext
34870LIBS=$ac_check_lib_save_LIBS
34871fi
34872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
34873$as_echo "$ac_cv_lib_z_compress" >&6; }
34874if test "x$ac_cv_lib_z_compress" = xyes; then :
34875   ZLIB_FOUND=yes
34876else
34877   ZLIB_FOUND=no
34878fi
34879
34880
34881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
34882$as_echo_n "checking for which zlib to use... " >&6; }
34883
34884  DEFAULT_ZLIB=bundled
34885  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
34886    #
34887    # On macosx default is system...on others default is
34888    #
34889    DEFAULT_ZLIB=system
34890  fi
34891
34892  if test "x${ZLIB_FOUND}" != "xyes"; then
34893    #
34894    # If we don't find any system...set default to bundled
34895    #
34896    DEFAULT_ZLIB=bundled
34897  fi
34898
34899  #
34900  # If user didn't specify, use DEFAULT_ZLIB
34901  #
34902  if test "x${with_zlib}" = "x"; then
34903    with_zlib=${DEFAULT_ZLIB}
34904  fi
34905
34906  if test "x${with_zlib}" = "xbundled"; then
34907    USE_EXTERNAL_LIBZ=false
34908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
34909$as_echo "bundled" >&6; }
34910  elif test "x${with_zlib}" = "xsystem"; then
34911    if test "x${ZLIB_FOUND}" = "xyes"; then
34912      USE_EXTERNAL_LIBZ=true
34913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
34914$as_echo "system" >&6; }
34915    else
34916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
34917$as_echo "system not found" >&6; }
34918      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
34919    fi
34920  else
34921    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
34922  fi
34923
34924
34925
34926  ###############################################################################
34927  LIBZIP_CAN_USE_MMAP=true
34928
34929
34930
34931  ###############################################################################
34932  #
34933  # Check if altzone exists in time.h
34934  #
34935
34936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34937/* end confdefs.h.  */
34938#include <time.h>
34939int
34940main ()
34941{
34942return (int)altzone;
34943  ;
34944  return 0;
34945}
34946_ACEOF
34947if ac_fn_cxx_try_link "$LINENO"; then :
34948  has_altzone=yes
34949else
34950  has_altzone=no
34951fi
34952rm -f core conftest.err conftest.$ac_objext \
34953    conftest$ac_exeext conftest.$ac_ext
34954  if test "x$has_altzone" = xyes; then
34955
34956$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
34957
34958  fi
34959
34960  ###############################################################################
34961  #
34962  # Check the maths library
34963  #
34964
34965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
34966$as_echo_n "checking for cos in -lm... " >&6; }
34967if ${ac_cv_lib_m_cos+:} false; then :
34968  $as_echo_n "(cached) " >&6
34969else
34970  ac_check_lib_save_LIBS=$LIBS
34971LIBS="-lm  $LIBS"
34972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34973/* end confdefs.h.  */
34974
34975/* Override any GCC internal prototype to avoid an error.
34976   Use char because int might match the return type of a GCC
34977   builtin and then its argument prototype would still apply.  */
34978#ifdef __cplusplus
34979extern "C"
34980#endif
34981char cos ();
34982int
34983main ()
34984{
34985return cos ();
34986  ;
34987  return 0;
34988}
34989_ACEOF
34990if ac_fn_cxx_try_link "$LINENO"; then :
34991  ac_cv_lib_m_cos=yes
34992else
34993  ac_cv_lib_m_cos=no
34994fi
34995rm -f core conftest.err conftest.$ac_objext \
34996    conftest$ac_exeext conftest.$ac_ext
34997LIBS=$ac_check_lib_save_LIBS
34998fi
34999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35000$as_echo "$ac_cv_lib_m_cos" >&6; }
35001if test "x$ac_cv_lib_m_cos" = xyes; then :
35002  cat >>confdefs.h <<_ACEOF
35003#define HAVE_LIBM 1
35004_ACEOF
35005
35006  LIBS="-lm $LIBS"
35007
35008else
35009
35010        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35011$as_echo "$as_me: Maths library was not found" >&6;}
35012
35013
35014fi
35015
35016
35017
35018  ###############################################################################
35019  #
35020  # Check for libdl.so
35021
35022  save_LIBS="$LIBS"
35023  LIBS=""
35024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35025$as_echo_n "checking for dlopen in -ldl... " >&6; }
35026if ${ac_cv_lib_dl_dlopen+:} false; then :
35027  $as_echo_n "(cached) " >&6
35028else
35029  ac_check_lib_save_LIBS=$LIBS
35030LIBS="-ldl  $LIBS"
35031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35032/* end confdefs.h.  */
35033
35034/* Override any GCC internal prototype to avoid an error.
35035   Use char because int might match the return type of a GCC
35036   builtin and then its argument prototype would still apply.  */
35037#ifdef __cplusplus
35038extern "C"
35039#endif
35040char dlopen ();
35041int
35042main ()
35043{
35044return dlopen ();
35045  ;
35046  return 0;
35047}
35048_ACEOF
35049if ac_fn_cxx_try_link "$LINENO"; then :
35050  ac_cv_lib_dl_dlopen=yes
35051else
35052  ac_cv_lib_dl_dlopen=no
35053fi
35054rm -f core conftest.err conftest.$ac_objext \
35055    conftest$ac_exeext conftest.$ac_ext
35056LIBS=$ac_check_lib_save_LIBS
35057fi
35058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35059$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35060if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35061  cat >>confdefs.h <<_ACEOF
35062#define HAVE_LIBDL 1
35063_ACEOF
35064
35065  LIBS="-ldl $LIBS"
35066
35067fi
35068
35069  LIBDL="$LIBS"
35070
35071  LIBS="$save_LIBS"
35072
35073
35074  ###############################################################################
35075  #
35076  # statically link libstdc++ before C++ ABI is stablized on Linux unless
35077  # dynamic build is configured on command line.
35078  #
35079
35080# Check whether --with-stdc++lib was given.
35081if test "${with_stdc__lib+set}" = set; then :
35082  withval=$with_stdc__lib;
35083        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35084                && test "x$with_stdc__lib" != xdefault; then
35085          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35086        fi
35087
35088else
35089  with_stdc__lib=default
35090
35091fi
35092
35093
35094  if test "x$OPENJDK_TARGET_OS" = xlinux; then
35095    # Test if -lstdc++ works.
35096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35097$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35098    ac_ext=cpp
35099ac_cpp='$CXXCPP $CPPFLAGS'
35100ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35101ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35102ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35103
35104    OLD_CXXFLAGS="$CXXFLAGS"
35105    CXXFLAGS="$CXXFLAGS -lstdc++"
35106    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35107/* end confdefs.h.  */
35108
35109int
35110main ()
35111{
35112return 0;
35113  ;
35114  return 0;
35115}
35116_ACEOF
35117if ac_fn_cxx_try_link "$LINENO"; then :
35118  has_dynamic_libstdcxx=yes
35119else
35120  has_dynamic_libstdcxx=no
35121fi
35122rm -f core conftest.err conftest.$ac_objext \
35123    conftest$ac_exeext conftest.$ac_ext
35124    CXXFLAGS="$OLD_CXXFLAGS"
35125    ac_ext=cpp
35126ac_cpp='$CXXCPP $CPPFLAGS'
35127ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35128ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35129ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35130
35131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35132$as_echo "$has_dynamic_libstdcxx" >&6; }
35133
35134    # Test if stdc++ can be linked statically.
35135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35136$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35137    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35138    ac_ext=cpp
35139ac_cpp='$CXXCPP $CPPFLAGS'
35140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35143
35144    OLD_LIBS="$LIBS"
35145    OLD_CXX="$CXX"
35146    LIBS="$STATIC_STDCXX_FLAGS"
35147    CXX="$CC"
35148    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35149/* end confdefs.h.  */
35150
35151int
35152main ()
35153{
35154return 0;
35155  ;
35156  return 0;
35157}
35158_ACEOF
35159if ac_fn_cxx_try_link "$LINENO"; then :
35160  has_static_libstdcxx=yes
35161else
35162  has_static_libstdcxx=no
35163fi
35164rm -f core conftest.err conftest.$ac_objext \
35165    conftest$ac_exeext conftest.$ac_ext
35166    LIBS="$OLD_LIBS"
35167    CXX="$OLD_CXX"
35168    ac_ext=cpp
35169ac_cpp='$CXXCPP $CPPFLAGS'
35170ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35171ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35172ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35173
35174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35175$as_echo "$has_static_libstdcxx" >&6; }
35176
35177    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35178      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35179    fi
35180
35181    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35182      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35183    fi
35184
35185    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35186      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35187    fi
35188
35189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35190$as_echo_n "checking how to link with libstdc++... " >&6; }
35191    # If dynamic was requested, it's available since it would fail above otherwise.
35192    # If dynamic wasn't requested, go with static unless it isn't available.
35193    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35194      LIBCXX="$LIBCXX -lstdc++"
35195      LDCXX="$CXX"
35196      STATIC_CXX_SETTING="STATIC_CXX=false"
35197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35198$as_echo "dynamic" >&6; }
35199    else
35200      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35201      LDCXX="$CC"
35202      STATIC_CXX_SETTING="STATIC_CXX=true"
35203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35204$as_echo "static" >&6; }
35205    fi
35206  fi
35207
35208
35209  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35210    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35211
35212pkg_failed=no
35213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35214$as_echo_n "checking for LIBFFI... " >&6; }
35215
35216if test -n "$LIBFFI_CFLAGS"; then
35217    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35218 elif test -n "$PKG_CONFIG"; then
35219    if test -n "$PKG_CONFIG" && \
35220    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35221  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35222  ac_status=$?
35223  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35224  test $ac_status = 0; }; then
35225  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35226else
35227  pkg_failed=yes
35228fi
35229 else
35230    pkg_failed=untried
35231fi
35232if test -n "$LIBFFI_LIBS"; then
35233    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35234 elif test -n "$PKG_CONFIG"; then
35235    if test -n "$PKG_CONFIG" && \
35236    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35237  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35238  ac_status=$?
35239  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35240  test $ac_status = 0; }; then
35241  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35242else
35243  pkg_failed=yes
35244fi
35245 else
35246    pkg_failed=untried
35247fi
35248
35249
35250
35251if test $pkg_failed = yes; then
35252
35253if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35254        _pkg_short_errors_supported=yes
35255else
35256        _pkg_short_errors_supported=no
35257fi
35258        if test $_pkg_short_errors_supported = yes; then
35259	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35260        else
35261	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35262        fi
35263	# Put the nasty error message in config.log where it belongs
35264	echo "$LIBFFI_PKG_ERRORS" >&5
35265
35266	as_fn_error $? "Package requirements (libffi) were not met:
35267
35268$LIBFFI_PKG_ERRORS
35269
35270Consider adjusting the PKG_CONFIG_PATH environment variable if you
35271installed software in a non-standard prefix.
35272
35273Alternatively, you may set the environment variables LIBFFI_CFLAGS
35274and LIBFFI_LIBS to avoid the need to call pkg-config.
35275See the pkg-config man page for more details.
35276" "$LINENO" 5
35277elif test $pkg_failed = untried; then
35278	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35279$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35280as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35281is in your PATH or set the PKG_CONFIG environment variable to the full
35282path to pkg-config.
35283
35284Alternatively, you may set the environment variables LIBFFI_CFLAGS
35285and LIBFFI_LIBS to avoid the need to call pkg-config.
35286See the pkg-config man page for more details.
35287
35288To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35289See \`config.log' for more details" "$LINENO" 5; }
35290else
35291	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35292	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35294$as_echo "yes" >&6; }
35295	:
35296fi
35297
35298  fi
35299
35300  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35301    # Extract the first word of "llvm-config", so it can be a program name with args.
35302set dummy llvm-config; ac_word=$2
35303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35304$as_echo_n "checking for $ac_word... " >&6; }
35305if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35306  $as_echo_n "(cached) " >&6
35307else
35308  if test -n "$LLVM_CONFIG"; then
35309  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35310else
35311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35312for as_dir in $PATH
35313do
35314  IFS=$as_save_IFS
35315  test -z "$as_dir" && as_dir=.
35316    for ac_exec_ext in '' $ac_executable_extensions; do
35317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35318    ac_cv_prog_LLVM_CONFIG="llvm-config"
35319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35320    break 2
35321  fi
35322done
35323  done
35324IFS=$as_save_IFS
35325
35326fi
35327fi
35328LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35329if test -n "$LLVM_CONFIG"; then
35330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35331$as_echo "$LLVM_CONFIG" >&6; }
35332else
35333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35334$as_echo "no" >&6; }
35335fi
35336
35337
35338
35339    if test "x$LLVM_CONFIG" != xllvm-config; then
35340      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35341    fi
35342
35343    llvm_components="jit mcjit engine nativecodegen native"
35344    unset LLVM_CFLAGS
35345    for flag in $("$LLVM_CONFIG" --cxxflags); do
35346      if echo "${flag}" | grep -q '^-[ID]'; then
35347        if test "${flag}" != "-D_DEBUG" ; then
35348          if test "${LLVM_CFLAGS}" != "" ; then
35349            LLVM_CFLAGS="${LLVM_CFLAGS} "
35350          fi
35351          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35352        fi
35353      fi
35354    done
35355    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35356    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35357
35358    unset LLVM_LDFLAGS
35359    for flag in $("${LLVM_CONFIG}" --ldflags); do
35360      if echo "${flag}" | grep -q '^-L'; then
35361        if test "${LLVM_LDFLAGS}" != ""; then
35362          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35363        fi
35364        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35365      fi
35366    done
35367
35368    unset LLVM_LIBS
35369    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35370      if echo "${flag}" | grep -q '^-l'; then
35371        if test "${LLVM_LIBS}" != ""; then
35372          LLVM_LIBS="${LLVM_LIBS} "
35373        fi
35374        LLVM_LIBS="${LLVM_LIBS}${flag}"
35375      fi
35376    done
35377
35378
35379
35380
35381  fi
35382
35383  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35384  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35385    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35386  fi
35387
35388  # TODO better (platform agnostic) test
35389  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35390    LIBCXX="-lstdc++"
35391  fi
35392
35393
35394
35395
35396
35397###############################################################################
35398#
35399# We need to do some final tweaking, when everything else is done.
35400#
35401###############################################################################
35402
35403
35404  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35405
35406
35407  # The name of the Service Agent jar.
35408  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35409  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35410    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35411  fi
35412
35413
35414
35415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35416$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35417
35418    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35419      ENABLE_INTREE_EC=yes
35420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35421$as_echo "yes" >&6; }
35422    else
35423      ENABLE_INTREE_EC=no
35424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35425$as_echo "no" >&6; }
35426    fi
35427
35428
35429
35430
35431###############################################################################
35432#
35433# Configure parts of the build that only affect the build performance,
35434# not the result.
35435#
35436###############################################################################
35437
35438
35439  # How many cores do we have on this build system?
35440
35441# Check whether --with-num-cores was given.
35442if test "${with_num_cores+set}" = set; then :
35443  withval=$with_num_cores;
35444fi
35445
35446  if test "x$with_num_cores" = x; then
35447    # The number of cores were not specified, try to probe them.
35448
35449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35450$as_echo_n "checking for number of cores... " >&6; }
35451  NUM_CORES=1
35452  FOUND_CORES=no
35453
35454  if test -f /proc/cpuinfo; then
35455    # Looks like a Linux (or cygwin) system
35456    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35457    FOUND_CORES=yes
35458  elif test -x /usr/sbin/psrinfo; then
35459    # Looks like a Solaris system
35460    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35461    FOUND_CORES=yes
35462  elif test -x /usr/sbin/system_profiler; then
35463    # Looks like a MacOSX system
35464    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35465    FOUND_CORES=yes
35466  elif test -n "$NUMBER_OF_PROCESSORS"; then
35467    # On windows, look in the env
35468    NUM_CORES=$NUMBER_OF_PROCESSORS
35469    FOUND_CORES=yes
35470  fi
35471
35472  if test "x$FOUND_CORES" = xyes; then
35473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35474$as_echo "$NUM_CORES" >&6; }
35475  else
35476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35477$as_echo "could not detect number of cores, defaulting to 1" >&6; }
35478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35479$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35480  fi
35481
35482  else
35483    NUM_CORES=$with_num_cores
35484  fi
35485
35486
35487
35488  # How much memory do we have on this build system?
35489
35490# Check whether --with-memory-size was given.
35491if test "${with_memory_size+set}" = set; then :
35492  withval=$with_memory_size;
35493fi
35494
35495  if test "x$with_memory_size" = x; then
35496    # The memory size was not specified, try to probe it.
35497
35498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35499$as_echo_n "checking for memory size... " >&6; }
35500  # Default to 1024 MB
35501  MEMORY_SIZE=1024
35502  FOUND_MEM=no
35503
35504  if test -f /proc/meminfo; then
35505    # Looks like a Linux (or cygwin) system
35506    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35507    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35508    FOUND_MEM=yes
35509  elif test -x /usr/sbin/prtconf; then
35510    # Looks like a Solaris system
35511    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
35512    FOUND_MEM=yes
35513  elif test -x /usr/sbin/system_profiler; then
35514    # Looks like a MacOSX system
35515    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35516    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35517    FOUND_MEM=yes
35518  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35519    # Windows, but without cygwin
35520    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35521    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35522    FOUND_MEM=yes
35523  fi
35524
35525  if test "x$FOUND_MEM" = xyes; then
35526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35527$as_echo "$MEMORY_SIZE MB" >&6; }
35528  else
35529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35530$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35531    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35532$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35533  fi
35534
35535  else
35536    MEMORY_SIZE=$with_memory_size
35537  fi
35538
35539
35540
35541  # Provide a decent default number of parallel jobs for make depending on
35542  # number of cores, amount of memory and machine architecture.
35543
35544# Check whether --with-jobs was given.
35545if test "${with_jobs+set}" = set; then :
35546  withval=$with_jobs;
35547fi
35548
35549  if test "x$with_jobs" = x; then
35550    # Number of jobs was not specified, calculate.
35551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35552$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35553    # Approximate memory in GB, rounding up a bit.
35554    memory_gb=`expr $MEMORY_SIZE / 1100`
35555    # Pick the lowest of memory in gb and number of cores.
35556    if test "$memory_gb" -lt "$NUM_CORES"; then
35557      JOBS="$memory_gb"
35558    else
35559      JOBS="$NUM_CORES"
35560      # On bigger machines, leave some room for other processes to run
35561      if test "$JOBS" -gt "4"; then
35562        JOBS=`expr $JOBS '*' 90 / 100`
35563      fi
35564    fi
35565    # Cap number of jobs to 16
35566    if test "$JOBS" -gt "16"; then
35567      JOBS=16
35568    fi
35569    if test "$JOBS" -eq "0"; then
35570      JOBS=1
35571    fi
35572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35573$as_echo "$JOBS" >&6; }
35574  else
35575    JOBS=$with_jobs
35576  fi
35577
35578
35579
35580# Setup smart javac (after cores and memory have been setup)
35581
35582
35583# Check whether --with-sjavac-server-java was given.
35584if test "${with_sjavac_server_java+set}" = set; then :
35585  withval=$with_sjavac_server_java;
35586fi
35587
35588
35589  if test "x$with_sjavac_server_java" != x; then
35590    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35591    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35592    if test "x$FOUND_VERSION" = x; then
35593      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35594    fi
35595  else
35596    SJAVAC_SERVER_JAVA=""
35597    # Hotspot specific options.
35598
35599  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35600  $ECHO "Command: $JAVA -verbosegc -version" >&5
35601  OUTPUT=`$JAVA -verbosegc -version 2>&1`
35602  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35603  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35604  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35605    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35606    JVM_ARG_OK=true
35607  else
35608    $ECHO "Arg failed:" >&5
35609    $ECHO "$OUTPUT" >&5
35610    JVM_ARG_OK=false
35611  fi
35612
35613    # JRockit specific options.
35614
35615  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35616  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35617  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35618  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35619  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35620  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35621    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35622    JVM_ARG_OK=true
35623  else
35624    $ECHO "Arg failed:" >&5
35625    $ECHO "$OUTPUT" >&5
35626    JVM_ARG_OK=false
35627  fi
35628
35629    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35630  fi
35631
35632
35633  if test "$MEMORY_SIZE" -gt "2500"; then
35634
35635  $ECHO "Check if jvm arg is ok: -d64" >&5
35636  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35637  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35638  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35639  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35640  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35641    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35642    JVM_ARG_OK=true
35643  else
35644    $ECHO "Arg failed:" >&5
35645    $ECHO "$OUTPUT" >&5
35646    JVM_ARG_OK=false
35647  fi
35648
35649    if test "$JVM_ARG_OK" = true; then
35650      JVM_64BIT=true
35651      JVM_ARG_OK=false
35652    fi
35653  fi
35654
35655  if test "$JVM_64BIT" = true; then
35656    if test "$MEMORY_SIZE" -gt "17000"; then
35657
35658  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35659  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35660  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35661  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35662  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35663  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35664    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35665    JVM_ARG_OK=true
35666  else
35667    $ECHO "Arg failed:" >&5
35668    $ECHO "$OUTPUT" >&5
35669    JVM_ARG_OK=false
35670  fi
35671
35672    fi
35673    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35674
35675  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35676  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35677  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35678  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35679  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35680  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35681    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35682    JVM_ARG_OK=true
35683  else
35684    $ECHO "Arg failed:" >&5
35685    $ECHO "$OUTPUT" >&5
35686    JVM_ARG_OK=false
35687  fi
35688
35689    fi
35690    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35691
35692  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35693  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35694  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35695  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35696  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35697  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35698    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35699    JVM_ARG_OK=true
35700  else
35701    $ECHO "Arg failed:" >&5
35702    $ECHO "$OUTPUT" >&5
35703    JVM_ARG_OK=false
35704  fi
35705
35706    fi
35707    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35708
35709  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35710  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35711  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35712  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35713  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35714  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35715    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35716    JVM_ARG_OK=true
35717  else
35718    $ECHO "Arg failed:" >&5
35719    $ECHO "$OUTPUT" >&5
35720    JVM_ARG_OK=false
35721  fi
35722
35723    fi
35724  fi
35725  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35726
35727  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35728  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35729  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35730  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35731  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35732  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35733    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35734    JVM_ARG_OK=true
35735  else
35736    $ECHO "Arg failed:" >&5
35737    $ECHO "$OUTPUT" >&5
35738    JVM_ARG_OK=false
35739  fi
35740
35741  fi
35742  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35743
35744  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35745  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35746  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35747  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35748  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35749  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35750    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35751    JVM_ARG_OK=true
35752  else
35753    $ECHO "Arg failed:" >&5
35754    $ECHO "$OUTPUT" >&5
35755    JVM_ARG_OK=false
35756  fi
35757
35758  fi
35759  if test "$JVM_ARG_OK" = false; then
35760
35761  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35762  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35763  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35764  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35765  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35766  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35767    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35768    JVM_ARG_OK=true
35769  else
35770    $ECHO "Arg failed:" >&5
35771    $ECHO "$OUTPUT" >&5
35772    JVM_ARG_OK=false
35773  fi
35774
35775  fi
35776
35777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35778$as_echo_n "checking whether to use sjavac... " >&6; }
35779  # Check whether --enable-sjavac was given.
35780if test "${enable_sjavac+set}" = set; then :
35781  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35782else
35783  ENABLE_SJAVAC='no'
35784fi
35785
35786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
35787$as_echo "$ENABLE_SJAVAC" >&6; }
35788
35789
35790  if test "x$ENABLE_SJAVAC" = xyes; then
35791    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
35792  else
35793    SJAVAC_SERVER_DIR=
35794  fi
35795
35796
35797
35798# Can the C/C++ compiler use precompiled headers?
35799
35800
35801  ###############################################################################
35802  #
35803  # Can the C/C++ compiler use precompiled headers?
35804  #
35805  # Check whether --enable-precompiled-headers was given.
35806if test "${enable_precompiled_headers+set}" = set; then :
35807  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
35808else
35809  ENABLE_PRECOMPH=yes
35810fi
35811
35812
35813  USE_PRECOMPILED_HEADER=1
35814  if test "x$ENABLE_PRECOMPH" = xno; then
35815    USE_PRECOMPILED_HEADER=0
35816  fi
35817
35818  if test "x$ENABLE_PRECOMPH" = xyes; then
35819    # Check that the compiler actually supports precomp headers.
35820    if test "x$GCC" = xyes; then
35821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
35822$as_echo_n "checking that precompiled headers work... " >&6; }
35823      echo "int alfa();" > conftest.h
35824      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
35825      if test ! -f conftest.hpp.gch; then
35826        USE_PRECOMPILED_HEADER=0
35827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35828$as_echo "no" >&6; }
35829      else
35830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35831$as_echo "yes" >&6; }
35832      fi
35833      rm -f conftest.h conftest.hpp.gch
35834    fi
35835  fi
35836
35837
35838
35839
35840# Setup use of ccache, if available
35841
35842  # Check whether --enable-ccache was given.
35843if test "${enable_ccache+set}" = set; then :
35844  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
35845else
35846  ENABLE_CCACHE=yes
35847fi
35848
35849  if test "x$ENABLE_CCACHE" = xyes; then
35850    OLD_PATH="$PATH"
35851    if test "x$TOOLS_DIR" != x; then
35852      PATH=$TOOLS_DIR:$PATH
35853    fi
35854    # Extract the first word of "ccache", so it can be a program name with args.
35855set dummy ccache; ac_word=$2
35856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35857$as_echo_n "checking for $ac_word... " >&6; }
35858if ${ac_cv_path_CCACHE+:} false; then :
35859  $as_echo_n "(cached) " >&6
35860else
35861  case $CCACHE in
35862  [\\/]* | ?:[\\/]*)
35863  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
35864  ;;
35865  *)
35866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35867for as_dir in $PATH
35868do
35869  IFS=$as_save_IFS
35870  test -z "$as_dir" && as_dir=.
35871    for ac_exec_ext in '' $ac_executable_extensions; do
35872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35873    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
35874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35875    break 2
35876  fi
35877done
35878  done
35879IFS=$as_save_IFS
35880
35881  ;;
35882esac
35883fi
35884CCACHE=$ac_cv_path_CCACHE
35885if test -n "$CCACHE"; then
35886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
35887$as_echo "$CCACHE" >&6; }
35888else
35889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35890$as_echo "no" >&6; }
35891fi
35892
35893
35894    PATH="$OLD_PATH"
35895  else
35896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
35897$as_echo_n "checking for ccache... " >&6; }
35898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
35899$as_echo "explicitly disabled" >&6; }
35900    CCACHE=
35901  fi
35902
35903
35904
35905# Check whether --with-ccache-dir was given.
35906if test "${with_ccache_dir+set}" = set; then :
35907  withval=$with_ccache_dir;
35908fi
35909
35910
35911  if test "x$with_ccache_dir" != x; then
35912    # When using a non home ccache directory, assume the use is to share ccache files
35913    # with other users. Thus change the umask.
35914    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
35915  fi
35916  CCACHE_FOUND=""
35917  if test "x$CCACHE" != x; then
35918
35919  if test "x$CCACHE" != x; then
35920    CCACHE_FOUND="true"
35921    # Only use ccache if it is 3.1.4 or later, which supports
35922    # precompiled headers.
35923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
35924$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
35925    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
35926    if test "x$HAS_GOOD_CCACHE" = x; then
35927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
35928$as_echo "no, disabling ccache" >&6; }
35929      CCACHE=
35930    else
35931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35932$as_echo "yes" >&6; }
35933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
35934$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
35935      PUSHED_FLAGS="$CXXFLAGS"
35936      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
35937      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35938/* end confdefs.h.  */
35939
35940int
35941main ()
35942{
35943
35944  ;
35945  return 0;
35946}
35947_ACEOF
35948if ac_fn_cxx_try_compile "$LINENO"; then :
35949  CC_KNOWS_CCACHE_TRICK=yes
35950else
35951  CC_KNOWS_CCACHE_TRICK=no
35952fi
35953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35954      CXXFLAGS="$PUSHED_FLAGS"
35955      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
35956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35957$as_echo "yes" >&6; }
35958      else
35959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
35960$as_echo "no, disabling ccaching of precompiled headers" >&6; }
35961        CCACHE=
35962      fi
35963    fi
35964  fi
35965
35966  if test "x$CCACHE" != x; then
35967    CCACHE_SLOPPINESS=time_macros
35968    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
35969    CCACHE_FLAGS=-fpch-preprocess
35970
35971    if test "x$SET_CCACHE_DIR" != x; then
35972      mkdir -p $CCACHE_DIR > /dev/null 2>&1
35973      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
35974    fi
35975  fi
35976
35977  fi
35978
35979
35980###############################################################################
35981#
35982# And now the finish...
35983#
35984###############################################################################
35985
35986# Check for some common pitfalls
35987
35988  if test x"$OPENJDK_BUILD_OS" = xwindows; then
35989    file_to_test="$SRC_ROOT/LICENSE"
35990    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
35991      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
35992    fi
35993  fi
35994
35995
35996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
35997$as_echo_n "checking if build directory is on local disk... " >&6; }
35998
35999  # df -l lists only local disks; if the given directory is not found then
36000  # a non-zero exit code is given
36001  if test "x$DF" = x; then
36002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36003      # msys does not have df; use Windows "net use" instead.
36004      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36005      if test "x$IS_NETWORK_DISK" = x; then
36006        OUTPUT_DIR_IS_LOCAL="yes"
36007      else
36008        OUTPUT_DIR_IS_LOCAL="no"
36009      fi
36010    else
36011      # No df here, say it's local
36012      OUTPUT_DIR_IS_LOCAL="yes"
36013    fi
36014  else
36015    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36016      OUTPUT_DIR_IS_LOCAL="yes"
36017    else
36018      OUTPUT_DIR_IS_LOCAL="no"
36019    fi
36020  fi
36021
36022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36023$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36024
36025
36026
36027  # Check if the user has any old-style ALT_ variables set.
36028  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36029
36030  # Before generating output files, test if they exist. If they do, this is a reconfigure.
36031  # Since we can't properly handle the dependencies for this, warn the user about the situation
36032  if test -e $OUTPUT_ROOT/spec.gmk; then
36033    IS_RECONFIGURE=yes
36034  else
36035    IS_RECONFIGURE=no
36036  fi
36037
36038  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36039    HIDE_PERFORMANCE_HINTS=yes
36040  else
36041    HIDE_PERFORMANCE_HINTS=no
36042    # Hide it the next time around...
36043    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36044  fi
36045
36046
36047# At the end, call the custom hook. (Dummy macro if no custom sources available)
36048
36049
36050# We're messing a bit with internal autoconf variables to put the config.status
36051# in the output directory instead of the current directory.
36052CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36053
36054# Create the actual output files. Now the main work of configure is done.
36055cat >confcache <<\_ACEOF
36056# This file is a shell script that caches the results of configure
36057# tests run on this system so they can be shared between configure
36058# scripts and configure runs, see configure's option --config-cache.
36059# It is not useful on other systems.  If it contains results you don't
36060# want to keep, you may remove or edit it.
36061#
36062# config.status only pays attention to the cache file if you give it
36063# the --recheck option to rerun configure.
36064#
36065# `ac_cv_env_foo' variables (set or unset) will be overridden when
36066# loading this file, other *unset* `ac_cv_foo' will be assigned the
36067# following values.
36068
36069_ACEOF
36070
36071# The following way of writing the cache mishandles newlines in values,
36072# but we know of no workaround that is simple, portable, and efficient.
36073# So, we kill variables containing newlines.
36074# Ultrix sh set writes to stderr and can't be redirected directly,
36075# and sets the high bit in the cache file unless we assign to the vars.
36076(
36077  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36078    eval ac_val=\$$ac_var
36079    case $ac_val in #(
36080    *${as_nl}*)
36081      case $ac_var in #(
36082      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36083$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36084      esac
36085      case $ac_var in #(
36086      _ | IFS | as_nl) ;; #(
36087      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36088      *) { eval $ac_var=; unset $ac_var;} ;;
36089      esac ;;
36090    esac
36091  done
36092
36093  (set) 2>&1 |
36094    case $as_nl`(ac_space=' '; set) 2>&1` in #(
36095    *${as_nl}ac_space=\ *)
36096      # `set' does not quote correctly, so add quotes: double-quote
36097      # substitution turns \\\\ into \\, and sed turns \\ into \.
36098      sed -n \
36099	"s/'/'\\\\''/g;
36100	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36101      ;; #(
36102    *)
36103      # `set' quotes correctly as required by POSIX, so do not add quotes.
36104      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36105      ;;
36106    esac |
36107    sort
36108) |
36109  sed '
36110     /^ac_cv_env_/b end
36111     t clear
36112     :clear
36113     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36114     t end
36115     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36116     :end' >>confcache
36117if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36118  if test -w "$cache_file"; then
36119    if test "x$cache_file" != "x/dev/null"; then
36120      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36121$as_echo "$as_me: updating cache $cache_file" >&6;}
36122      if test ! -f "$cache_file" || test -h "$cache_file"; then
36123	cat confcache >"$cache_file"
36124      else
36125        case $cache_file in #(
36126        */* | ?:*)
36127	  mv -f confcache "$cache_file"$$ &&
36128	  mv -f "$cache_file"$$ "$cache_file" ;; #(
36129        *)
36130	  mv -f confcache "$cache_file" ;;
36131	esac
36132      fi
36133    fi
36134  else
36135    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36136$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36137  fi
36138fi
36139rm -f confcache
36140
36141test "x$prefix" = xNONE && prefix=$ac_default_prefix
36142# Let make expand exec_prefix.
36143test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36144
36145DEFS=-DHAVE_CONFIG_H
36146
36147ac_libobjs=
36148ac_ltlibobjs=
36149U=
36150for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36151  # 1. Remove the extension, and $U if already installed.
36152  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36153  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36154  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36155  #    will be set to the directory where LIBOBJS objects are built.
36156  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36157  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36158done
36159LIBOBJS=$ac_libobjs
36160
36161LTLIBOBJS=$ac_ltlibobjs
36162
36163
36164
36165: "${CONFIG_STATUS=./config.status}"
36166ac_write_fail=0
36167ac_clean_files_save=$ac_clean_files
36168ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36169{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36170$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36171as_write_fail=0
36172cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36173#! $SHELL
36174# Generated by $as_me.
36175# Run this file to recreate the current configuration.
36176# Compiler output produced by configure, useful for debugging
36177# configure, is in config.log if it exists.
36178
36179debug=false
36180ac_cs_recheck=false
36181ac_cs_silent=false
36182
36183SHELL=\${CONFIG_SHELL-$SHELL}
36184export SHELL
36185_ASEOF
36186cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36187## -------------------- ##
36188## M4sh Initialization. ##
36189## -------------------- ##
36190
36191# Be more Bourne compatible
36192DUALCASE=1; export DUALCASE # for MKS sh
36193if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36194  emulate sh
36195  NULLCMD=:
36196  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36197  # is contrary to our usage.  Disable this feature.
36198  alias -g '${1+"$@"}'='"$@"'
36199  setopt NO_GLOB_SUBST
36200else
36201  case `(set -o) 2>/dev/null` in #(
36202  *posix*) :
36203    set -o posix ;; #(
36204  *) :
36205     ;;
36206esac
36207fi
36208
36209
36210as_nl='
36211'
36212export as_nl
36213# Printing a long string crashes Solaris 7 /usr/bin/printf.
36214as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36215as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36216as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36217# Prefer a ksh shell builtin over an external printf program on Solaris,
36218# but without wasting forks for bash or zsh.
36219if test -z "$BASH_VERSION$ZSH_VERSION" \
36220    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36221  as_echo='print -r --'
36222  as_echo_n='print -rn --'
36223elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36224  as_echo='printf %s\n'
36225  as_echo_n='printf %s'
36226else
36227  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36228    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36229    as_echo_n='/usr/ucb/echo -n'
36230  else
36231    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36232    as_echo_n_body='eval
36233      arg=$1;
36234      case $arg in #(
36235      *"$as_nl"*)
36236	expr "X$arg" : "X\\(.*\\)$as_nl";
36237	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36238      esac;
36239      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36240    '
36241    export as_echo_n_body
36242    as_echo_n='sh -c $as_echo_n_body as_echo'
36243  fi
36244  export as_echo_body
36245  as_echo='sh -c $as_echo_body as_echo'
36246fi
36247
36248# The user is always right.
36249if test "${PATH_SEPARATOR+set}" != set; then
36250  PATH_SEPARATOR=:
36251  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36252    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36253      PATH_SEPARATOR=';'
36254  }
36255fi
36256
36257
36258# IFS
36259# We need space, tab and new line, in precisely that order.  Quoting is
36260# there to prevent editors from complaining about space-tab.
36261# (If _AS_PATH_WALK were called with IFS unset, it would disable word
36262# splitting by setting IFS to empty value.)
36263IFS=" ""	$as_nl"
36264
36265# Find who we are.  Look in the path if we contain no directory separator.
36266as_myself=
36267case $0 in #((
36268  *[\\/]* ) as_myself=$0 ;;
36269  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36270for as_dir in $PATH
36271do
36272  IFS=$as_save_IFS
36273  test -z "$as_dir" && as_dir=.
36274    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36275  done
36276IFS=$as_save_IFS
36277
36278     ;;
36279esac
36280# We did not find ourselves, most probably we were run as `sh COMMAND'
36281# in which case we are not to be found in the path.
36282if test "x$as_myself" = x; then
36283  as_myself=$0
36284fi
36285if test ! -f "$as_myself"; then
36286  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36287  exit 1
36288fi
36289
36290# Unset variables that we do not need and which cause bugs (e.g. in
36291# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36292# suppresses any "Segmentation fault" message there.  '((' could
36293# trigger a bug in pdksh 5.2.14.
36294for as_var in BASH_ENV ENV MAIL MAILPATH
36295do eval test x\${$as_var+set} = xset \
36296  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36297done
36298PS1='$ '
36299PS2='> '
36300PS4='+ '
36301
36302# NLS nuisances.
36303LC_ALL=C
36304export LC_ALL
36305LANGUAGE=C
36306export LANGUAGE
36307
36308# CDPATH.
36309(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36310
36311
36312# as_fn_error STATUS ERROR [LINENO LOG_FD]
36313# ----------------------------------------
36314# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36315# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36316# script with STATUS, using 1 if that was 0.
36317as_fn_error ()
36318{
36319  as_status=$1; test $as_status -eq 0 && as_status=1
36320  if test "$4"; then
36321    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36322    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36323  fi
36324  $as_echo "$as_me: error: $2" >&2
36325  as_fn_exit $as_status
36326} # as_fn_error
36327
36328
36329# as_fn_set_status STATUS
36330# -----------------------
36331# Set $? to STATUS, without forking.
36332as_fn_set_status ()
36333{
36334  return $1
36335} # as_fn_set_status
36336
36337# as_fn_exit STATUS
36338# -----------------
36339# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36340as_fn_exit ()
36341{
36342  set +e
36343  as_fn_set_status $1
36344  exit $1
36345} # as_fn_exit
36346
36347# as_fn_unset VAR
36348# ---------------
36349# Portably unset VAR.
36350as_fn_unset ()
36351{
36352  { eval $1=; unset $1;}
36353}
36354as_unset=as_fn_unset
36355# as_fn_append VAR VALUE
36356# ----------------------
36357# Append the text in VALUE to the end of the definition contained in VAR. Take
36358# advantage of any shell optimizations that allow amortized linear growth over
36359# repeated appends, instead of the typical quadratic growth present in naive
36360# implementations.
36361if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36362  eval 'as_fn_append ()
36363  {
36364    eval $1+=\$2
36365  }'
36366else
36367  as_fn_append ()
36368  {
36369    eval $1=\$$1\$2
36370  }
36371fi # as_fn_append
36372
36373# as_fn_arith ARG...
36374# ------------------
36375# Perform arithmetic evaluation on the ARGs, and store the result in the
36376# global $as_val. Take advantage of shells that can avoid forks. The arguments
36377# must be portable across $(()) and expr.
36378if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36379  eval 'as_fn_arith ()
36380  {
36381    as_val=$(( $* ))
36382  }'
36383else
36384  as_fn_arith ()
36385  {
36386    as_val=`expr "$@" || test $? -eq 1`
36387  }
36388fi # as_fn_arith
36389
36390
36391if expr a : '\(a\)' >/dev/null 2>&1 &&
36392   test "X`expr 00001 : '.*\(...\)'`" = X001; then
36393  as_expr=expr
36394else
36395  as_expr=false
36396fi
36397
36398if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36399  as_basename=basename
36400else
36401  as_basename=false
36402fi
36403
36404if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36405  as_dirname=dirname
36406else
36407  as_dirname=false
36408fi
36409
36410as_me=`$as_basename -- "$0" ||
36411$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36412	 X"$0" : 'X\(//\)$' \| \
36413	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36414$as_echo X/"$0" |
36415    sed '/^.*\/\([^/][^/]*\)\/*$/{
36416	    s//\1/
36417	    q
36418	  }
36419	  /^X\/\(\/\/\)$/{
36420	    s//\1/
36421	    q
36422	  }
36423	  /^X\/\(\/\).*/{
36424	    s//\1/
36425	    q
36426	  }
36427	  s/.*/./; q'`
36428
36429# Avoid depending upon Character Ranges.
36430as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36431as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36432as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36433as_cr_digits='0123456789'
36434as_cr_alnum=$as_cr_Letters$as_cr_digits
36435
36436ECHO_C= ECHO_N= ECHO_T=
36437case `echo -n x` in #(((((
36438-n*)
36439  case `echo 'xy\c'` in
36440  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
36441  xy)  ECHO_C='\c';;
36442  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36443       ECHO_T='	';;
36444  esac;;
36445*)
36446  ECHO_N='-n';;
36447esac
36448
36449rm -f conf$$ conf$$.exe conf$$.file
36450if test -d conf$$.dir; then
36451  rm -f conf$$.dir/conf$$.file
36452else
36453  rm -f conf$$.dir
36454  mkdir conf$$.dir 2>/dev/null
36455fi
36456if (echo >conf$$.file) 2>/dev/null; then
36457  if ln -s conf$$.file conf$$ 2>/dev/null; then
36458    as_ln_s='ln -s'
36459    # ... but there are two gotchas:
36460    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36461    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36462    # In both cases, we have to default to `cp -pR'.
36463    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36464      as_ln_s='cp -pR'
36465  elif ln conf$$.file conf$$ 2>/dev/null; then
36466    as_ln_s=ln
36467  else
36468    as_ln_s='cp -pR'
36469  fi
36470else
36471  as_ln_s='cp -pR'
36472fi
36473rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36474rmdir conf$$.dir 2>/dev/null
36475
36476
36477# as_fn_mkdir_p
36478# -------------
36479# Create "$as_dir" as a directory, including parents if necessary.
36480as_fn_mkdir_p ()
36481{
36482
36483  case $as_dir in #(
36484  -*) as_dir=./$as_dir;;
36485  esac
36486  test -d "$as_dir" || eval $as_mkdir_p || {
36487    as_dirs=
36488    while :; do
36489      case $as_dir in #(
36490      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36491      *) as_qdir=$as_dir;;
36492      esac
36493      as_dirs="'$as_qdir' $as_dirs"
36494      as_dir=`$as_dirname -- "$as_dir" ||
36495$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36496	 X"$as_dir" : 'X\(//\)[^/]' \| \
36497	 X"$as_dir" : 'X\(//\)$' \| \
36498	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36499$as_echo X"$as_dir" |
36500    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36501	    s//\1/
36502	    q
36503	  }
36504	  /^X\(\/\/\)[^/].*/{
36505	    s//\1/
36506	    q
36507	  }
36508	  /^X\(\/\/\)$/{
36509	    s//\1/
36510	    q
36511	  }
36512	  /^X\(\/\).*/{
36513	    s//\1/
36514	    q
36515	  }
36516	  s/.*/./; q'`
36517      test -d "$as_dir" && break
36518    done
36519    test -z "$as_dirs" || eval "mkdir $as_dirs"
36520  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36521
36522
36523} # as_fn_mkdir_p
36524if mkdir -p . 2>/dev/null; then
36525  as_mkdir_p='mkdir -p "$as_dir"'
36526else
36527  test -d ./-p && rmdir ./-p
36528  as_mkdir_p=false
36529fi
36530
36531
36532# as_fn_executable_p FILE
36533# -----------------------
36534# Test if FILE is an executable regular file.
36535as_fn_executable_p ()
36536{
36537  test -f "$1" && test -x "$1"
36538} # as_fn_executable_p
36539as_test_x='test -x'
36540as_executable_p=as_fn_executable_p
36541
36542# Sed expression to map a string onto a valid CPP name.
36543as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36544
36545# Sed expression to map a string onto a valid variable name.
36546as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36547
36548
36549exec 6>&1
36550## ----------------------------------- ##
36551## Main body of $CONFIG_STATUS script. ##
36552## ----------------------------------- ##
36553_ASEOF
36554test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36555
36556cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36557# Save the log message, to keep $0 and so on meaningful, and to
36558# report actual input values of CONFIG_FILES etc. instead of their
36559# values after options handling.
36560ac_log="
36561This file was extended by OpenJDK $as_me jdk8, which was
36562generated by GNU Autoconf 2.69.  Invocation command line was
36563
36564  CONFIG_FILES    = $CONFIG_FILES
36565  CONFIG_HEADERS  = $CONFIG_HEADERS
36566  CONFIG_LINKS    = $CONFIG_LINKS
36567  CONFIG_COMMANDS = $CONFIG_COMMANDS
36568  $ $0 $@
36569
36570on `(hostname || uname -n) 2>/dev/null | sed 1q`
36571"
36572
36573_ACEOF
36574
36575case $ac_config_files in *"
36576"*) set x $ac_config_files; shift; ac_config_files=$*;;
36577esac
36578
36579case $ac_config_headers in *"
36580"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36581esac
36582
36583
36584cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36585# Files that config.status was made for.
36586config_files="$ac_config_files"
36587config_headers="$ac_config_headers"
36588
36589_ACEOF
36590
36591cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36592ac_cs_usage="\
36593\`$as_me' instantiates files and other configuration actions
36594from templates according to the current configuration.  Unless the files
36595and actions are specified as TAGs, all are instantiated by default.
36596
36597Usage: $0 [OPTION]... [TAG]...
36598
36599  -h, --help       print this help, then exit
36600  -V, --version    print version number and configuration settings, then exit
36601      --config     print configuration, then exit
36602  -q, --quiet, --silent
36603                   do not print progress messages
36604  -d, --debug      don't remove temporary files
36605      --recheck    update $as_me by reconfiguring in the same conditions
36606      --file=FILE[:TEMPLATE]
36607                   instantiate the configuration file FILE
36608      --header=FILE[:TEMPLATE]
36609                   instantiate the configuration header FILE
36610
36611Configuration files:
36612$config_files
36613
36614Configuration headers:
36615$config_headers
36616
36617Report bugs to <build-dev@openjdk.java.net>.
36618OpenJDK home page: <http://openjdk.java.net>."
36619
36620_ACEOF
36621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36622ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36623ac_cs_version="\\
36624OpenJDK config.status jdk8
36625configured by $0, generated by GNU Autoconf 2.69,
36626  with options \\"\$ac_cs_config\\"
36627
36628Copyright (C) 2012 Free Software Foundation, Inc.
36629This config.status script is free software; the Free Software Foundation
36630gives unlimited permission to copy, distribute and modify it."
36631
36632ac_pwd='$ac_pwd'
36633srcdir='$srcdir'
36634AWK='$AWK'
36635test -n "\$AWK" || AWK=awk
36636_ACEOF
36637
36638cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36639# The default lists apply if the user does not specify any file.
36640ac_need_defaults=:
36641while test $# != 0
36642do
36643  case $1 in
36644  --*=?*)
36645    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36646    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36647    ac_shift=:
36648    ;;
36649  --*=)
36650    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36651    ac_optarg=
36652    ac_shift=:
36653    ;;
36654  *)
36655    ac_option=$1
36656    ac_optarg=$2
36657    ac_shift=shift
36658    ;;
36659  esac
36660
36661  case $ac_option in
36662  # Handling of the options.
36663  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36664    ac_cs_recheck=: ;;
36665  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36666    $as_echo "$ac_cs_version"; exit ;;
36667  --config | --confi | --conf | --con | --co | --c )
36668    $as_echo "$ac_cs_config"; exit ;;
36669  --debug | --debu | --deb | --de | --d | -d )
36670    debug=: ;;
36671  --file | --fil | --fi | --f )
36672    $ac_shift
36673    case $ac_optarg in
36674    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36675    '') as_fn_error $? "missing file argument" ;;
36676    esac
36677    as_fn_append CONFIG_FILES " '$ac_optarg'"
36678    ac_need_defaults=false;;
36679  --header | --heade | --head | --hea )
36680    $ac_shift
36681    case $ac_optarg in
36682    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36683    esac
36684    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36685    ac_need_defaults=false;;
36686  --he | --h)
36687    # Conflict between --help and --header
36688    as_fn_error $? "ambiguous option: \`$1'
36689Try \`$0 --help' for more information.";;
36690  --help | --hel | -h )
36691    $as_echo "$ac_cs_usage"; exit ;;
36692  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36693  | -silent | --silent | --silen | --sile | --sil | --si | --s)
36694    ac_cs_silent=: ;;
36695
36696  # This is an error.
36697  -*) as_fn_error $? "unrecognized option: \`$1'
36698Try \`$0 --help' for more information." ;;
36699
36700  *) as_fn_append ac_config_targets " $1"
36701     ac_need_defaults=false ;;
36702
36703  esac
36704  shift
36705done
36706
36707ac_configure_extra_args=
36708
36709if $ac_cs_silent; then
36710  exec 6>/dev/null
36711  ac_configure_extra_args="$ac_configure_extra_args --silent"
36712fi
36713
36714_ACEOF
36715cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36716if \$ac_cs_recheck; then
36717  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36718  shift
36719  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36720  CONFIG_SHELL='$SHELL'
36721  export CONFIG_SHELL
36722  exec "\$@"
36723fi
36724
36725_ACEOF
36726cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36727exec 5>>config.log
36728{
36729  echo
36730  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36731## Running $as_me. ##
36732_ASBOX
36733  $as_echo "$ac_log"
36734} >&5
36735
36736_ACEOF
36737cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36738_ACEOF
36739
36740cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36741
36742# Handling of arguments.
36743for ac_config_target in $ac_config_targets
36744do
36745  case $ac_config_target in
36746    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36747    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36748    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36749    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36750    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36751    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36752    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36753
36754  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36755  esac
36756done
36757
36758
36759# If the user did not use the arguments to specify the items to instantiate,
36760# then the envvar interface is used.  Set only those that are not.
36761# We use the long form for the default assignment because of an extremely
36762# bizarre bug on SunOS 4.1.3.
36763if $ac_need_defaults; then
36764  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36765  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36766fi
36767
36768# Have a temporary directory for convenience.  Make it in the build tree
36769# simply because there is no reason against having it here, and in addition,
36770# creating and moving files from /tmp can sometimes cause problems.
36771# Hook for its removal unless debugging.
36772# Note that there is a small window in which the directory will not be cleaned:
36773# after its creation but before its name has been assigned to `$tmp'.
36774$debug ||
36775{
36776  tmp= ac_tmp=
36777  trap 'exit_status=$?
36778  : "${ac_tmp:=$tmp}"
36779  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36780' 0
36781  trap 'as_fn_exit 1' 1 2 13 15
36782}
36783# Create a (secure) tmp directory for tmp files.
36784
36785{
36786  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36787  test -d "$tmp"
36788}  ||
36789{
36790  tmp=./conf$$-$RANDOM
36791  (umask 077 && mkdir "$tmp")
36792} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36793ac_tmp=$tmp
36794
36795# Set up the scripts for CONFIG_FILES section.
36796# No need to generate them if there are no CONFIG_FILES.
36797# This happens for instance with `./config.status config.h'.
36798if test -n "$CONFIG_FILES"; then
36799
36800
36801ac_cr=`echo X | tr X '\015'`
36802# On cygwin, bash can eat \r inside `` if the user requested igncr.
36803# But we know of no other shell where ac_cr would be empty at this
36804# point, so we can use a bashism as a fallback.
36805if test "x$ac_cr" = x; then
36806  eval ac_cr=\$\'\\r\'
36807fi
36808ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36809if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36810  ac_cs_awk_cr='\\r'
36811else
36812  ac_cs_awk_cr=$ac_cr
36813fi
36814
36815echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36816_ACEOF
36817
36818
36819{
36820  echo "cat >conf$$subs.awk <<_ACEOF" &&
36821  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36822  echo "_ACEOF"
36823} >conf$$subs.sh ||
36824  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36825ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36826ac_delim='%!_!# '
36827for ac_last_try in false false false false false :; do
36828  . ./conf$$subs.sh ||
36829    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36830
36831  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36832  if test $ac_delim_n = $ac_delim_num; then
36833    break
36834  elif $ac_last_try; then
36835    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36836  else
36837    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36838  fi
36839done
36840rm -f conf$$subs.sh
36841
36842cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36843cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36844_ACEOF
36845sed -n '
36846h
36847s/^/S["/; s/!.*/"]=/
36848p
36849g
36850s/^[^!]*!//
36851:repl
36852t repl
36853s/'"$ac_delim"'$//
36854t delim
36855:nl
36856h
36857s/\(.\{148\}\)..*/\1/
36858t more1
36859s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36860p
36861n
36862b repl
36863:more1
36864s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36865p
36866g
36867s/.\{148\}//
36868t nl
36869:delim
36870h
36871s/\(.\{148\}\)..*/\1/
36872t more2
36873s/["\\]/\\&/g; s/^/"/; s/$/"/
36874p
36875b
36876:more2
36877s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36878p
36879g
36880s/.\{148\}//
36881t delim
36882' <conf$$subs.awk | sed '
36883/^[^""]/{
36884  N
36885  s/\n//
36886}
36887' >>$CONFIG_STATUS || ac_write_fail=1
36888rm -f conf$$subs.awk
36889cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36890_ACAWK
36891cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36892  for (key in S) S_is_set[key] = 1
36893  FS = ""
36894
36895}
36896{
36897  line = $ 0
36898  nfields = split(line, field, "@")
36899  substed = 0
36900  len = length(field[1])
36901  for (i = 2; i < nfields; i++) {
36902    key = field[i]
36903    keylen = length(key)
36904    if (S_is_set[key]) {
36905      value = S[key]
36906      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
36907      len += length(value) + length(field[++i])
36908      substed = 1
36909    } else
36910      len += 1 + keylen
36911  }
36912
36913  print line
36914}
36915
36916_ACAWK
36917_ACEOF
36918cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36919if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36920  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36921else
36922  cat
36923fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
36924  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
36925_ACEOF
36926
36927# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
36928# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
36929# trailing colons and then remove the whole line if VPATH becomes empty
36930# (actually we leave an empty line to preserve line numbers).
36931if test "x$srcdir" = x.; then
36932  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
36933h
36934s///
36935s/^/:/
36936s/[	 ]*$/:/
36937s/:\$(srcdir):/:/g
36938s/:\${srcdir}:/:/g
36939s/:@srcdir@:/:/g
36940s/^:*//
36941s/:*$//
36942x
36943s/\(=[	 ]*\).*/\1/
36944G
36945s/\n//
36946s/^[^=]*=[	 ]*$//
36947}'
36948fi
36949
36950cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36951fi # test -n "$CONFIG_FILES"
36952
36953# Set up the scripts for CONFIG_HEADERS section.
36954# No need to generate them if there are no CONFIG_HEADERS.
36955# This happens for instance with `./config.status Makefile'.
36956if test -n "$CONFIG_HEADERS"; then
36957cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36958BEGIN {
36959_ACEOF
36960
36961# Transform confdefs.h into an awk script `defines.awk', embedded as
36962# here-document in config.status, that substitutes the proper values into
36963# config.h.in to produce config.h.
36964
36965# Create a delimiter string that does not exist in confdefs.h, to ease
36966# handling of long lines.
36967ac_delim='%!_!# '
36968for ac_last_try in false false :; do
36969  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
36970  if test -z "$ac_tt"; then
36971    break
36972  elif $ac_last_try; then
36973    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
36974  else
36975    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36976  fi
36977done
36978
36979# For the awk script, D is an array of macro values keyed by name,
36980# likewise P contains macro parameters if any.  Preserve backslash
36981# newline sequences.
36982
36983ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36984sed -n '
36985s/.\{148\}/&'"$ac_delim"'/g
36986t rset
36987:rset
36988s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
36989t def
36990d
36991:def
36992s/\\$//
36993t bsnl
36994s/["\\]/\\&/g
36995s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36996D["\1"]=" \3"/p
36997s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
36998d
36999:bsnl
37000s/["\\]/\\&/g
37001s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
37002D["\1"]=" \3\\\\\\n"\\/p
37003t cont
37004s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37005t cont
37006d
37007:cont
37008n
37009s/.\{148\}/&'"$ac_delim"'/g
37010t clear
37011:clear
37012s/\\$//
37013t bsnlc
37014s/["\\]/\\&/g; s/^/"/; s/$/"/p
37015d
37016:bsnlc
37017s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37018b cont
37019' <confdefs.h | sed '
37020s/'"$ac_delim"'/"\\\
37021"/g' >>$CONFIG_STATUS || ac_write_fail=1
37022
37023cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37024  for (key in D) D_is_set[key] = 1
37025  FS = ""
37026}
37027/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37028  line = \$ 0
37029  split(line, arg, " ")
37030  if (arg[1] == "#") {
37031    defundef = arg[2]
37032    mac1 = arg[3]
37033  } else {
37034    defundef = substr(arg[1], 2)
37035    mac1 = arg[2]
37036  }
37037  split(mac1, mac2, "(") #)
37038  macro = mac2[1]
37039  prefix = substr(line, 1, index(line, defundef) - 1)
37040  if (D_is_set[macro]) {
37041    # Preserve the white space surrounding the "#".
37042    print prefix "define", macro P[macro] D[macro]
37043    next
37044  } else {
37045    # Replace #undef with comments.  This is necessary, for example,
37046    # in the case of _POSIX_SOURCE, which is predefined and required
37047    # on some systems where configure will not decide to define it.
37048    if (defundef == "undef") {
37049      print "/*", prefix defundef, macro, "*/"
37050      next
37051    }
37052  }
37053}
37054{ print }
37055_ACAWK
37056_ACEOF
37057cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37058  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37059fi # test -n "$CONFIG_HEADERS"
37060
37061
37062eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37063shift
37064for ac_tag
37065do
37066  case $ac_tag in
37067  :[FHLC]) ac_mode=$ac_tag; continue;;
37068  esac
37069  case $ac_mode$ac_tag in
37070  :[FHL]*:*);;
37071  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37072  :[FH]-) ac_tag=-:-;;
37073  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37074  esac
37075  ac_save_IFS=$IFS
37076  IFS=:
37077  set x $ac_tag
37078  IFS=$ac_save_IFS
37079  shift
37080  ac_file=$1
37081  shift
37082
37083  case $ac_mode in
37084  :L) ac_source=$1;;
37085  :[FH])
37086    ac_file_inputs=
37087    for ac_f
37088    do
37089      case $ac_f in
37090      -) ac_f="$ac_tmp/stdin";;
37091      *) # Look for the file first in the build tree, then in the source tree
37092	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
37093	 # because $ac_f cannot contain `:'.
37094	 test -f "$ac_f" ||
37095	   case $ac_f in
37096	   [\\/$]*) false;;
37097	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37098	   esac ||
37099	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37100      esac
37101      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37102      as_fn_append ac_file_inputs " '$ac_f'"
37103    done
37104
37105    # Let's still pretend it is `configure' which instantiates (i.e., don't
37106    # use $as_me), people would be surprised to read:
37107    #    /* config.h.  Generated by config.status.  */
37108    configure_input='Generated from '`
37109	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37110	`' by configure.'
37111    if test x"$ac_file" != x-; then
37112      configure_input="$ac_file.  $configure_input"
37113      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37114$as_echo "$as_me: creating $ac_file" >&6;}
37115    fi
37116    # Neutralize special characters interpreted by sed in replacement strings.
37117    case $configure_input in #(
37118    *\&* | *\|* | *\\* )
37119       ac_sed_conf_input=`$as_echo "$configure_input" |
37120       sed 's/[\\\\&|]/\\\\&/g'`;; #(
37121    *) ac_sed_conf_input=$configure_input;;
37122    esac
37123
37124    case $ac_tag in
37125    *:-:* | *:-) cat >"$ac_tmp/stdin" \
37126      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37127    esac
37128    ;;
37129  esac
37130
37131  ac_dir=`$as_dirname -- "$ac_file" ||
37132$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37133	 X"$ac_file" : 'X\(//\)[^/]' \| \
37134	 X"$ac_file" : 'X\(//\)$' \| \
37135	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37136$as_echo X"$ac_file" |
37137    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37138	    s//\1/
37139	    q
37140	  }
37141	  /^X\(\/\/\)[^/].*/{
37142	    s//\1/
37143	    q
37144	  }
37145	  /^X\(\/\/\)$/{
37146	    s//\1/
37147	    q
37148	  }
37149	  /^X\(\/\).*/{
37150	    s//\1/
37151	    q
37152	  }
37153	  s/.*/./; q'`
37154  as_dir="$ac_dir"; as_fn_mkdir_p
37155  ac_builddir=.
37156
37157case "$ac_dir" in
37158.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37159*)
37160  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37161  # A ".." for each directory in $ac_dir_suffix.
37162  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37163  case $ac_top_builddir_sub in
37164  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37165  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37166  esac ;;
37167esac
37168ac_abs_top_builddir=$ac_pwd
37169ac_abs_builddir=$ac_pwd$ac_dir_suffix
37170# for backward compatibility:
37171ac_top_builddir=$ac_top_build_prefix
37172
37173case $srcdir in
37174  .)  # We are building in place.
37175    ac_srcdir=.
37176    ac_top_srcdir=$ac_top_builddir_sub
37177    ac_abs_top_srcdir=$ac_pwd ;;
37178  [\\/]* | ?:[\\/]* )  # Absolute name.
37179    ac_srcdir=$srcdir$ac_dir_suffix;
37180    ac_top_srcdir=$srcdir
37181    ac_abs_top_srcdir=$srcdir ;;
37182  *) # Relative name.
37183    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37184    ac_top_srcdir=$ac_top_build_prefix$srcdir
37185    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37186esac
37187ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37188
37189
37190  case $ac_mode in
37191  :F)
37192  #
37193  # CONFIG_FILE
37194  #
37195
37196_ACEOF
37197
37198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37199# If the template does not know about datarootdir, expand it.
37200# FIXME: This hack should be removed a few years after 2.60.
37201ac_datarootdir_hack=; ac_datarootdir_seen=
37202ac_sed_dataroot='
37203/datarootdir/ {
37204  p
37205  q
37206}
37207/@datadir@/p
37208/@docdir@/p
37209/@infodir@/p
37210/@localedir@/p
37211/@mandir@/p'
37212case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37213*datarootdir*) ac_datarootdir_seen=yes;;
37214*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37215  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37216$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37217_ACEOF
37218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37219  ac_datarootdir_hack='
37220  s&@datadir@&$datadir&g
37221  s&@docdir@&$docdir&g
37222  s&@infodir@&$infodir&g
37223  s&@localedir@&$localedir&g
37224  s&@mandir@&$mandir&g
37225  s&\\\${datarootdir}&$datarootdir&g' ;;
37226esac
37227_ACEOF
37228
37229# Neutralize VPATH when `$srcdir' = `.'.
37230# Shell code in configure.ac might set extrasub.
37231# FIXME: do we really want to maintain this feature?
37232cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37233ac_sed_extra="$ac_vpsub
37234$extrasub
37235_ACEOF
37236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37237:t
37238/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37239s|@configure_input@|$ac_sed_conf_input|;t t
37240s&@top_builddir@&$ac_top_builddir_sub&;t t
37241s&@top_build_prefix@&$ac_top_build_prefix&;t t
37242s&@srcdir@&$ac_srcdir&;t t
37243s&@abs_srcdir@&$ac_abs_srcdir&;t t
37244s&@top_srcdir@&$ac_top_srcdir&;t t
37245s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37246s&@builddir@&$ac_builddir&;t t
37247s&@abs_builddir@&$ac_abs_builddir&;t t
37248s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37249$ac_datarootdir_hack
37250"
37251eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37252  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37253
37254test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37255  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37256  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
37257      "$ac_tmp/out"`; test -z "$ac_out"; } &&
37258  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37259which seems to be undefined.  Please make sure it is defined" >&5
37260$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37261which seems to be undefined.  Please make sure it is defined" >&2;}
37262
37263  rm -f "$ac_tmp/stdin"
37264  case $ac_file in
37265  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37266  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37267  esac \
37268  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37269 ;;
37270  :H)
37271  #
37272  # CONFIG_HEADER
37273  #
37274  if test x"$ac_file" != x-; then
37275    {
37276      $as_echo "/* $configure_input  */" \
37277      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37278    } >"$ac_tmp/config.h" \
37279      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37280    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37281      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37282$as_echo "$as_me: $ac_file is unchanged" >&6;}
37283    else
37284      rm -f "$ac_file"
37285      mv "$ac_tmp/config.h" "$ac_file" \
37286	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
37287    fi
37288  else
37289    $as_echo "/* $configure_input  */" \
37290      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37291      || as_fn_error $? "could not create -" "$LINENO" 5
37292  fi
37293 ;;
37294
37295
37296  esac
37297
37298done # for ac_tag
37299
37300
37301as_fn_exit 0
37302_ACEOF
37303ac_clean_files=$ac_clean_files_save
37304
37305test $ac_write_fail = 0 ||
37306  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37307
37308
37309# configure is writing to config.log, and then calls config.status.
37310# config.status does its own redirection, appending to config.log.
37311# Unfortunately, on DOS this fails, as config.log is still kept open
37312# by configure, so config.status won't be able to write to it; its
37313# output is simply discarded.  So we exec the FD to /dev/null,
37314# effectively closing config.log, so it can be properly (re)opened and
37315# appended to by config.status.  When coming back to configure, we
37316# need to make the FD available again.
37317if test "$no_create" != yes; then
37318  ac_cs_success=:
37319  ac_config_status_args=
37320  test "$silent" = yes &&
37321    ac_config_status_args="$ac_config_status_args --quiet"
37322  exec 5>/dev/null
37323  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37324  exec 5>>config.log
37325  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37326  # would make configure fail if this is the last instruction.
37327  $ac_cs_success || as_fn_exit 1
37328fi
37329if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37330  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37331$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37332fi
37333
37334
37335# Try to move the config.log file to the output directory.
37336if test -e ./config.log; then
37337  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37338fi
37339
37340# Make the compare script executable
37341$CHMOD +x $OUTPUT_ROOT/compare.sh
37342
37343# Finally output some useful information to the user
37344
37345  # Finally output some useful information to the user
37346
37347  if test "x$CCACHE_FOUND" != x; then
37348    if  test "x$HAS_GOOD_CCACHE" = x; then
37349      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37350      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37351    else
37352      CCACHE_STATUS="installed and in use"
37353    fi
37354  else
37355    if test "x$GCC" = xyes; then
37356      CCACHE_STATUS="not installed (consider installing)"
37357      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37358    else
37359      CCACHE_STATUS="not available for your system"
37360    fi
37361  fi
37362
37363  printf "\n"
37364  printf "====================================================\n"
37365  printf "A new configuration has been successfully created in\n"
37366  printf "$OUTPUT_ROOT\n"
37367  if test "x$CONFIGURE_COMMAND_LINE" != x; then
37368    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37369  else
37370    printf "using default settings.\n"
37371  fi
37372
37373  printf "\n"
37374  printf "Configuration summary:\n"
37375  printf "* Debug level:    $DEBUG_LEVEL\n"
37376  printf "* JDK variant:    $JDK_VARIANT\n"
37377  printf "* JVM variants:   $with_jvm_variants\n"
37378  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37379
37380  printf "\n"
37381  printf "Tools summary:\n"
37382  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37383    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37384  fi
37385  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37386  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37387  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37388
37389  printf "\n"
37390  printf "Build performance summary:\n"
37391  printf "* Cores to use:   $JOBS\n"
37392  printf "* Memory limit:   $MEMORY_SIZE MB\n"
37393  printf "* ccache status:  $CCACHE_STATUS\n"
37394  printf "\n"
37395
37396  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37397    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37398    printf "$CCACHE_HELP_MSG\n"
37399
37400  # Print a helpful message on how to acquire the necessary build dependency.
37401  # ccache is the help tag: freetype, cups, pulse, alsa etc
37402  MISSING_DEPENDENCY=ccache
37403
37404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37405    cygwin_help $MISSING_DEPENDENCY
37406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37407    msys_help $MISSING_DEPENDENCY
37408  else
37409    PKGHANDLER_COMMAND=
37410
37411    case $PKGHANDLER in
37412      apt-get)
37413        apt_help     $MISSING_DEPENDENCY ;;
37414      yum)
37415        yum_help     $MISSING_DEPENDENCY ;;
37416      port)
37417        port_help    $MISSING_DEPENDENCY ;;
37418      pkgutil)
37419        pkgutil_help $MISSING_DEPENDENCY ;;
37420      pkgadd)
37421        pkgadd_help  $MISSING_DEPENDENCY ;;
37422      * )
37423        break ;;
37424    esac
37425
37426    if test "x$PKGHANDLER_COMMAND" != x; then
37427      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37428    fi
37429  fi
37430
37431    printf "$HELP_MSG\n"
37432    printf "\n"
37433  fi
37434
37435  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37436    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37437    printf "will result in longer build times.\n"
37438    printf "\n"
37439  fi
37440
37441  if test "x$FOUND_ALT_VARIABLES" != "x"; then
37442    printf "WARNING: You have old-style ALT_ environment variables set.\n"
37443    printf "These are not respected, and will be ignored. It is recommended\n"
37444    printf "that you clean your environment. The following variables are set:\n"
37445    printf "$FOUND_ALT_VARIABLES\n"
37446    printf "\n"
37447  fi
37448
37449  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37450    printf "WARNING: Your build output directory is not on a local disk.\n"
37451    printf "This will severely degrade build performance!\n"
37452    printf "It is recommended that you create an output directory on a local disk,\n"
37453    printf "and run the configure script again from that directory.\n"
37454    printf "\n"
37455  fi
37456
37457  if test "x$IS_RECONFIGURE" = "xyes"; then
37458    printf "WARNING: The result of this configuration has overridden an older\n"
37459    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37460    printf "proper build. Failure to do so might result in strange build problems.\n"
37461    printf "\n"
37462  fi
37463
37464