generated-configure.sh revision 925:50669e45cec4
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=1389186094
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/make" ; 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 -e '3\.8[12]' -e '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 -e '3\.8[12]' -e '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 -e '3\.8[12]' -e '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 -e '3\.8[12]' -e '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 -e '3\.8[12]' -e '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/make/Makefile; then
16205      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
16206    fi
16207    if test -f $with_add_source_root/corba/make/Makefile; then
16208      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
16209    fi
16210    if test -f $with_add_source_root/jaxp/make/Makefile; then
16211      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
16212    fi
16213    if test -f $with_add_source_root/jaxws/make/Makefile; then
16214      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
16215    fi
16216    if test -f $with_add_source_root/hotspot/make/Makefile; then
16217      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
16218    fi
16219    if test -f $with_add_source_root/nashorn/make/Makefile; then
16220      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
16221    fi
16222    if test -f $with_add_source_root/jdk/make/Makefile; then
16223      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
16224    fi
16225  fi
16226
16227
16228  if test "x$with_override_source_root" != x; then
16229    if ! test -d $with_override_source_root; then
16230      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16231    fi
16232    CURDIR="$PWD"
16233    cd "$with_override_source_root"
16234    OVERRIDE_SRC_ROOT="`pwd`"
16235    cd "$CURDIR"
16236    if test -f $with_override_source_root/langtools/make/Makefile; then
16237      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
16238    fi
16239    if test -f $with_override_source_root/corba/make/Makefile; then
16240      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
16241    fi
16242    if test -f $with_override_source_root/jaxp/make/Makefile; then
16243      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
16244    fi
16245    if test -f $with_override_source_root/jaxws/make/Makefile; then
16246      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
16247    fi
16248    if test -f $with_override_source_root/hotspot/make/Makefile; then
16249      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
16250    fi
16251    if test -f $with_override_source_root/nashorn/make/Makefile; then
16252      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
16253    fi
16254    if test -f $with_override_source_root/jdk/make/Makefile; then
16255      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
16256    fi
16257  fi
16258
16259
16260  ###############################################################################
16261  #
16262  # Override a repo completely, this is used for example when you have 3 small
16263  # development sandboxes of the langtools sources and want to avoid having 3 full
16264  # OpenJDK sources checked out on disk.
16265  #
16266  # Assuming that the 3 langtools sandboxes are located here:
16267  # /home/fredrik/sandbox1/langtools
16268  # /home/fredrik/sandbox2/langtools
16269  # /home/fredrik/sandbox3/langtools
16270  #
16271  # From the source root you create build subdirs manually:
16272  #     mkdir -p build1 build2 build3
16273  # in each build directory run:
16274  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16275  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16276  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16277  #
16278
16279
16280# Check whether --with-override-langtools was given.
16281if test "${with_override_langtools+set}" = set; then :
16282  withval=$with_override_langtools;
16283fi
16284
16285
16286
16287# Check whether --with-override-corba was given.
16288if test "${with_override_corba+set}" = set; then :
16289  withval=$with_override_corba;
16290fi
16291
16292
16293
16294# Check whether --with-override-jaxp was given.
16295if test "${with_override_jaxp+set}" = set; then :
16296  withval=$with_override_jaxp;
16297fi
16298
16299
16300
16301# Check whether --with-override-jaxws was given.
16302if test "${with_override_jaxws+set}" = set; then :
16303  withval=$with_override_jaxws;
16304fi
16305
16306
16307
16308# Check whether --with-override-hotspot was given.
16309if test "${with_override_hotspot+set}" = set; then :
16310  withval=$with_override_hotspot;
16311fi
16312
16313
16314
16315# Check whether --with-override-nashorn was given.
16316if test "${with_override_nashorn+set}" = set; then :
16317  withval=$with_override_nashorn;
16318fi
16319
16320
16321
16322# Check whether --with-override-jdk was given.
16323if test "${with_override_jdk+set}" = set; then :
16324  withval=$with_override_jdk;
16325fi
16326
16327
16328  if test "x$with_override_langtools" != x; then
16329    CURDIR="$PWD"
16330    cd "$with_override_langtools"
16331    LANGTOOLS_TOPDIR="`pwd`"
16332    cd "$CURDIR"
16333    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16334      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16335    fi
16336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16337$as_echo_n "checking if langtools should be overridden... " >&6; }
16338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16339$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16340  fi
16341  if test "x$with_override_corba" != x; then
16342    CURDIR="$PWD"
16343    cd "$with_override_corba"
16344    CORBA_TOPDIR="`pwd`"
16345    cd "$CURDIR"
16346    if ! test -f $CORBA_TOPDIR/make/Makefile; then
16347      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16348    fi
16349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16350$as_echo_n "checking if corba should be overridden... " >&6; }
16351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16352$as_echo "yes with $CORBA_TOPDIR" >&6; }
16353  fi
16354  if test "x$with_override_jaxp" != x; then
16355    CURDIR="$PWD"
16356    cd "$with_override_jaxp"
16357    JAXP_TOPDIR="`pwd`"
16358    cd "$CURDIR"
16359    if ! test -f $JAXP_TOPDIR/make/Makefile; then
16360      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16361    fi
16362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16363$as_echo_n "checking if jaxp should be overridden... " >&6; }
16364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16365$as_echo "yes with $JAXP_TOPDIR" >&6; }
16366  fi
16367  if test "x$with_override_jaxws" != x; then
16368    CURDIR="$PWD"
16369    cd "$with_override_jaxws"
16370    JAXWS_TOPDIR="`pwd`"
16371    cd "$CURDIR"
16372    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16373      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16374    fi
16375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16376$as_echo_n "checking if jaxws should be overridden... " >&6; }
16377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16378$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16379  fi
16380  if test "x$with_override_hotspot" != x; then
16381    CURDIR="$PWD"
16382    cd "$with_override_hotspot"
16383    HOTSPOT_TOPDIR="`pwd`"
16384    cd "$CURDIR"
16385    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16386      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16387    fi
16388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16389$as_echo_n "checking if hotspot should be overridden... " >&6; }
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16391$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16392  fi
16393  if test "x$with_override_nashorn" != x; then
16394    CURDIR="$PWD"
16395    cd "$with_override_nashorn"
16396    NASHORN_TOPDIR="`pwd`"
16397    cd "$CURDIR"
16398    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16399      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16400    fi
16401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16402$as_echo_n "checking if nashorn should be overridden... " >&6; }
16403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16404$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16405  fi
16406  if test "x$with_override_jdk" != x; then
16407    CURDIR="$PWD"
16408    cd "$with_override_jdk"
16409    JDK_TOPDIR="`pwd`"
16410    cd "$CURDIR"
16411    if ! test -f $JDK_TOPDIR/make/Makefile; then
16412      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16413    fi
16414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16415$as_echo_n "checking if JDK should be overridden... " >&6; }
16416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16417$as_echo "yes with $JDK_TOPDIR" >&6; }
16418  fi
16419
16420
16421  BUILD_OUTPUT="$OUTPUT_ROOT"
16422
16423
16424  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16425  BUILD_HOTSPOT=true
16426
16427
16428
16429# Check whether --with-import-hotspot was given.
16430if test "${with_import_hotspot+set}" = set; then :
16431  withval=$with_import_hotspot;
16432fi
16433
16434  if test "x$with_import_hotspot" != x; then
16435    CURDIR="$PWD"
16436    cd "$with_import_hotspot"
16437    HOTSPOT_DIST="`pwd`"
16438    cd "$CURDIR"
16439    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16440      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16441    fi
16442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16443$as_echo_n "checking if hotspot should be imported... " >&6; }
16444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16445$as_echo "yes from $HOTSPOT_DIST" >&6; }
16446    BUILD_HOTSPOT=false
16447  fi
16448
16449  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16450
16451
16452###############################################################################
16453#
16454# Setup the toolchain (compilers etc), i.e. the tools that need to be
16455# cross-compilation aware.
16456#
16457###############################################################################
16458
16459
16460  ###############################################################################
16461  #
16462  # Configure the development tool paths and potential sysroot.
16463  #
16464  ac_ext=cpp
16465ac_cpp='$CXXCPP $CPPFLAGS'
16466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16469
16470
16471  # The option used to specify the target .o,.a or .so file.
16472  # When compiling, how to specify the to be created object file.
16473  CC_OUT_OPTION='-o$(SPACE)'
16474  # When linking, how to specify the to be created executable.
16475  EXE_OUT_OPTION='-o$(SPACE)'
16476  # When linking, how to specify the to be created dynamically linkable library.
16477  LD_OUT_OPTION='-o$(SPACE)'
16478  # When archiving, how to specify the to be create static archive for object files.
16479  AR_OUT_OPTION='rcs$(SPACE)'
16480
16481
16482
16483
16484
16485# Locate the actual tools
16486
16487
16488# Check whether --with-jtreg was given.
16489if test "${with_jtreg+set}" = set; then :
16490  withval=$with_jtreg;
16491else
16492  with_jtreg=no
16493fi
16494
16495
16496  if test "x$with_jtreg" = xno; then
16497    # jtreg disabled
16498    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16499$as_echo_n "checking for jtreg... " >&6; }
16500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16501$as_echo "no" >&6; }
16502  else
16503    if test "x$with_jtreg" != xyes; then
16504      # with path specified.
16505      JT_HOME="$with_jtreg"
16506    fi
16507
16508    if test "x$JT_HOME" != x; then
16509      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16510$as_echo_n "checking for jtreg... " >&6; }
16511
16512      # use JT_HOME enviroment var.
16513
16514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16515
16516  # Input might be given as Windows format, start by converting to
16517  # unix format.
16518  path="$JT_HOME"
16519  new_path=`$CYGPATH -u "$path"`
16520
16521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16524  # "foo.exe" is OK but "foo" is an error.
16525  #
16526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16527  # It is also a way to make sure we got the proper file name for the real test later on.
16528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16529  if test "x$test_shortpath" = x; then
16530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16531$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16532    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16533  fi
16534
16535  # Call helper function which possibly converts this using DOS-style short mode.
16536  # If so, the updated path is stored in $new_path.
16537
16538  input_path="$new_path"
16539  # Check if we need to convert this using DOS-style short mode. If the path
16540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16541  # take no chances and rewrite it.
16542  # Note: m4 eats our [], so we need to use [ and ] instead.
16543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16544  if test "x$has_forbidden_chars" != x; then
16545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16549      # Going to short mode and back again did indeed matter. Since short mode is
16550      # case insensitive, let's make it lowercase to improve readability.
16551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16552      # Now convert it back to Unix-stile (cygpath)
16553      input_path=`$CYGPATH -u "$shortmode_path"`
16554      new_path="$input_path"
16555    fi
16556  fi
16557
16558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16559  if test "x$test_cygdrive_prefix" = x; then
16560    # As a simple fix, exclude /usr/bin since it's not a real path.
16561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16563      # a path prefixed by /cygdrive for fixpath to work.
16564      new_path="$CYGWIN_ROOT_PATH$input_path"
16565    fi
16566  fi
16567
16568
16569  if test "x$path" != "x$new_path"; then
16570    JT_HOME="$new_path"
16571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16572$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16573  fi
16574
16575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16576
16577  path="$JT_HOME"
16578  has_colon=`$ECHO $path | $GREP ^.:`
16579  new_path="$path"
16580  if test "x$has_colon" = x; then
16581    # Not in mixed or Windows style, start by that.
16582    new_path=`cmd //c echo $path`
16583  fi
16584
16585
16586  input_path="$new_path"
16587  # Check if we need to convert this using DOS-style short mode. If the path
16588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16589  # take no chances and rewrite it.
16590  # Note: m4 eats our [], so we need to use [ and ] instead.
16591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16592  if test "x$has_forbidden_chars" != x; then
16593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16595  fi
16596
16597
16598  windows_path="$new_path"
16599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16600    unix_path=`$CYGPATH -u "$windows_path"`
16601    new_path="$unix_path"
16602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16604    new_path="$unix_path"
16605  fi
16606
16607  if test "x$path" != "x$new_path"; then
16608    JT_HOME="$new_path"
16609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16610$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16611  fi
16612
16613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16615
16616  else
16617    # We're on a posix platform. Hooray! :)
16618    path="$JT_HOME"
16619    has_space=`$ECHO "$path" | $GREP " "`
16620    if test "x$has_space" != x; then
16621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16622$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16624    fi
16625
16626    # Use eval to expand a potential ~
16627    eval path="$path"
16628    if test ! -f "$path" && test ! -d "$path"; then
16629      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16630    fi
16631
16632    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16633  fi
16634
16635
16636      # jtreg win32 script works for everybody
16637      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16638
16639      if test ! -f "$JTREGEXE"; then
16640        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16641      fi
16642
16643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16644$as_echo "$JTREGEXE" >&6; }
16645    else
16646      # try to find jtreg on path
16647
16648  for ac_prog in jtreg
16649do
16650  # Extract the first word of "$ac_prog", so it can be a program name with args.
16651set dummy $ac_prog; ac_word=$2
16652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16653$as_echo_n "checking for $ac_word... " >&6; }
16654if ${ac_cv_path_JTREGEXE+:} false; then :
16655  $as_echo_n "(cached) " >&6
16656else
16657  case $JTREGEXE in
16658  [\\/]* | ?:[\\/]*)
16659  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16660  ;;
16661  *)
16662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16663for as_dir in $PATH
16664do
16665  IFS=$as_save_IFS
16666  test -z "$as_dir" && as_dir=.
16667    for ac_exec_ext in '' $ac_executable_extensions; do
16668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16669    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16671    break 2
16672  fi
16673done
16674  done
16675IFS=$as_save_IFS
16676
16677  ;;
16678esac
16679fi
16680JTREGEXE=$ac_cv_path_JTREGEXE
16681if test -n "$JTREGEXE"; then
16682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16683$as_echo "$JTREGEXE" >&6; }
16684else
16685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16686$as_echo "no" >&6; }
16687fi
16688
16689
16690  test -n "$JTREGEXE" && break
16691done
16692
16693
16694  if test "x$JTREGEXE" = x; then
16695    if test "xjtreg" = x; then
16696      PROG_NAME=jtregexe
16697    else
16698      PROG_NAME=jtreg
16699    fi
16700    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16701$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16702    as_fn_error $? "Cannot continue" "$LINENO" 5
16703  fi
16704
16705
16706      JT_HOME="`$DIRNAME $JTREGEXE`"
16707    fi
16708  fi
16709
16710
16711
16712
16713
16714  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16715
16716  # Store path to cygwin link.exe to help excluding it when searching for
16717  # VS linker. This must be done before changing the PATH when looking for VS.
16718  # Extract the first word of "link", so it can be a program name with args.
16719set dummy link; ac_word=$2
16720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16721$as_echo_n "checking for $ac_word... " >&6; }
16722if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16723  $as_echo_n "(cached) " >&6
16724else
16725  case $CYGWIN_LINK in
16726  [\\/]* | ?:[\\/]*)
16727  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16728  ;;
16729  *)
16730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16731for as_dir in $PATH
16732do
16733  IFS=$as_save_IFS
16734  test -z "$as_dir" && as_dir=.
16735    for ac_exec_ext in '' $ac_executable_extensions; do
16736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16737    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16739    break 2
16740  fi
16741done
16742  done
16743IFS=$as_save_IFS
16744
16745  ;;
16746esac
16747fi
16748CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16749if test -n "$CYGWIN_LINK"; then
16750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16751$as_echo "$CYGWIN_LINK" >&6; }
16752else
16753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16754$as_echo "no" >&6; }
16755fi
16756
16757
16758  if test "x$CYGWIN_LINK" != x; then
16759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16760$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16761    "$CYGWIN_LINK" --version > /dev/null
16762    if test $? -eq 0 ; then
16763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16764$as_echo "yes" >&6; }
16765    else
16766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16767$as_echo "no" >&6; }
16768      # This might be the VS linker. Don't exclude it later on.
16769      CYGWIN_LINK=""
16770    fi
16771  fi
16772
16773  # First-hand choice is to locate and run the vsvars bat file.
16774
16775  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16776    VCVARSFILE="vc/bin/vcvars32.bat"
16777  else
16778    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16779  fi
16780
16781  VS_ENV_CMD=""
16782  VS_ENV_ARGS=""
16783  if test "x$with_toolsdir" != x; then
16784
16785  if test "x$VS_ENV_CMD" = x; then
16786    VS100BASE="$with_toolsdir/../.."
16787    METHOD="--with-tools-dir"
16788
16789  windows_path="$VS100BASE"
16790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16791    unix_path=`$CYGPATH -u "$windows_path"`
16792    VS100BASE="$unix_path"
16793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16795    VS100BASE="$unix_path"
16796  fi
16797
16798    if test -d "$VS100BASE"; then
16799      if test -f "$VS100BASE/$VCVARSFILE"; then
16800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16801$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16802        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16803      else
16804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16805$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16806        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16807$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16808      fi
16809    fi
16810  fi
16811
16812  fi
16813
16814  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16815    # Having specified an argument which is incorrect will produce an instant failure;
16816    # we should not go on looking
16817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16818$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16819    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16820$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16821    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16822  fi
16823
16824  if test "x$VS100COMNTOOLS" != x; then
16825
16826  if test "x$VS_ENV_CMD" = x; then
16827    VS100BASE="$VS100COMNTOOLS/../.."
16828    METHOD="VS100COMNTOOLS variable"
16829
16830  windows_path="$VS100BASE"
16831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16832    unix_path=`$CYGPATH -u "$windows_path"`
16833    VS100BASE="$unix_path"
16834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16836    VS100BASE="$unix_path"
16837  fi
16838
16839    if test -d "$VS100BASE"; then
16840      if test -f "$VS100BASE/$VCVARSFILE"; then
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16842$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16843        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16844      else
16845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16846$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16847        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16848$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16849      fi
16850    fi
16851  fi
16852
16853  fi
16854  if test "x$PROGRAMFILES" != x; then
16855
16856  if test "x$VS_ENV_CMD" = x; then
16857    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16858    METHOD="well-known name"
16859
16860  windows_path="$VS100BASE"
16861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16862    unix_path=`$CYGPATH -u "$windows_path"`
16863    VS100BASE="$unix_path"
16864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16866    VS100BASE="$unix_path"
16867  fi
16868
16869    if test -d "$VS100BASE"; then
16870      if test -f "$VS100BASE/$VCVARSFILE"; then
16871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16872$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16873        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16874      else
16875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16876$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16877        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16878$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16879      fi
16880    fi
16881  fi
16882
16883  fi
16884
16885  if test "x$VS_ENV_CMD" = x; then
16886    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16887    METHOD="well-known name"
16888
16889  windows_path="$VS100BASE"
16890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16891    unix_path=`$CYGPATH -u "$windows_path"`
16892    VS100BASE="$unix_path"
16893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16895    VS100BASE="$unix_path"
16896  fi
16897
16898    if test -d "$VS100BASE"; then
16899      if test -f "$VS100BASE/$VCVARSFILE"; then
16900        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16901$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16902        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16903      else
16904        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16905$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16906        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16907$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16908      fi
16909    fi
16910  fi
16911
16912
16913  if test "x$VS_ENV_CMD" = x; then
16914    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16915    METHOD="well-known name"
16916
16917  windows_path="$VS100BASE"
16918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16919    unix_path=`$CYGPATH -u "$windows_path"`
16920    VS100BASE="$unix_path"
16921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16923    VS100BASE="$unix_path"
16924  fi
16925
16926    if test -d "$VS100BASE"; then
16927      if test -f "$VS100BASE/$VCVARSFILE"; then
16928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16929$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16930        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16931      else
16932        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16933$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16934        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16935$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16936      fi
16937    fi
16938  fi
16939
16940
16941  if test "x$ProgramW6432" != x; then
16942
16943  if test "x$VS_ENV_CMD" = x; then
16944    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16945    METHOD="well-known name"
16946
16947  windows_path="$WIN_SDK_BASE"
16948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16949    unix_path=`$CYGPATH -u "$windows_path"`
16950    WIN_SDK_BASE="$unix_path"
16951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16953    WIN_SDK_BASE="$unix_path"
16954  fi
16955
16956    if test -d "$WIN_SDK_BASE"; then
16957      # There have been cases of partial or broken SDK installations. A missing
16958      # lib dir is not going to work.
16959      if test ! -d "$WIN_SDK_BASE/../lib"; then
16960        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16961$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16962        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16963$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16964      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16966$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16967        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16968        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16969          VS_ENV_ARGS="/x86"
16970        else
16971          VS_ENV_ARGS="/x64"
16972        fi
16973      else
16974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16975$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16976        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16977$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16978      fi
16979    fi
16980  fi
16981
16982  fi
16983  if test "x$PROGRAMW6432" != x; then
16984
16985  if test "x$VS_ENV_CMD" = x; then
16986    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16987    METHOD="well-known name"
16988
16989  windows_path="$WIN_SDK_BASE"
16990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991    unix_path=`$CYGPATH -u "$windows_path"`
16992    WIN_SDK_BASE="$unix_path"
16993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16995    WIN_SDK_BASE="$unix_path"
16996  fi
16997
16998    if test -d "$WIN_SDK_BASE"; then
16999      # There have been cases of partial or broken SDK installations. A missing
17000      # lib dir is not going to work.
17001      if test ! -d "$WIN_SDK_BASE/../lib"; then
17002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17003$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17004        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17005$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17006      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17008$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17009        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17010        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17011          VS_ENV_ARGS="/x86"
17012        else
17013          VS_ENV_ARGS="/x64"
17014        fi
17015      else
17016        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17017$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17018        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17019$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17020      fi
17021    fi
17022  fi
17023
17024  fi
17025  if test "x$PROGRAMFILES" != x; then
17026
17027  if test "x$VS_ENV_CMD" = x; then
17028    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17029    METHOD="well-known name"
17030
17031  windows_path="$WIN_SDK_BASE"
17032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17033    unix_path=`$CYGPATH -u "$windows_path"`
17034    WIN_SDK_BASE="$unix_path"
17035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17037    WIN_SDK_BASE="$unix_path"
17038  fi
17039
17040    if test -d "$WIN_SDK_BASE"; then
17041      # There have been cases of partial or broken SDK installations. A missing
17042      # lib dir is not going to work.
17043      if test ! -d "$WIN_SDK_BASE/../lib"; then
17044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17045$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17047$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17048      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17050$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17051        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17052        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17053          VS_ENV_ARGS="/x86"
17054        else
17055          VS_ENV_ARGS="/x64"
17056        fi
17057      else
17058        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17059$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17060        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17061$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17062      fi
17063    fi
17064  fi
17065
17066  fi
17067
17068  if test "x$VS_ENV_CMD" = x; then
17069    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17070    METHOD="well-known name"
17071
17072  windows_path="$WIN_SDK_BASE"
17073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17074    unix_path=`$CYGPATH -u "$windows_path"`
17075    WIN_SDK_BASE="$unix_path"
17076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17078    WIN_SDK_BASE="$unix_path"
17079  fi
17080
17081    if test -d "$WIN_SDK_BASE"; then
17082      # There have been cases of partial or broken SDK installations. A missing
17083      # lib dir is not going to work.
17084      if test ! -d "$WIN_SDK_BASE/../lib"; then
17085        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17086$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17087        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17088$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17089      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17090        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17091$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17092        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17093        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17094          VS_ENV_ARGS="/x86"
17095        else
17096          VS_ENV_ARGS="/x64"
17097        fi
17098      else
17099        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17100$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17101        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17102$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17103      fi
17104    fi
17105  fi
17106
17107
17108  if test "x$VS_ENV_CMD" = x; then
17109    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17110    METHOD="well-known name"
17111
17112  windows_path="$WIN_SDK_BASE"
17113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17114    unix_path=`$CYGPATH -u "$windows_path"`
17115    WIN_SDK_BASE="$unix_path"
17116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17118    WIN_SDK_BASE="$unix_path"
17119  fi
17120
17121    if test -d "$WIN_SDK_BASE"; then
17122      # There have been cases of partial or broken SDK installations. A missing
17123      # lib dir is not going to work.
17124      if test ! -d "$WIN_SDK_BASE/../lib"; then
17125        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17126$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17127        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17128$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17129      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17131$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17132        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17133        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17134          VS_ENV_ARGS="/x86"
17135        else
17136          VS_ENV_ARGS="/x64"
17137        fi
17138      else
17139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17142$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17143      fi
17144    fi
17145  fi
17146
17147
17148  if test "x$VS_ENV_CMD" != x; then
17149    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17150
17151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17152
17153  # First separate the path from the arguments. This will split at the first
17154  # space.
17155  complete="$VS_ENV_CMD"
17156  path="${complete%% *}"
17157  tmp="$complete EOL"
17158  arguments="${tmp#* }"
17159
17160  # Input might be given as Windows format, start by converting to
17161  # unix format.
17162  new_path=`$CYGPATH -u "$path"`
17163
17164  # Now try to locate executable using which
17165  new_path=`$WHICH "$new_path" 2> /dev/null`
17166  # bat and cmd files are not always considered executable in cygwin causing which
17167  # to not find them
17168  if test "x$new_path" = x \
17169      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17170      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17171    new_path=`$CYGPATH -u "$path"`
17172  fi
17173  if test "x$new_path" = x; then
17174    # Oops. Which didn't find the executable.
17175    # The splitting of arguments from the executable at a space might have been incorrect,
17176    # since paths with space are more likely in Windows. Give it another try with the whole
17177    # argument.
17178    path="$complete"
17179    arguments="EOL"
17180    new_path=`$CYGPATH -u "$path"`
17181    new_path=`$WHICH "$new_path" 2> /dev/null`
17182    # bat and cmd files are not always considered executable in cygwin causing which
17183    # to not find them
17184    if test "x$new_path" = x \
17185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17187      new_path=`$CYGPATH -u "$path"`
17188    fi
17189    if test "x$new_path" = x; then
17190      # It's still not found. Now this is an unrecoverable error.
17191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17192$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17193      has_space=`$ECHO "$complete" | $GREP " "`
17194      if test "x$has_space" != x; then
17195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17197      fi
17198      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17199    fi
17200  fi
17201
17202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17205  # "foo.exe" is OK but "foo" is an error.
17206  #
17207  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17208  # It is also a way to make sure we got the proper file name for the real test later on.
17209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17210  if test "x$test_shortpath" = x; then
17211    # Short path failed, file does not exist as specified.
17212    # Try adding .exe or .cmd
17213    if test -f "${new_path}.exe"; then
17214      input_to_shortpath="${new_path}.exe"
17215    elif test -f "${new_path}.cmd"; then
17216      input_to_shortpath="${new_path}.cmd"
17217    else
17218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17219$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17222      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17223    fi
17224  else
17225    input_to_shortpath="$new_path"
17226  fi
17227
17228  # Call helper function which possibly converts this using DOS-style short mode.
17229  # If so, the updated path is stored in $new_path.
17230  new_path="$input_to_shortpath"
17231
17232  input_path="$input_to_shortpath"
17233  # Check if we need to convert this using DOS-style short mode. If the path
17234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17235  # take no chances and rewrite it.
17236  # Note: m4 eats our [], so we need to use [ and ] instead.
17237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17238  if test "x$has_forbidden_chars" != x; then
17239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17243      # Going to short mode and back again did indeed matter. Since short mode is
17244      # case insensitive, let's make it lowercase to improve readability.
17245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17246      # Now convert it back to Unix-stile (cygpath)
17247      input_path=`$CYGPATH -u "$shortmode_path"`
17248      new_path="$input_path"
17249    fi
17250  fi
17251
17252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17253  if test "x$test_cygdrive_prefix" = x; then
17254    # As a simple fix, exclude /usr/bin since it's not a real path.
17255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17257      # a path prefixed by /cygdrive for fixpath to work.
17258      new_path="$CYGWIN_ROOT_PATH$input_path"
17259    fi
17260  fi
17261
17262  # remove trailing .exe if any
17263  new_path="${new_path/%.exe/}"
17264
17265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17266
17267  # First separate the path from the arguments. This will split at the first
17268  # space.
17269  complete="$VS_ENV_CMD"
17270  path="${complete%% *}"
17271  tmp="$complete EOL"
17272  arguments="${tmp#* }"
17273
17274  # Input might be given as Windows format, start by converting to
17275  # unix format.
17276  new_path="$path"
17277
17278  windows_path="$new_path"
17279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17280    unix_path=`$CYGPATH -u "$windows_path"`
17281    new_path="$unix_path"
17282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17284    new_path="$unix_path"
17285  fi
17286
17287
17288  # Now try to locate executable using which
17289  new_path=`$WHICH "$new_path" 2> /dev/null`
17290
17291  if test "x$new_path" = x; then
17292    # Oops. Which didn't find the executable.
17293    # The splitting of arguments from the executable at a space might have been incorrect,
17294    # since paths with space are more likely in Windows. Give it another try with the whole
17295    # argument.
17296    path="$complete"
17297    arguments="EOL"
17298    new_path="$path"
17299
17300  windows_path="$new_path"
17301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17302    unix_path=`$CYGPATH -u "$windows_path"`
17303    new_path="$unix_path"
17304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17306    new_path="$unix_path"
17307  fi
17308
17309
17310    new_path=`$WHICH "$new_path" 2> /dev/null`
17311
17312    if test "x$new_path" = x; then
17313      # It's still not found. Now this is an unrecoverable error.
17314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17315$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17316      has_space=`$ECHO "$complete" | $GREP " "`
17317      if test "x$has_space" != x; then
17318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17320      fi
17321      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17322    fi
17323  fi
17324
17325  # Now new_path has a complete unix path to the binary
17326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17327    # Keep paths in /bin as-is, but remove trailing .exe if any
17328    new_path="${new_path/%.exe/}"
17329    # Do not save /bin paths to all_fixpath_prefixes!
17330  else
17331    # Not in mixed or Windows style, start by that.
17332    new_path=`cmd //c echo $new_path`
17333
17334  input_path="$new_path"
17335  # Check if we need to convert this using DOS-style short mode. If the path
17336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17337  # take no chances and rewrite it.
17338  # Note: m4 eats our [], so we need to use [ and ] instead.
17339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17340  if test "x$has_forbidden_chars" != x; then
17341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17343  fi
17344
17345    # Output is in $new_path
17346
17347  windows_path="$new_path"
17348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17349    unix_path=`$CYGPATH -u "$windows_path"`
17350    new_path="$unix_path"
17351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17353    new_path="$unix_path"
17354  fi
17355
17356    # remove trailing .exe if any
17357    new_path="${new_path/%.exe/}"
17358
17359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17361  fi
17362
17363  else
17364    # We're on a posix platform. Hooray! :)
17365    # First separate the path from the arguments. This will split at the first
17366    # space.
17367    complete="$VS_ENV_CMD"
17368    path="${complete%% *}"
17369    tmp="$complete EOL"
17370    arguments="${tmp#* }"
17371
17372    # Cannot rely on the command "which" here since it doesn't always work.
17373    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17374    if test -z "$is_absolute_path"; then
17375      # Path to executable is not absolute. Find it.
17376      IFS_save="$IFS"
17377      IFS=:
17378      for p in $PATH; do
17379        if test -f "$p/$path" && test -x "$p/$path"; then
17380          new_path="$p/$path"
17381          break
17382        fi
17383      done
17384      IFS="$IFS_save"
17385    else
17386      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17387$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17388      new_path="$path"
17389    fi
17390
17391    if test "x$new_path" = x; then
17392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17393$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17394      has_space=`$ECHO "$complete" | $GREP " "`
17395      if test "x$has_space" != x; then
17396        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17398      fi
17399      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17400    fi
17401  fi
17402
17403  # Now join together the path and the arguments once again
17404  if test "x$arguments" != xEOL; then
17405    new_complete="$new_path ${arguments% *}"
17406  else
17407    new_complete="$new_path"
17408  fi
17409
17410  if test "x$complete" != "x$new_complete"; then
17411    VS_ENV_CMD="$new_complete"
17412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17413$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17414  fi
17415
17416
17417    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17418    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17419$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17420    cd $OUTPUT_ROOT
17421    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17422    # to autoconf standards.
17423
17424    #----
17425
17426    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17427    # but calculate the difference in Cygwin environment before/after running it and then
17428    # apply the diff.
17429
17430    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17431      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17432      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17433      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17434    else
17435      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17436      _dosbash=`cmd //c echo \`which bash\``
17437    fi
17438
17439    # generate the set of exported vars before/after the vs10 setup
17440    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17441    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17442    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17443    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17444
17445    # Now execute the newly created bat file.
17446    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17447    cmd /c localdevenvtmp.bat | cat
17448
17449    # apply the diff (less some non-vs10 vars named by "!")
17450    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17451    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17452    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17453
17454    # cleanup
17455    $RM localdevenvtmp*
17456    #----
17457    cd $CURDIR
17458    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17460$as_echo "no" >&6; }
17461      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17462$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17463      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17464$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17465      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17466$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17467      as_fn_error $? "Cannot continue" "$LINENO" 5
17468    fi
17469
17470    # Now set all paths and other env variables. This will allow the rest of
17471    # the configure script to find and run the compiler in the proper way.
17472    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17473$as_echo "$as_me: Setting extracted environment variables" >&6;}
17474    . $OUTPUT_ROOT/localdevenv.sh
17475  else
17476    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17477    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17478$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17479  fi
17480
17481  # At this point, we should have corrent variables in the environment, or we can't continue.
17482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17483$as_echo_n "checking for Visual Studio variables... " >&6; }
17484
17485  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17486    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17488$as_echo "present but broken" >&6; }
17489      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17490    else
17491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17492$as_echo "ok" >&6; }
17493      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17494      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17495      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17496      # Remove any paths containing # (typically F#) as that messes up make
17497      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17498      VS_PATH="$PATH"
17499
17500
17501
17502    fi
17503  else
17504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17505$as_echo "not found" >&6; }
17506
17507    if test "x$VS_ENV_CMD" = x; then
17508      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17509$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17510      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17511$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17512    else
17513      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17514$as_echo "$as_me: Running the extraction script failed." >&6;}
17515    fi
17516    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17517$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17518    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17519$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17520    as_fn_error $? "Cannot continue" "$LINENO" 5
17521  fi
17522
17523
17524
17525# Check whether --with-msvcr-dll was given.
17526if test "${with_msvcr_dll+set}" = set; then :
17527  withval=$with_msvcr_dll;
17528fi
17529
17530
17531  if test "x$with_msvcr_dll" != x; then
17532    # If given explicitely by user, do not probe. If not present, fail directly.
17533
17534  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17535  METHOD="--with-msvcr-dll"
17536  if test -e "$POSSIBLE_MSVCR_DLL"; then
17537    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17538$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17539
17540    # Need to check if the found msvcr is correct architecture
17541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17542$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17543    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17544    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17545      CORRECT_MSVCR_ARCH=386
17546    else
17547      CORRECT_MSVCR_ARCH=x86-64
17548    fi
17549    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17551$as_echo "ok" >&6; }
17552      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17554$as_echo_n "checking for msvcr100.dll... " >&6; }
17555      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17556$as_echo "$MSVCR_DLL" >&6; }
17557    else
17558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17559$as_echo "incorrect, ignoring" >&6; }
17560      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17561$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17562    fi
17563  fi
17564
17565    if test "x$MSVCR_DLL" = x; then
17566      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17567    fi
17568  fi
17569
17570  if test "x$MSVCR_DLL" = x; then
17571    # Probe: Using well-known location from Visual Studio 10.0
17572    if test "x$VCINSTALLDIR" != x; then
17573      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17574
17575  windows_path="$CYGWIN_VC_INSTALL_DIR"
17576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17577    unix_path=`$CYGPATH -u "$windows_path"`
17578    CYGWIN_VC_INSTALL_DIR="$unix_path"
17579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17581    CYGWIN_VC_INSTALL_DIR="$unix_path"
17582  fi
17583
17584      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17585        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17586      else
17587        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17588      fi
17589
17590  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17591  METHOD="well-known location in VCINSTALLDIR"
17592  if test -e "$POSSIBLE_MSVCR_DLL"; then
17593    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17594$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17595
17596    # Need to check if the found msvcr is correct architecture
17597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17598$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17599    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17600    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17601      CORRECT_MSVCR_ARCH=386
17602    else
17603      CORRECT_MSVCR_ARCH=x86-64
17604    fi
17605    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17607$as_echo "ok" >&6; }
17608      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17609      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17610$as_echo_n "checking for msvcr100.dll... " >&6; }
17611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17612$as_echo "$MSVCR_DLL" >&6; }
17613    else
17614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17615$as_echo "incorrect, ignoring" >&6; }
17616      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17617$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17618    fi
17619  fi
17620
17621    fi
17622  fi
17623
17624  if test "x$MSVCR_DLL" = x; then
17625    # Probe: Check in the Boot JDK directory.
17626    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17627
17628  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17629  METHOD="well-known location in Boot JDK"
17630  if test -e "$POSSIBLE_MSVCR_DLL"; then
17631    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17632$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17633
17634    # Need to check if the found msvcr is correct architecture
17635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17636$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17637    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17638    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17639      CORRECT_MSVCR_ARCH=386
17640    else
17641      CORRECT_MSVCR_ARCH=x86-64
17642    fi
17643    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17645$as_echo "ok" >&6; }
17646      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17648$as_echo_n "checking for msvcr100.dll... " >&6; }
17649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17650$as_echo "$MSVCR_DLL" >&6; }
17651    else
17652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17653$as_echo "incorrect, ignoring" >&6; }
17654      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17655$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17656    fi
17657  fi
17658
17659  fi
17660
17661  if test "x$MSVCR_DLL" = x; then
17662    # Probe: Look in the Windows system32 directory
17663    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17664
17665  windows_path="$CYGWIN_SYSTEMROOT"
17666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17667    unix_path=`$CYGPATH -u "$windows_path"`
17668    CYGWIN_SYSTEMROOT="$unix_path"
17669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17671    CYGWIN_SYSTEMROOT="$unix_path"
17672  fi
17673
17674    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17675
17676  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17677  METHOD="well-known location in SYSTEMROOT"
17678  if test -e "$POSSIBLE_MSVCR_DLL"; then
17679    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17680$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17681
17682    # Need to check if the found msvcr is correct architecture
17683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17684$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17685    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17686    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17687      CORRECT_MSVCR_ARCH=386
17688    else
17689      CORRECT_MSVCR_ARCH=x86-64
17690    fi
17691    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17693$as_echo "ok" >&6; }
17694      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17696$as_echo_n "checking for msvcr100.dll... " >&6; }
17697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17698$as_echo "$MSVCR_DLL" >&6; }
17699    else
17700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17701$as_echo "incorrect, ignoring" >&6; }
17702      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17703$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17704    fi
17705  fi
17706
17707  fi
17708
17709  if test "x$MSVCR_DLL" = x; then
17710    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17711    if test "x$VS100COMNTOOLS" != x; then
17712      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17713
17714  windows_path="$CYGWIN_VS_TOOLS_DIR"
17715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17716    unix_path=`$CYGPATH -u "$windows_path"`
17717    CYGWIN_VS_TOOLS_DIR="$unix_path"
17718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17720    CYGWIN_VS_TOOLS_DIR="$unix_path"
17721  fi
17722
17723      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17724        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17725      else
17726        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17727      fi
17728
17729  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17730  METHOD="search of VS100COMNTOOLS"
17731  if test -e "$POSSIBLE_MSVCR_DLL"; then
17732    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17733$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17734
17735    # Need to check if the found msvcr is correct architecture
17736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17737$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17738    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17739    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17740      CORRECT_MSVCR_ARCH=386
17741    else
17742      CORRECT_MSVCR_ARCH=x86-64
17743    fi
17744    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17746$as_echo "ok" >&6; }
17747      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17749$as_echo_n "checking for msvcr100.dll... " >&6; }
17750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17751$as_echo "$MSVCR_DLL" >&6; }
17752    else
17753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17754$as_echo "incorrect, ignoring" >&6; }
17755      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17756$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17757    fi
17758  fi
17759
17760    fi
17761  fi
17762
17763  if test "x$MSVCR_DLL" = x; then
17764    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17765    # (This was the original behaviour; kept since it might turn up something)
17766    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17767      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17768        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17769      else
17770        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17771        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17772          # We're grasping at straws now...
17773          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17774        fi
17775      fi
17776
17777
17778  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17779  METHOD="search of VCINSTALLDIR"
17780  if test -e "$POSSIBLE_MSVCR_DLL"; then
17781    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17782$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17783
17784    # Need to check if the found msvcr is correct architecture
17785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17786$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17787    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17788    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17789      CORRECT_MSVCR_ARCH=386
17790    else
17791      CORRECT_MSVCR_ARCH=x86-64
17792    fi
17793    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17795$as_echo "ok" >&6; }
17796      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17797      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17798$as_echo_n "checking for msvcr100.dll... " >&6; }
17799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17800$as_echo "$MSVCR_DLL" >&6; }
17801    else
17802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17803$as_echo "incorrect, ignoring" >&6; }
17804      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17805$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17806    fi
17807  fi
17808
17809    fi
17810  fi
17811
17812  if test "x$MSVCR_DLL" = x; then
17813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17814$as_echo_n "checking for msvcr100.dll... " >&6; }
17815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17816$as_echo "no" >&6; }
17817    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17818  fi
17819
17820
17821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17822
17823  # Input might be given as Windows format, start by converting to
17824  # unix format.
17825  path="$MSVCR_DLL"
17826  new_path=`$CYGPATH -u "$path"`
17827
17828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17831  # "foo.exe" is OK but "foo" is an error.
17832  #
17833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17834  # It is also a way to make sure we got the proper file name for the real test later on.
17835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17836  if test "x$test_shortpath" = x; then
17837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17838$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17839    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17840  fi
17841
17842  # Call helper function which possibly converts this using DOS-style short mode.
17843  # If so, the updated path is stored in $new_path.
17844
17845  input_path="$new_path"
17846  # Check if we need to convert this using DOS-style short mode. If the path
17847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17848  # take no chances and rewrite it.
17849  # Note: m4 eats our [], so we need to use [ and ] instead.
17850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17851  if test "x$has_forbidden_chars" != x; then
17852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17856      # Going to short mode and back again did indeed matter. Since short mode is
17857      # case insensitive, let's make it lowercase to improve readability.
17858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17859      # Now convert it back to Unix-stile (cygpath)
17860      input_path=`$CYGPATH -u "$shortmode_path"`
17861      new_path="$input_path"
17862    fi
17863  fi
17864
17865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17866  if test "x$test_cygdrive_prefix" = x; then
17867    # As a simple fix, exclude /usr/bin since it's not a real path.
17868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17870      # a path prefixed by /cygdrive for fixpath to work.
17871      new_path="$CYGWIN_ROOT_PATH$input_path"
17872    fi
17873  fi
17874
17875
17876  if test "x$path" != "x$new_path"; then
17877    MSVCR_DLL="$new_path"
17878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17879$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17880  fi
17881
17882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17883
17884  path="$MSVCR_DLL"
17885  has_colon=`$ECHO $path | $GREP ^.:`
17886  new_path="$path"
17887  if test "x$has_colon" = x; then
17888    # Not in mixed or Windows style, start by that.
17889    new_path=`cmd //c echo $path`
17890  fi
17891
17892
17893  input_path="$new_path"
17894  # Check if we need to convert this using DOS-style short mode. If the path
17895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17896  # take no chances and rewrite it.
17897  # Note: m4 eats our [], so we need to use [ and ] instead.
17898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17899  if test "x$has_forbidden_chars" != x; then
17900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17902  fi
17903
17904
17905  windows_path="$new_path"
17906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17907    unix_path=`$CYGPATH -u "$windows_path"`
17908    new_path="$unix_path"
17909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17911    new_path="$unix_path"
17912  fi
17913
17914  if test "x$path" != "x$new_path"; then
17915    MSVCR_DLL="$new_path"
17916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17917$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17918  fi
17919
17920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17922
17923  else
17924    # We're on a posix platform. Hooray! :)
17925    path="$MSVCR_DLL"
17926    has_space=`$ECHO "$path" | $GREP " "`
17927    if test "x$has_space" != x; then
17928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17929$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17930      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17931    fi
17932
17933    # Use eval to expand a potential ~
17934    eval path="$path"
17935    if test ! -f "$path" && test ! -d "$path"; then
17936      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17937    fi
17938
17939    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17940  fi
17941
17942
17943
17944
17945# Check whether --with-dxsdk was given.
17946if test "${with_dxsdk+set}" = set; then :
17947  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17948$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17949fi
17950
17951
17952
17953
17954# Check whether --with-dxsdk-lib was given.
17955if test "${with_dxsdk_lib+set}" = set; then :
17956  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17957$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17958fi
17959
17960
17961
17962
17963# Check whether --with-dxsdk-include was given.
17964if test "${with_dxsdk_include+set}" = set; then :
17965  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17966$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17967fi
17968
17969
17970  fi
17971
17972
17973
17974  # If --build AND --host is set, then the configure script will find any
17975  # cross compilation tools in the PATH. Cross compilation tools
17976  # follows the cross compilation standard where they are prefixed with ${host}.
17977  # For example the binary i686-sun-solaris2.10-gcc
17978  # will cross compile for i686-sun-solaris2.10
17979  # If neither of build and host is not set, then build=host and the
17980  # default compiler found in the path will be used.
17981  # Setting only --host, does not seem to be really supported.
17982  # Please set both --build and --host if you want to cross compile.
17983
17984  if test "x$COMPILE_TYPE" = "xcross"; then
17985    # Now we to find a C/C++ compiler that can build executables for the build
17986    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17987    # once. Also, we need to do this before adding a tools dir to the path,
17988    # otherwise we might pick up cross-compilers which don't use standard naming.
17989    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17990    # to wait until they are properly discovered.
17991    for ac_prog in cl cc gcc
17992do
17993  # Extract the first word of "$ac_prog", so it can be a program name with args.
17994set dummy $ac_prog; ac_word=$2
17995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17996$as_echo_n "checking for $ac_word... " >&6; }
17997if ${ac_cv_path_BUILD_CC+:} false; then :
17998  $as_echo_n "(cached) " >&6
17999else
18000  case $BUILD_CC in
18001  [\\/]* | ?:[\\/]*)
18002  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18003  ;;
18004  *)
18005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18006for as_dir in $PATH
18007do
18008  IFS=$as_save_IFS
18009  test -z "$as_dir" && as_dir=.
18010    for ac_exec_ext in '' $ac_executable_extensions; do
18011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18012    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18014    break 2
18015  fi
18016done
18017  done
18018IFS=$as_save_IFS
18019
18020  ;;
18021esac
18022fi
18023BUILD_CC=$ac_cv_path_BUILD_CC
18024if test -n "$BUILD_CC"; then
18025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18026$as_echo "$BUILD_CC" >&6; }
18027else
18028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18029$as_echo "no" >&6; }
18030fi
18031
18032
18033  test -n "$BUILD_CC" && break
18034done
18035
18036
18037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18038
18039  # First separate the path from the arguments. This will split at the first
18040  # space.
18041  complete="$BUILD_CC"
18042  path="${complete%% *}"
18043  tmp="$complete EOL"
18044  arguments="${tmp#* }"
18045
18046  # Input might be given as Windows format, start by converting to
18047  # unix format.
18048  new_path=`$CYGPATH -u "$path"`
18049
18050  # Now try to locate executable using which
18051  new_path=`$WHICH "$new_path" 2> /dev/null`
18052  # bat and cmd files are not always considered executable in cygwin causing which
18053  # to not find them
18054  if test "x$new_path" = x \
18055      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18056      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18057    new_path=`$CYGPATH -u "$path"`
18058  fi
18059  if test "x$new_path" = x; then
18060    # Oops. Which didn't find the executable.
18061    # The splitting of arguments from the executable at a space might have been incorrect,
18062    # since paths with space are more likely in Windows. Give it another try with the whole
18063    # argument.
18064    path="$complete"
18065    arguments="EOL"
18066    new_path=`$CYGPATH -u "$path"`
18067    new_path=`$WHICH "$new_path" 2> /dev/null`
18068    # bat and cmd files are not always considered executable in cygwin causing which
18069    # to not find them
18070    if test "x$new_path" = x \
18071        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18072        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18073      new_path=`$CYGPATH -u "$path"`
18074    fi
18075    if test "x$new_path" = x; then
18076      # It's still not found. Now this is an unrecoverable error.
18077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18078$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18079      has_space=`$ECHO "$complete" | $GREP " "`
18080      if test "x$has_space" != x; then
18081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18083      fi
18084      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18085    fi
18086  fi
18087
18088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18091  # "foo.exe" is OK but "foo" is an error.
18092  #
18093  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18094  # It is also a way to make sure we got the proper file name for the real test later on.
18095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18096  if test "x$test_shortpath" = x; then
18097    # Short path failed, file does not exist as specified.
18098    # Try adding .exe or .cmd
18099    if test -f "${new_path}.exe"; then
18100      input_to_shortpath="${new_path}.exe"
18101    elif test -f "${new_path}.cmd"; then
18102      input_to_shortpath="${new_path}.cmd"
18103    else
18104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18105$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18106      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18107$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18108      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18109    fi
18110  else
18111    input_to_shortpath="$new_path"
18112  fi
18113
18114  # Call helper function which possibly converts this using DOS-style short mode.
18115  # If so, the updated path is stored in $new_path.
18116  new_path="$input_to_shortpath"
18117
18118  input_path="$input_to_shortpath"
18119  # Check if we need to convert this using DOS-style short mode. If the path
18120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18121  # take no chances and rewrite it.
18122  # Note: m4 eats our [], so we need to use [ and ] instead.
18123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18124  if test "x$has_forbidden_chars" != x; then
18125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18129      # Going to short mode and back again did indeed matter. Since short mode is
18130      # case insensitive, let's make it lowercase to improve readability.
18131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18132      # Now convert it back to Unix-stile (cygpath)
18133      input_path=`$CYGPATH -u "$shortmode_path"`
18134      new_path="$input_path"
18135    fi
18136  fi
18137
18138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18139  if test "x$test_cygdrive_prefix" = x; then
18140    # As a simple fix, exclude /usr/bin since it's not a real path.
18141    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18143      # a path prefixed by /cygdrive for fixpath to work.
18144      new_path="$CYGWIN_ROOT_PATH$input_path"
18145    fi
18146  fi
18147
18148  # remove trailing .exe if any
18149  new_path="${new_path/%.exe/}"
18150
18151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18152
18153  # First separate the path from the arguments. This will split at the first
18154  # space.
18155  complete="$BUILD_CC"
18156  path="${complete%% *}"
18157  tmp="$complete EOL"
18158  arguments="${tmp#* }"
18159
18160  # Input might be given as Windows format, start by converting to
18161  # unix format.
18162  new_path="$path"
18163
18164  windows_path="$new_path"
18165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18166    unix_path=`$CYGPATH -u "$windows_path"`
18167    new_path="$unix_path"
18168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18170    new_path="$unix_path"
18171  fi
18172
18173
18174  # Now try to locate executable using which
18175  new_path=`$WHICH "$new_path" 2> /dev/null`
18176
18177  if test "x$new_path" = x; then
18178    # Oops. Which didn't find the executable.
18179    # The splitting of arguments from the executable at a space might have been incorrect,
18180    # since paths with space are more likely in Windows. Give it another try with the whole
18181    # argument.
18182    path="$complete"
18183    arguments="EOL"
18184    new_path="$path"
18185
18186  windows_path="$new_path"
18187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18188    unix_path=`$CYGPATH -u "$windows_path"`
18189    new_path="$unix_path"
18190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18192    new_path="$unix_path"
18193  fi
18194
18195
18196    new_path=`$WHICH "$new_path" 2> /dev/null`
18197
18198    if test "x$new_path" = x; then
18199      # It's still not found. Now this is an unrecoverable error.
18200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18201$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18202      has_space=`$ECHO "$complete" | $GREP " "`
18203      if test "x$has_space" != x; then
18204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18206      fi
18207      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18208    fi
18209  fi
18210
18211  # Now new_path has a complete unix path to the binary
18212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18213    # Keep paths in /bin as-is, but remove trailing .exe if any
18214    new_path="${new_path/%.exe/}"
18215    # Do not save /bin paths to all_fixpath_prefixes!
18216  else
18217    # Not in mixed or Windows style, start by that.
18218    new_path=`cmd //c echo $new_path`
18219
18220  input_path="$new_path"
18221  # Check if we need to convert this using DOS-style short mode. If the path
18222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18223  # take no chances and rewrite it.
18224  # Note: m4 eats our [], so we need to use [ and ] instead.
18225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18226  if test "x$has_forbidden_chars" != x; then
18227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18229  fi
18230
18231    # Output is in $new_path
18232
18233  windows_path="$new_path"
18234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18235    unix_path=`$CYGPATH -u "$windows_path"`
18236    new_path="$unix_path"
18237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18239    new_path="$unix_path"
18240  fi
18241
18242    # remove trailing .exe if any
18243    new_path="${new_path/%.exe/}"
18244
18245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18247  fi
18248
18249  else
18250    # We're on a posix platform. Hooray! :)
18251    # First separate the path from the arguments. This will split at the first
18252    # space.
18253    complete="$BUILD_CC"
18254    path="${complete%% *}"
18255    tmp="$complete EOL"
18256    arguments="${tmp#* }"
18257
18258    # Cannot rely on the command "which" here since it doesn't always work.
18259    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18260    if test -z "$is_absolute_path"; then
18261      # Path to executable is not absolute. Find it.
18262      IFS_save="$IFS"
18263      IFS=:
18264      for p in $PATH; do
18265        if test -f "$p/$path" && test -x "$p/$path"; then
18266          new_path="$p/$path"
18267          break
18268        fi
18269      done
18270      IFS="$IFS_save"
18271    else
18272      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18273$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18274      new_path="$path"
18275    fi
18276
18277    if test "x$new_path" = x; then
18278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18279$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18280      has_space=`$ECHO "$complete" | $GREP " "`
18281      if test "x$has_space" != x; then
18282        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18283$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18284      fi
18285      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18286    fi
18287  fi
18288
18289  # Now join together the path and the arguments once again
18290  if test "x$arguments" != xEOL; then
18291    new_complete="$new_path ${arguments% *}"
18292  else
18293    new_complete="$new_path"
18294  fi
18295
18296  if test "x$complete" != "x$new_complete"; then
18297    BUILD_CC="$new_complete"
18298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18299$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18300  fi
18301
18302    for ac_prog in cl CC g++
18303do
18304  # Extract the first word of "$ac_prog", so it can be a program name with args.
18305set dummy $ac_prog; ac_word=$2
18306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18307$as_echo_n "checking for $ac_word... " >&6; }
18308if ${ac_cv_path_BUILD_CXX+:} false; then :
18309  $as_echo_n "(cached) " >&6
18310else
18311  case $BUILD_CXX in
18312  [\\/]* | ?:[\\/]*)
18313  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18314  ;;
18315  *)
18316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18317for as_dir in $PATH
18318do
18319  IFS=$as_save_IFS
18320  test -z "$as_dir" && as_dir=.
18321    for ac_exec_ext in '' $ac_executable_extensions; do
18322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18323    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18325    break 2
18326  fi
18327done
18328  done
18329IFS=$as_save_IFS
18330
18331  ;;
18332esac
18333fi
18334BUILD_CXX=$ac_cv_path_BUILD_CXX
18335if test -n "$BUILD_CXX"; then
18336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18337$as_echo "$BUILD_CXX" >&6; }
18338else
18339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18340$as_echo "no" >&6; }
18341fi
18342
18343
18344  test -n "$BUILD_CXX" && break
18345done
18346
18347
18348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18349
18350  # First separate the path from the arguments. This will split at the first
18351  # space.
18352  complete="$BUILD_CXX"
18353  path="${complete%% *}"
18354  tmp="$complete EOL"
18355  arguments="${tmp#* }"
18356
18357  # Input might be given as Windows format, start by converting to
18358  # unix format.
18359  new_path=`$CYGPATH -u "$path"`
18360
18361  # Now try to locate executable using which
18362  new_path=`$WHICH "$new_path" 2> /dev/null`
18363  # bat and cmd files are not always considered executable in cygwin causing which
18364  # to not find them
18365  if test "x$new_path" = x \
18366      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18367      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18368    new_path=`$CYGPATH -u "$path"`
18369  fi
18370  if test "x$new_path" = x; then
18371    # Oops. Which didn't find the executable.
18372    # The splitting of arguments from the executable at a space might have been incorrect,
18373    # since paths with space are more likely in Windows. Give it another try with the whole
18374    # argument.
18375    path="$complete"
18376    arguments="EOL"
18377    new_path=`$CYGPATH -u "$path"`
18378    new_path=`$WHICH "$new_path" 2> /dev/null`
18379    # bat and cmd files are not always considered executable in cygwin causing which
18380    # to not find them
18381    if test "x$new_path" = x \
18382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18384      new_path=`$CYGPATH -u "$path"`
18385    fi
18386    if test "x$new_path" = x; then
18387      # It's still not found. Now this is an unrecoverable error.
18388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18389$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18390      has_space=`$ECHO "$complete" | $GREP " "`
18391      if test "x$has_space" != x; then
18392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18394      fi
18395      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18396    fi
18397  fi
18398
18399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18402  # "foo.exe" is OK but "foo" is an error.
18403  #
18404  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18405  # It is also a way to make sure we got the proper file name for the real test later on.
18406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18407  if test "x$test_shortpath" = x; then
18408    # Short path failed, file does not exist as specified.
18409    # Try adding .exe or .cmd
18410    if test -f "${new_path}.exe"; then
18411      input_to_shortpath="${new_path}.exe"
18412    elif test -f "${new_path}.cmd"; then
18413      input_to_shortpath="${new_path}.cmd"
18414    else
18415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18416$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18417      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18418$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18419      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18420    fi
18421  else
18422    input_to_shortpath="$new_path"
18423  fi
18424
18425  # Call helper function which possibly converts this using DOS-style short mode.
18426  # If so, the updated path is stored in $new_path.
18427  new_path="$input_to_shortpath"
18428
18429  input_path="$input_to_shortpath"
18430  # Check if we need to convert this using DOS-style short mode. If the path
18431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18432  # take no chances and rewrite it.
18433  # Note: m4 eats our [], so we need to use [ and ] instead.
18434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18435  if test "x$has_forbidden_chars" != x; then
18436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18440      # Going to short mode and back again did indeed matter. Since short mode is
18441      # case insensitive, let's make it lowercase to improve readability.
18442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18443      # Now convert it back to Unix-stile (cygpath)
18444      input_path=`$CYGPATH -u "$shortmode_path"`
18445      new_path="$input_path"
18446    fi
18447  fi
18448
18449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18450  if test "x$test_cygdrive_prefix" = x; then
18451    # As a simple fix, exclude /usr/bin since it's not a real path.
18452    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18454      # a path prefixed by /cygdrive for fixpath to work.
18455      new_path="$CYGWIN_ROOT_PATH$input_path"
18456    fi
18457  fi
18458
18459  # remove trailing .exe if any
18460  new_path="${new_path/%.exe/}"
18461
18462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18463
18464  # First separate the path from the arguments. This will split at the first
18465  # space.
18466  complete="$BUILD_CXX"
18467  path="${complete%% *}"
18468  tmp="$complete EOL"
18469  arguments="${tmp#* }"
18470
18471  # Input might be given as Windows format, start by converting to
18472  # unix format.
18473  new_path="$path"
18474
18475  windows_path="$new_path"
18476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18477    unix_path=`$CYGPATH -u "$windows_path"`
18478    new_path="$unix_path"
18479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18481    new_path="$unix_path"
18482  fi
18483
18484
18485  # Now try to locate executable using which
18486  new_path=`$WHICH "$new_path" 2> /dev/null`
18487
18488  if test "x$new_path" = x; then
18489    # Oops. Which didn't find the executable.
18490    # The splitting of arguments from the executable at a space might have been incorrect,
18491    # since paths with space are more likely in Windows. Give it another try with the whole
18492    # argument.
18493    path="$complete"
18494    arguments="EOL"
18495    new_path="$path"
18496
18497  windows_path="$new_path"
18498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18499    unix_path=`$CYGPATH -u "$windows_path"`
18500    new_path="$unix_path"
18501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18503    new_path="$unix_path"
18504  fi
18505
18506
18507    new_path=`$WHICH "$new_path" 2> /dev/null`
18508
18509    if test "x$new_path" = x; then
18510      # It's still not found. Now this is an unrecoverable error.
18511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18512$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18513      has_space=`$ECHO "$complete" | $GREP " "`
18514      if test "x$has_space" != x; then
18515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18517      fi
18518      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18519    fi
18520  fi
18521
18522  # Now new_path has a complete unix path to the binary
18523  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18524    # Keep paths in /bin as-is, but remove trailing .exe if any
18525    new_path="${new_path/%.exe/}"
18526    # Do not save /bin paths to all_fixpath_prefixes!
18527  else
18528    # Not in mixed or Windows style, start by that.
18529    new_path=`cmd //c echo $new_path`
18530
18531  input_path="$new_path"
18532  # Check if we need to convert this using DOS-style short mode. If the path
18533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18534  # take no chances and rewrite it.
18535  # Note: m4 eats our [], so we need to use [ and ] instead.
18536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18537  if test "x$has_forbidden_chars" != x; then
18538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18540  fi
18541
18542    # Output is in $new_path
18543
18544  windows_path="$new_path"
18545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18546    unix_path=`$CYGPATH -u "$windows_path"`
18547    new_path="$unix_path"
18548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18550    new_path="$unix_path"
18551  fi
18552
18553    # remove trailing .exe if any
18554    new_path="${new_path/%.exe/}"
18555
18556    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18557    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18558  fi
18559
18560  else
18561    # We're on a posix platform. Hooray! :)
18562    # First separate the path from the arguments. This will split at the first
18563    # space.
18564    complete="$BUILD_CXX"
18565    path="${complete%% *}"
18566    tmp="$complete EOL"
18567    arguments="${tmp#* }"
18568
18569    # Cannot rely on the command "which" here since it doesn't always work.
18570    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18571    if test -z "$is_absolute_path"; then
18572      # Path to executable is not absolute. Find it.
18573      IFS_save="$IFS"
18574      IFS=:
18575      for p in $PATH; do
18576        if test -f "$p/$path" && test -x "$p/$path"; then
18577          new_path="$p/$path"
18578          break
18579        fi
18580      done
18581      IFS="$IFS_save"
18582    else
18583      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18584$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18585      new_path="$path"
18586    fi
18587
18588    if test "x$new_path" = x; then
18589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18590$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18591      has_space=`$ECHO "$complete" | $GREP " "`
18592      if test "x$has_space" != x; then
18593        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18594$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18595      fi
18596      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18597    fi
18598  fi
18599
18600  # Now join together the path and the arguments once again
18601  if test "x$arguments" != xEOL; then
18602    new_complete="$new_path ${arguments% *}"
18603  else
18604    new_complete="$new_path"
18605  fi
18606
18607  if test "x$complete" != "x$new_complete"; then
18608    BUILD_CXX="$new_complete"
18609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18610$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18611  fi
18612
18613    # Extract the first word of "ld", so it can be a program name with args.
18614set dummy ld; ac_word=$2
18615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18616$as_echo_n "checking for $ac_word... " >&6; }
18617if ${ac_cv_path_BUILD_LD+:} false; then :
18618  $as_echo_n "(cached) " >&6
18619else
18620  case $BUILD_LD in
18621  [\\/]* | ?:[\\/]*)
18622  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18623  ;;
18624  *)
18625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18626for as_dir in $PATH
18627do
18628  IFS=$as_save_IFS
18629  test -z "$as_dir" && as_dir=.
18630    for ac_exec_ext in '' $ac_executable_extensions; do
18631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18632    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18634    break 2
18635  fi
18636done
18637  done
18638IFS=$as_save_IFS
18639
18640  ;;
18641esac
18642fi
18643BUILD_LD=$ac_cv_path_BUILD_LD
18644if test -n "$BUILD_LD"; then
18645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18646$as_echo "$BUILD_LD" >&6; }
18647else
18648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18649$as_echo "no" >&6; }
18650fi
18651
18652
18653
18654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18655
18656  # First separate the path from the arguments. This will split at the first
18657  # space.
18658  complete="$BUILD_LD"
18659  path="${complete%% *}"
18660  tmp="$complete EOL"
18661  arguments="${tmp#* }"
18662
18663  # Input might be given as Windows format, start by converting to
18664  # unix format.
18665  new_path=`$CYGPATH -u "$path"`
18666
18667  # Now try to locate executable using which
18668  new_path=`$WHICH "$new_path" 2> /dev/null`
18669  # bat and cmd files are not always considered executable in cygwin causing which
18670  # to not find them
18671  if test "x$new_path" = x \
18672      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18673      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18674    new_path=`$CYGPATH -u "$path"`
18675  fi
18676  if test "x$new_path" = x; then
18677    # Oops. Which didn't find the executable.
18678    # The splitting of arguments from the executable at a space might have been incorrect,
18679    # since paths with space are more likely in Windows. Give it another try with the whole
18680    # argument.
18681    path="$complete"
18682    arguments="EOL"
18683    new_path=`$CYGPATH -u "$path"`
18684    new_path=`$WHICH "$new_path" 2> /dev/null`
18685    # bat and cmd files are not always considered executable in cygwin causing which
18686    # to not find them
18687    if test "x$new_path" = x \
18688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18690      new_path=`$CYGPATH -u "$path"`
18691    fi
18692    if test "x$new_path" = x; then
18693      # It's still not found. Now this is an unrecoverable error.
18694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18695$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18696      has_space=`$ECHO "$complete" | $GREP " "`
18697      if test "x$has_space" != x; then
18698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18700      fi
18701      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18702    fi
18703  fi
18704
18705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18708  # "foo.exe" is OK but "foo" is an error.
18709  #
18710  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18711  # It is also a way to make sure we got the proper file name for the real test later on.
18712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18713  if test "x$test_shortpath" = x; then
18714    # Short path failed, file does not exist as specified.
18715    # Try adding .exe or .cmd
18716    if test -f "${new_path}.exe"; then
18717      input_to_shortpath="${new_path}.exe"
18718    elif test -f "${new_path}.cmd"; then
18719      input_to_shortpath="${new_path}.cmd"
18720    else
18721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18722$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18725      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18726    fi
18727  else
18728    input_to_shortpath="$new_path"
18729  fi
18730
18731  # Call helper function which possibly converts this using DOS-style short mode.
18732  # If so, the updated path is stored in $new_path.
18733  new_path="$input_to_shortpath"
18734
18735  input_path="$input_to_shortpath"
18736  # Check if we need to convert this using DOS-style short mode. If the path
18737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18738  # take no chances and rewrite it.
18739  # Note: m4 eats our [], so we need to use [ and ] instead.
18740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18741  if test "x$has_forbidden_chars" != x; then
18742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18746      # Going to short mode and back again did indeed matter. Since short mode is
18747      # case insensitive, let's make it lowercase to improve readability.
18748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18749      # Now convert it back to Unix-stile (cygpath)
18750      input_path=`$CYGPATH -u "$shortmode_path"`
18751      new_path="$input_path"
18752    fi
18753  fi
18754
18755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18756  if test "x$test_cygdrive_prefix" = x; then
18757    # As a simple fix, exclude /usr/bin since it's not a real path.
18758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18760      # a path prefixed by /cygdrive for fixpath to work.
18761      new_path="$CYGWIN_ROOT_PATH$input_path"
18762    fi
18763  fi
18764
18765  # remove trailing .exe if any
18766  new_path="${new_path/%.exe/}"
18767
18768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18769
18770  # First separate the path from the arguments. This will split at the first
18771  # space.
18772  complete="$BUILD_LD"
18773  path="${complete%% *}"
18774  tmp="$complete EOL"
18775  arguments="${tmp#* }"
18776
18777  # Input might be given as Windows format, start by converting to
18778  # unix format.
18779  new_path="$path"
18780
18781  windows_path="$new_path"
18782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783    unix_path=`$CYGPATH -u "$windows_path"`
18784    new_path="$unix_path"
18785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18787    new_path="$unix_path"
18788  fi
18789
18790
18791  # Now try to locate executable using which
18792  new_path=`$WHICH "$new_path" 2> /dev/null`
18793
18794  if test "x$new_path" = x; then
18795    # Oops. Which didn't find the executable.
18796    # The splitting of arguments from the executable at a space might have been incorrect,
18797    # since paths with space are more likely in Windows. Give it another try with the whole
18798    # argument.
18799    path="$complete"
18800    arguments="EOL"
18801    new_path="$path"
18802
18803  windows_path="$new_path"
18804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18805    unix_path=`$CYGPATH -u "$windows_path"`
18806    new_path="$unix_path"
18807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18809    new_path="$unix_path"
18810  fi
18811
18812
18813    new_path=`$WHICH "$new_path" 2> /dev/null`
18814
18815    if test "x$new_path" = x; then
18816      # It's still not found. Now this is an unrecoverable error.
18817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18818$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18819      has_space=`$ECHO "$complete" | $GREP " "`
18820      if test "x$has_space" != x; then
18821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18823      fi
18824      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18825    fi
18826  fi
18827
18828  # Now new_path has a complete unix path to the binary
18829  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18830    # Keep paths in /bin as-is, but remove trailing .exe if any
18831    new_path="${new_path/%.exe/}"
18832    # Do not save /bin paths to all_fixpath_prefixes!
18833  else
18834    # Not in mixed or Windows style, start by that.
18835    new_path=`cmd //c echo $new_path`
18836
18837  input_path="$new_path"
18838  # Check if we need to convert this using DOS-style short mode. If the path
18839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18840  # take no chances and rewrite it.
18841  # Note: m4 eats our [], so we need to use [ and ] instead.
18842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18843  if test "x$has_forbidden_chars" != x; then
18844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18846  fi
18847
18848    # Output is in $new_path
18849
18850  windows_path="$new_path"
18851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18852    unix_path=`$CYGPATH -u "$windows_path"`
18853    new_path="$unix_path"
18854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18856    new_path="$unix_path"
18857  fi
18858
18859    # remove trailing .exe if any
18860    new_path="${new_path/%.exe/}"
18861
18862    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18863    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18864  fi
18865
18866  else
18867    # We're on a posix platform. Hooray! :)
18868    # First separate the path from the arguments. This will split at the first
18869    # space.
18870    complete="$BUILD_LD"
18871    path="${complete%% *}"
18872    tmp="$complete EOL"
18873    arguments="${tmp#* }"
18874
18875    # Cannot rely on the command "which" here since it doesn't always work.
18876    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18877    if test -z "$is_absolute_path"; then
18878      # Path to executable is not absolute. Find it.
18879      IFS_save="$IFS"
18880      IFS=:
18881      for p in $PATH; do
18882        if test -f "$p/$path" && test -x "$p/$path"; then
18883          new_path="$p/$path"
18884          break
18885        fi
18886      done
18887      IFS="$IFS_save"
18888    else
18889      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18890$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18891      new_path="$path"
18892    fi
18893
18894    if test "x$new_path" = x; then
18895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18896$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18897      has_space=`$ECHO "$complete" | $GREP " "`
18898      if test "x$has_space" != x; then
18899        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18900$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18901      fi
18902      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18903    fi
18904  fi
18905
18906  # Now join together the path and the arguments once again
18907  if test "x$arguments" != xEOL; then
18908    new_complete="$new_path ${arguments% *}"
18909  else
18910    new_complete="$new_path"
18911  fi
18912
18913  if test "x$complete" != "x$new_complete"; then
18914    BUILD_LD="$new_complete"
18915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18916$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18917  fi
18918
18919  fi
18920
18921
18922
18923
18924  # If a devkit is found on the builddeps server, then prepend its path to the
18925  # PATH variable. If there are cross compilers available in the devkit, these
18926  # will be found by AC_PROG_CC et al.
18927  DEVKIT=
18928
18929
18930  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18931    # Source the builddeps file again, to make sure it uses the latest variables!
18932    . $builddepsfile
18933    # Look for a target and build machine specific resource!
18934    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18935    if test "x$resource" = x; then
18936      # Ok, lets instead look for a target specific resource
18937      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18938    fi
18939    if test "x$resource" = x; then
18940      # Ok, lets instead look for a build specific resource
18941      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18942    fi
18943    if test "x$resource" = x; then
18944      # Ok, lets instead look for a generic resource
18945      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18946      resource=${builddep_devkit}
18947    fi
18948    if test "x$resource" != x; then
18949      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18950$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18951      # If the resource in the builddeps.conf file is an existing directory,
18952      # for example /java/linux/cups
18953      if test -d ${resource}; then
18954        depdir=${resource}
18955      else
18956
18957  # devkit is for example mymodule
18958  # $resource is for example libs/general/libmymod_1_2_3.zip
18959  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18960  # $with_builddeps_dir is for example /localhome/builddeps
18961  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18962  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18963  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18964  filename=`basename $resource`
18965  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18966  filebase=${filename%%.*}
18967  extension=${filename#*.}
18968  installdir=$with_builddeps_dir/$filebase
18969  if test ! -f $installdir/$filename.unpacked; then
18970    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18971$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18972    if test ! -d $installdir; then
18973      mkdir -p $installdir
18974    fi
18975    if test ! -d $installdir; then
18976      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18977    fi
18978    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18979    touch $tmpfile
18980    if test ! -f $tmpfile; then
18981      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18982    fi
18983
18984  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18985  # $tmpfile is the local file name for the downloaded file.
18986  VALID_TOOL=no
18987  if test "x$BDEPS_FTP" = xwget; then
18988    VALID_TOOL=yes
18989    wget -O $tmpfile $with_builddeps_server/$resource
18990  fi
18991  if test "x$BDEPS_FTP" = xlftp; then
18992    VALID_TOOL=yes
18993    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18994  fi
18995  if test "x$BDEPS_FTP" = xftp; then
18996    VALID_TOOL=yes
18997    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18998    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18999    FTPUSERPWD=${FTPSERVER%%@*}
19000    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19001      FTPUSER=${userpwd%%:*}
19002      FTPPWD=${userpwd#*@}
19003      FTPSERVER=${FTPSERVER#*@}
19004    else
19005      FTPUSER=ftp
19006      FTPPWD=ftp
19007    fi
19008    # the "pass" command does not work on some
19009    # ftp clients (read ftp.exe) but if it works,
19010    # passive mode is better!
19011    ( \
19012        echo "user $FTPUSER $FTPPWD"        ; \
19013        echo "pass"                         ; \
19014        echo "bin"                          ; \
19015        echo "get $FTPPATH $tmpfile"              ; \
19016    ) | ftp -in $FTPSERVER
19017  fi
19018  if test "x$VALID_TOOL" != xyes; then
19019    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19020  fi
19021
19022    mv $tmpfile $installdir/$filename
19023    if test ! -s $installdir/$filename; then
19024      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19025    fi
19026    case "$extension" in
19027      zip)  echo "Unzipping $installdir/$filename..."
19028        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19029        ;;
19030      tar.gz) echo "Untaring $installdir/$filename..."
19031        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19032        ;;
19033      tgz) echo "Untaring $installdir/$filename..."
19034        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19035        ;;
19036      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19037        ;;
19038    esac
19039  fi
19040  if test -f $installdir/$filename.unpacked; then
19041    depdir=$installdir
19042  fi
19043
19044      fi
19045      # Source the builddeps file again, because in the previous command, the depdir
19046      # was updated to point at the current build dependency install directory.
19047      . $builddepsfile
19048      # Now extract variables from the builddeps.conf files.
19049      theroot=${builddep_devkit_ROOT}
19050      thecflags=${builddep_devkit_CFLAGS}
19051      thelibs=${builddep_devkit_LIBS}
19052      if test "x$depdir" = x; then
19053        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19054      fi
19055      DEVKIT=$depdir
19056      if test "x$theroot" != x; then
19057        DEVKIT="$theroot"
19058      fi
19059      if test "x$thecflags" != x; then
19060        DEVKIT_CFLAGS="$thecflags"
19061      fi
19062      if test "x$thelibs" != x; then
19063        DEVKIT_LIBS="$thelibs"
19064      fi
19065
19066        # Found devkit
19067        PATH="$DEVKIT/bin:$PATH"
19068        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19069        if test "x$x_includes" = "xNONE"; then
19070          x_includes="$SYS_ROOT/usr/include/X11"
19071        fi
19072        if test "x$x_libraries" = "xNONE"; then
19073          x_libraries="$SYS_ROOT/usr/lib"
19074        fi
19075
19076
19077    fi
19078
19079  fi
19080
19081
19082  # Store the CFLAGS etal passed to the configure script.
19083  ORG_CFLAGS="$CFLAGS"
19084  ORG_CXXFLAGS="$CXXFLAGS"
19085  ORG_OBJCFLAGS="$OBJCFLAGS"
19086
19087  # autoconf magic only relies on PATH, so update it if tools dir is specified
19088  OLD_PATH="$PATH"
19089  if test "x$TOOLS_DIR" != x; then
19090    PATH=$TOOLS_DIR:$PATH
19091  fi
19092
19093
19094  ### Locate C compiler (CC)
19095
19096  # On windows, only cl.exe is supported.
19097  # On Solaris, cc is preferred to gcc.
19098  # Elsewhere, gcc is preferred to cc.
19099
19100  if test "x$CC" != x; then
19101    COMPILER_CHECK_LIST="$CC"
19102  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19103    COMPILER_CHECK_LIST="cl"
19104  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19105    COMPILER_CHECK_LIST="cc gcc"
19106  else
19107    COMPILER_CHECK_LIST="gcc cc"
19108  fi
19109
19110
19111  COMPILER_NAME=C
19112
19113  CC=
19114  # If TOOLS_DIR is set, check for all compiler names in there first
19115  # before checking the rest of the PATH.
19116  if test -n "$TOOLS_DIR"; then
19117    PATH_save="$PATH"
19118    PATH="$TOOLS_DIR"
19119    for ac_prog in $COMPILER_CHECK_LIST
19120do
19121  # Extract the first word of "$ac_prog", so it can be a program name with args.
19122set dummy $ac_prog; ac_word=$2
19123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19124$as_echo_n "checking for $ac_word... " >&6; }
19125if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19126  $as_echo_n "(cached) " >&6
19127else
19128  case $TOOLS_DIR_CC in
19129  [\\/]* | ?:[\\/]*)
19130  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19131  ;;
19132  *)
19133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19134for as_dir in $PATH
19135do
19136  IFS=$as_save_IFS
19137  test -z "$as_dir" && as_dir=.
19138    for ac_exec_ext in '' $ac_executable_extensions; do
19139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19140    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19142    break 2
19143  fi
19144done
19145  done
19146IFS=$as_save_IFS
19147
19148  ;;
19149esac
19150fi
19151TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19152if test -n "$TOOLS_DIR_CC"; then
19153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19154$as_echo "$TOOLS_DIR_CC" >&6; }
19155else
19156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19157$as_echo "no" >&6; }
19158fi
19159
19160
19161  test -n "$TOOLS_DIR_CC" && break
19162done
19163
19164    CC=$TOOLS_DIR_CC
19165    PATH="$PATH_save"
19166  fi
19167
19168  # AC_PATH_PROGS can't be run multiple times with the same variable,
19169  # so create a new name for this run.
19170  if test "x$CC" = x; then
19171    for ac_prog in $COMPILER_CHECK_LIST
19172do
19173  # Extract the first word of "$ac_prog", so it can be a program name with args.
19174set dummy $ac_prog; ac_word=$2
19175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19176$as_echo_n "checking for $ac_word... " >&6; }
19177if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19178  $as_echo_n "(cached) " >&6
19179else
19180  case $POTENTIAL_CC in
19181  [\\/]* | ?:[\\/]*)
19182  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19183  ;;
19184  *)
19185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19186for as_dir in $PATH
19187do
19188  IFS=$as_save_IFS
19189  test -z "$as_dir" && as_dir=.
19190    for ac_exec_ext in '' $ac_executable_extensions; do
19191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19192    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19194    break 2
19195  fi
19196done
19197  done
19198IFS=$as_save_IFS
19199
19200  ;;
19201esac
19202fi
19203POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19204if test -n "$POTENTIAL_CC"; then
19205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19206$as_echo "$POTENTIAL_CC" >&6; }
19207else
19208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19209$as_echo "no" >&6; }
19210fi
19211
19212
19213  test -n "$POTENTIAL_CC" && break
19214done
19215
19216    CC=$POTENTIAL_CC
19217  fi
19218
19219  if test "x$CC" = x; then
19220
19221  # Print a helpful message on how to acquire the necessary build dependency.
19222  # devkit is the help tag: freetype, cups, pulse, alsa etc
19223  MISSING_DEPENDENCY=devkit
19224
19225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19226    cygwin_help $MISSING_DEPENDENCY
19227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19228    msys_help $MISSING_DEPENDENCY
19229  else
19230    PKGHANDLER_COMMAND=
19231
19232    case $PKGHANDLER in
19233      apt-get)
19234        apt_help     $MISSING_DEPENDENCY ;;
19235      yum)
19236        yum_help     $MISSING_DEPENDENCY ;;
19237      port)
19238        port_help    $MISSING_DEPENDENCY ;;
19239      pkgutil)
19240        pkgutil_help $MISSING_DEPENDENCY ;;
19241      pkgadd)
19242        pkgadd_help  $MISSING_DEPENDENCY ;;
19243      * )
19244        break ;;
19245    esac
19246
19247    if test "x$PKGHANDLER_COMMAND" != x; then
19248      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19249    fi
19250  fi
19251
19252    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19253  fi
19254
19255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19256
19257  # First separate the path from the arguments. This will split at the first
19258  # space.
19259  complete="$CC"
19260  path="${complete%% *}"
19261  tmp="$complete EOL"
19262  arguments="${tmp#* }"
19263
19264  # Input might be given as Windows format, start by converting to
19265  # unix format.
19266  new_path=`$CYGPATH -u "$path"`
19267
19268  # Now try to locate executable using which
19269  new_path=`$WHICH "$new_path" 2> /dev/null`
19270  # bat and cmd files are not always considered executable in cygwin causing which
19271  # to not find them
19272  if test "x$new_path" = x \
19273      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19274      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19275    new_path=`$CYGPATH -u "$path"`
19276  fi
19277  if test "x$new_path" = x; then
19278    # Oops. Which didn't find the executable.
19279    # The splitting of arguments from the executable at a space might have been incorrect,
19280    # since paths with space are more likely in Windows. Give it another try with the whole
19281    # argument.
19282    path="$complete"
19283    arguments="EOL"
19284    new_path=`$CYGPATH -u "$path"`
19285    new_path=`$WHICH "$new_path" 2> /dev/null`
19286    # bat and cmd files are not always considered executable in cygwin causing which
19287    # to not find them
19288    if test "x$new_path" = x \
19289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19291      new_path=`$CYGPATH -u "$path"`
19292    fi
19293    if test "x$new_path" = x; then
19294      # It's still not found. Now this is an unrecoverable error.
19295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19296$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19297      has_space=`$ECHO "$complete" | $GREP " "`
19298      if test "x$has_space" != x; then
19299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19301      fi
19302      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19303    fi
19304  fi
19305
19306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19309  # "foo.exe" is OK but "foo" is an error.
19310  #
19311  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19312  # It is also a way to make sure we got the proper file name for the real test later on.
19313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19314  if test "x$test_shortpath" = x; then
19315    # Short path failed, file does not exist as specified.
19316    # Try adding .exe or .cmd
19317    if test -f "${new_path}.exe"; then
19318      input_to_shortpath="${new_path}.exe"
19319    elif test -f "${new_path}.cmd"; then
19320      input_to_shortpath="${new_path}.cmd"
19321    else
19322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19323$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19326      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19327    fi
19328  else
19329    input_to_shortpath="$new_path"
19330  fi
19331
19332  # Call helper function which possibly converts this using DOS-style short mode.
19333  # If so, the updated path is stored in $new_path.
19334  new_path="$input_to_shortpath"
19335
19336  input_path="$input_to_shortpath"
19337  # Check if we need to convert this using DOS-style short mode. If the path
19338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19339  # take no chances and rewrite it.
19340  # Note: m4 eats our [], so we need to use [ and ] instead.
19341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19342  if test "x$has_forbidden_chars" != x; then
19343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19347      # Going to short mode and back again did indeed matter. Since short mode is
19348      # case insensitive, let's make it lowercase to improve readability.
19349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19350      # Now convert it back to Unix-stile (cygpath)
19351      input_path=`$CYGPATH -u "$shortmode_path"`
19352      new_path="$input_path"
19353    fi
19354  fi
19355
19356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19357  if test "x$test_cygdrive_prefix" = x; then
19358    # As a simple fix, exclude /usr/bin since it's not a real path.
19359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19361      # a path prefixed by /cygdrive for fixpath to work.
19362      new_path="$CYGWIN_ROOT_PATH$input_path"
19363    fi
19364  fi
19365
19366  # remove trailing .exe if any
19367  new_path="${new_path/%.exe/}"
19368
19369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19370
19371  # First separate the path from the arguments. This will split at the first
19372  # space.
19373  complete="$CC"
19374  path="${complete%% *}"
19375  tmp="$complete EOL"
19376  arguments="${tmp#* }"
19377
19378  # Input might be given as Windows format, start by converting to
19379  # unix format.
19380  new_path="$path"
19381
19382  windows_path="$new_path"
19383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19384    unix_path=`$CYGPATH -u "$windows_path"`
19385    new_path="$unix_path"
19386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19388    new_path="$unix_path"
19389  fi
19390
19391
19392  # Now try to locate executable using which
19393  new_path=`$WHICH "$new_path" 2> /dev/null`
19394
19395  if test "x$new_path" = x; then
19396    # Oops. Which didn't find the executable.
19397    # The splitting of arguments from the executable at a space might have been incorrect,
19398    # since paths with space are more likely in Windows. Give it another try with the whole
19399    # argument.
19400    path="$complete"
19401    arguments="EOL"
19402    new_path="$path"
19403
19404  windows_path="$new_path"
19405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19406    unix_path=`$CYGPATH -u "$windows_path"`
19407    new_path="$unix_path"
19408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19410    new_path="$unix_path"
19411  fi
19412
19413
19414    new_path=`$WHICH "$new_path" 2> /dev/null`
19415
19416    if test "x$new_path" = x; then
19417      # It's still not found. Now this is an unrecoverable error.
19418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19419$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19420      has_space=`$ECHO "$complete" | $GREP " "`
19421      if test "x$has_space" != x; then
19422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19424      fi
19425      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19426    fi
19427  fi
19428
19429  # Now new_path has a complete unix path to the binary
19430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19431    # Keep paths in /bin as-is, but remove trailing .exe if any
19432    new_path="${new_path/%.exe/}"
19433    # Do not save /bin paths to all_fixpath_prefixes!
19434  else
19435    # Not in mixed or Windows style, start by that.
19436    new_path=`cmd //c echo $new_path`
19437
19438  input_path="$new_path"
19439  # Check if we need to convert this using DOS-style short mode. If the path
19440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19441  # take no chances and rewrite it.
19442  # Note: m4 eats our [], so we need to use [ and ] instead.
19443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19444  if test "x$has_forbidden_chars" != x; then
19445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19447  fi
19448
19449    # Output is in $new_path
19450
19451  windows_path="$new_path"
19452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19453    unix_path=`$CYGPATH -u "$windows_path"`
19454    new_path="$unix_path"
19455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19457    new_path="$unix_path"
19458  fi
19459
19460    # remove trailing .exe if any
19461    new_path="${new_path/%.exe/}"
19462
19463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19465  fi
19466
19467  else
19468    # We're on a posix platform. Hooray! :)
19469    # First separate the path from the arguments. This will split at the first
19470    # space.
19471    complete="$CC"
19472    path="${complete%% *}"
19473    tmp="$complete EOL"
19474    arguments="${tmp#* }"
19475
19476    # Cannot rely on the command "which" here since it doesn't always work.
19477    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19478    if test -z "$is_absolute_path"; then
19479      # Path to executable is not absolute. Find it.
19480      IFS_save="$IFS"
19481      IFS=:
19482      for p in $PATH; do
19483        if test -f "$p/$path" && test -x "$p/$path"; then
19484          new_path="$p/$path"
19485          break
19486        fi
19487      done
19488      IFS="$IFS_save"
19489    else
19490      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19491$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19492      new_path="$path"
19493    fi
19494
19495    if test "x$new_path" = x; then
19496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19497$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19498      has_space=`$ECHO "$complete" | $GREP " "`
19499      if test "x$has_space" != x; then
19500        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19502      fi
19503      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19504    fi
19505  fi
19506
19507  # Now join together the path and the arguments once again
19508  if test "x$arguments" != xEOL; then
19509    new_complete="$new_path ${arguments% *}"
19510  else
19511    new_complete="$new_path"
19512  fi
19513
19514  if test "x$complete" != "x$new_complete"; then
19515    CC="$new_complete"
19516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19517$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19518  fi
19519
19520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19521$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19522  TEST_COMPILER="$CC"
19523
19524  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19525    # Follow a chain of symbolic links. Use readlink
19526    # where it exists, else fall back to horribly
19527    # complicated shell code.
19528    if test "x$READLINK_TESTED" != yes; then
19529      # On MacOSX there is a readlink tool with a different
19530      # purpose than the GNU readlink tool. Check the found readlink.
19531      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19532      if test "x$ISGNU" = x; then
19533        # A readlink that we do not know how to use.
19534        # Are there other non-GNU readlinks out there?
19535        READLINK_TESTED=yes
19536        READLINK=
19537      fi
19538    fi
19539
19540    if test "x$READLINK" != x; then
19541      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19542    else
19543      # Save the current directory for restoring afterwards
19544      STARTDIR=$PWD
19545      COUNTER=0
19546      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19547      sym_link_file=`$BASENAME $TEST_COMPILER`
19548      cd $sym_link_dir
19549      # Use -P flag to resolve symlinks in directories.
19550      cd `$THEPWDCMD -P`
19551      sym_link_dir=`$THEPWDCMD -P`
19552      # Resolve file symlinks
19553      while test $COUNTER -lt 20; do
19554        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19555        if test "x$ISLINK" == x; then
19556          # This is not a symbolic link! We are done!
19557          break
19558        fi
19559        # Again resolve directory symlinks since the target of the just found
19560        # link could be in a different directory
19561        cd `$DIRNAME $ISLINK`
19562        sym_link_dir=`$THEPWDCMD -P`
19563        sym_link_file=`$BASENAME $ISLINK`
19564        let COUNTER=COUNTER+1
19565      done
19566      cd $STARTDIR
19567      TEST_COMPILER=$sym_link_dir/$sym_link_file
19568    fi
19569  fi
19570
19571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19572$as_echo "$TEST_COMPILER" >&6; }
19573  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19574$as_echo_n "checking if CC is disguised ccache... " >&6; }
19575
19576  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19577  if test "x$COMPILER_BASENAME" = "xccache"; then
19578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19579$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19580    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19581    # We want to control ccache invocation ourselves, so ignore this cc and try
19582    # searching again.
19583
19584    # Remove the path to the fake ccache cc from the PATH
19585    RETRY_COMPILER_SAVED_PATH="$PATH"
19586    COMPILER_DIRNAME=`$DIRNAME $CC`
19587    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19588
19589    # Try again looking for our compiler
19590    if test -n "$ac_tool_prefix"; then
19591  for ac_prog in $COMPILER_CHECK_LIST
19592  do
19593    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19594set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19596$as_echo_n "checking for $ac_word... " >&6; }
19597if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19598  $as_echo_n "(cached) " >&6
19599else
19600  if test -n "$PROPER_COMPILER_CC"; then
19601  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19602else
19603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19604for as_dir in $PATH
19605do
19606  IFS=$as_save_IFS
19607  test -z "$as_dir" && as_dir=.
19608    for ac_exec_ext in '' $ac_executable_extensions; do
19609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19610    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19612    break 2
19613  fi
19614done
19615  done
19616IFS=$as_save_IFS
19617
19618fi
19619fi
19620PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19621if test -n "$PROPER_COMPILER_CC"; then
19622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19623$as_echo "$PROPER_COMPILER_CC" >&6; }
19624else
19625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19626$as_echo "no" >&6; }
19627fi
19628
19629
19630    test -n "$PROPER_COMPILER_CC" && break
19631  done
19632fi
19633if test -z "$PROPER_COMPILER_CC"; then
19634  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19635  for ac_prog in $COMPILER_CHECK_LIST
19636do
19637  # Extract the first word of "$ac_prog", so it can be a program name with args.
19638set dummy $ac_prog; ac_word=$2
19639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19640$as_echo_n "checking for $ac_word... " >&6; }
19641if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19642  $as_echo_n "(cached) " >&6
19643else
19644  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19645  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19646else
19647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19648for as_dir in $PATH
19649do
19650  IFS=$as_save_IFS
19651  test -z "$as_dir" && as_dir=.
19652    for ac_exec_ext in '' $ac_executable_extensions; do
19653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19654    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19656    break 2
19657  fi
19658done
19659  done
19660IFS=$as_save_IFS
19661
19662fi
19663fi
19664ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19665if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19667$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19668else
19669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19670$as_echo "no" >&6; }
19671fi
19672
19673
19674  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19675done
19676
19677  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19678    PROPER_COMPILER_CC=""
19679  else
19680    case $cross_compiling:$ac_tool_warned in
19681yes:)
19682{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19683$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19684ac_tool_warned=yes ;;
19685esac
19686    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19687  fi
19688fi
19689
19690
19691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19692
19693  # First separate the path from the arguments. This will split at the first
19694  # space.
19695  complete="$PROPER_COMPILER_CC"
19696  path="${complete%% *}"
19697  tmp="$complete EOL"
19698  arguments="${tmp#* }"
19699
19700  # Input might be given as Windows format, start by converting to
19701  # unix format.
19702  new_path=`$CYGPATH -u "$path"`
19703
19704  # Now try to locate executable using which
19705  new_path=`$WHICH "$new_path" 2> /dev/null`
19706  # bat and cmd files are not always considered executable in cygwin causing which
19707  # to not find them
19708  if test "x$new_path" = x \
19709      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19710      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19711    new_path=`$CYGPATH -u "$path"`
19712  fi
19713  if test "x$new_path" = x; then
19714    # Oops. Which didn't find the executable.
19715    # The splitting of arguments from the executable at a space might have been incorrect,
19716    # since paths with space are more likely in Windows. Give it another try with the whole
19717    # argument.
19718    path="$complete"
19719    arguments="EOL"
19720    new_path=`$CYGPATH -u "$path"`
19721    new_path=`$WHICH "$new_path" 2> /dev/null`
19722    # bat and cmd files are not always considered executable in cygwin causing which
19723    # to not find them
19724    if test "x$new_path" = x \
19725        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19726        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19727      new_path=`$CYGPATH -u "$path"`
19728    fi
19729    if test "x$new_path" = x; then
19730      # It's still not found. Now this is an unrecoverable error.
19731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19732$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19733      has_space=`$ECHO "$complete" | $GREP " "`
19734      if test "x$has_space" != x; then
19735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19737      fi
19738      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19739    fi
19740  fi
19741
19742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19745  # "foo.exe" is OK but "foo" is an error.
19746  #
19747  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19748  # It is also a way to make sure we got the proper file name for the real test later on.
19749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19750  if test "x$test_shortpath" = x; then
19751    # Short path failed, file does not exist as specified.
19752    # Try adding .exe or .cmd
19753    if test -f "${new_path}.exe"; then
19754      input_to_shortpath="${new_path}.exe"
19755    elif test -f "${new_path}.cmd"; then
19756      input_to_shortpath="${new_path}.cmd"
19757    else
19758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19759$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19762      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19763    fi
19764  else
19765    input_to_shortpath="$new_path"
19766  fi
19767
19768  # Call helper function which possibly converts this using DOS-style short mode.
19769  # If so, the updated path is stored in $new_path.
19770  new_path="$input_to_shortpath"
19771
19772  input_path="$input_to_shortpath"
19773  # Check if we need to convert this using DOS-style short mode. If the path
19774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19775  # take no chances and rewrite it.
19776  # Note: m4 eats our [], so we need to use [ and ] instead.
19777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19778  if test "x$has_forbidden_chars" != x; then
19779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19783      # Going to short mode and back again did indeed matter. Since short mode is
19784      # case insensitive, let's make it lowercase to improve readability.
19785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19786      # Now convert it back to Unix-stile (cygpath)
19787      input_path=`$CYGPATH -u "$shortmode_path"`
19788      new_path="$input_path"
19789    fi
19790  fi
19791
19792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19793  if test "x$test_cygdrive_prefix" = x; then
19794    # As a simple fix, exclude /usr/bin since it's not a real path.
19795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19797      # a path prefixed by /cygdrive for fixpath to work.
19798      new_path="$CYGWIN_ROOT_PATH$input_path"
19799    fi
19800  fi
19801
19802  # remove trailing .exe if any
19803  new_path="${new_path/%.exe/}"
19804
19805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19806
19807  # First separate the path from the arguments. This will split at the first
19808  # space.
19809  complete="$PROPER_COMPILER_CC"
19810  path="${complete%% *}"
19811  tmp="$complete EOL"
19812  arguments="${tmp#* }"
19813
19814  # Input might be given as Windows format, start by converting to
19815  # unix format.
19816  new_path="$path"
19817
19818  windows_path="$new_path"
19819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19820    unix_path=`$CYGPATH -u "$windows_path"`
19821    new_path="$unix_path"
19822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19824    new_path="$unix_path"
19825  fi
19826
19827
19828  # Now try to locate executable using which
19829  new_path=`$WHICH "$new_path" 2> /dev/null`
19830
19831  if test "x$new_path" = x; then
19832    # Oops. Which didn't find the executable.
19833    # The splitting of arguments from the executable at a space might have been incorrect,
19834    # since paths with space are more likely in Windows. Give it another try with the whole
19835    # argument.
19836    path="$complete"
19837    arguments="EOL"
19838    new_path="$path"
19839
19840  windows_path="$new_path"
19841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19842    unix_path=`$CYGPATH -u "$windows_path"`
19843    new_path="$unix_path"
19844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19846    new_path="$unix_path"
19847  fi
19848
19849
19850    new_path=`$WHICH "$new_path" 2> /dev/null`
19851
19852    if test "x$new_path" = x; then
19853      # It's still not found. Now this is an unrecoverable error.
19854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19855$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19856      has_space=`$ECHO "$complete" | $GREP " "`
19857      if test "x$has_space" != x; then
19858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19860      fi
19861      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19862    fi
19863  fi
19864
19865  # Now new_path has a complete unix path to the binary
19866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19867    # Keep paths in /bin as-is, but remove trailing .exe if any
19868    new_path="${new_path/%.exe/}"
19869    # Do not save /bin paths to all_fixpath_prefixes!
19870  else
19871    # Not in mixed or Windows style, start by that.
19872    new_path=`cmd //c echo $new_path`
19873
19874  input_path="$new_path"
19875  # Check if we need to convert this using DOS-style short mode. If the path
19876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19877  # take no chances and rewrite it.
19878  # Note: m4 eats our [], so we need to use [ and ] instead.
19879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19880  if test "x$has_forbidden_chars" != x; then
19881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19883  fi
19884
19885    # Output is in $new_path
19886
19887  windows_path="$new_path"
19888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19889    unix_path=`$CYGPATH -u "$windows_path"`
19890    new_path="$unix_path"
19891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19893    new_path="$unix_path"
19894  fi
19895
19896    # remove trailing .exe if any
19897    new_path="${new_path/%.exe/}"
19898
19899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19901  fi
19902
19903  else
19904    # We're on a posix platform. Hooray! :)
19905    # First separate the path from the arguments. This will split at the first
19906    # space.
19907    complete="$PROPER_COMPILER_CC"
19908    path="${complete%% *}"
19909    tmp="$complete EOL"
19910    arguments="${tmp#* }"
19911
19912    # Cannot rely on the command "which" here since it doesn't always work.
19913    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19914    if test -z "$is_absolute_path"; then
19915      # Path to executable is not absolute. Find it.
19916      IFS_save="$IFS"
19917      IFS=:
19918      for p in $PATH; do
19919        if test -f "$p/$path" && test -x "$p/$path"; then
19920          new_path="$p/$path"
19921          break
19922        fi
19923      done
19924      IFS="$IFS_save"
19925    else
19926      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19927$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19928      new_path="$path"
19929    fi
19930
19931    if test "x$new_path" = x; then
19932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19933$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19934      has_space=`$ECHO "$complete" | $GREP " "`
19935      if test "x$has_space" != x; then
19936        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19937$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19938      fi
19939      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19940    fi
19941  fi
19942
19943  # Now join together the path and the arguments once again
19944  if test "x$arguments" != xEOL; then
19945    new_complete="$new_path ${arguments% *}"
19946  else
19947    new_complete="$new_path"
19948  fi
19949
19950  if test "x$complete" != "x$new_complete"; then
19951    PROPER_COMPILER_CC="$new_complete"
19952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19953$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19954  fi
19955
19956    PATH="$RETRY_COMPILER_SAVED_PATH"
19957
19958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19959$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19960
19961  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19962    # Follow a chain of symbolic links. Use readlink
19963    # where it exists, else fall back to horribly
19964    # complicated shell code.
19965    if test "x$READLINK_TESTED" != yes; then
19966      # On MacOSX there is a readlink tool with a different
19967      # purpose than the GNU readlink tool. Check the found readlink.
19968      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19969      if test "x$ISGNU" = x; then
19970        # A readlink that we do not know how to use.
19971        # Are there other non-GNU readlinks out there?
19972        READLINK_TESTED=yes
19973        READLINK=
19974      fi
19975    fi
19976
19977    if test "x$READLINK" != x; then
19978      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19979    else
19980      # Save the current directory for restoring afterwards
19981      STARTDIR=$PWD
19982      COUNTER=0
19983      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19984      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19985      cd $sym_link_dir
19986      # Use -P flag to resolve symlinks in directories.
19987      cd `$THEPWDCMD -P`
19988      sym_link_dir=`$THEPWDCMD -P`
19989      # Resolve file symlinks
19990      while test $COUNTER -lt 20; do
19991        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19992        if test "x$ISLINK" == x; then
19993          # This is not a symbolic link! We are done!
19994          break
19995        fi
19996        # Again resolve directory symlinks since the target of the just found
19997        # link could be in a different directory
19998        cd `$DIRNAME $ISLINK`
19999        sym_link_dir=`$THEPWDCMD -P`
20000        sym_link_file=`$BASENAME $ISLINK`
20001        let COUNTER=COUNTER+1
20002      done
20003      cd $STARTDIR
20004      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20005    fi
20006  fi
20007
20008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20009$as_echo "$PROPER_COMPILER_CC" >&6; }
20010    CC="$PROPER_COMPILER_CC"
20011  else
20012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20013$as_echo "no, keeping CC" >&6; }
20014    CC="$TEST_COMPILER"
20015  fi
20016
20017  COMPILER=$CC
20018  COMPILER_NAME=$COMPILER_NAME
20019
20020  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20021    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20022    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20023    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20024    if test $? -ne 0; then
20025      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20026
20027      { $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
20028$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20029      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20030$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20031      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20032    else
20033      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20034      COMPILER_VENDOR="Sun Studio"
20035    fi
20036  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20037    # First line typically looks something like:
20038    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20039    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20040    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20041    COMPILER_VENDOR="Microsoft CL.EXE"
20042    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20043    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20044      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20045        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20046      fi
20047    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20048      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20049        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20050      fi
20051    fi
20052  else
20053    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20054    # Check that this is likely to be GCC.
20055    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20056    if test $? -ne 0; then
20057      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20058$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20059      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20060$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20061      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20062    fi
20063
20064    # First line typically looks something like:
20065    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20066    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20067    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20068  fi
20069  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20070  CC_VERSION="$COMPILER_VERSION"
20071  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20072  CC_VENDOR="$COMPILER_VENDOR"
20073
20074  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20075$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20076
20077
20078  # Now that we have resolved CC ourself, let autoconf have its go at it
20079  ac_ext=c
20080ac_cpp='$CPP $CPPFLAGS'
20081ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20082ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20083ac_compiler_gnu=$ac_cv_c_compiler_gnu
20084if test -n "$ac_tool_prefix"; then
20085  for ac_prog in $CC
20086  do
20087    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20088set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20090$as_echo_n "checking for $ac_word... " >&6; }
20091if ${ac_cv_prog_CC+:} false; then :
20092  $as_echo_n "(cached) " >&6
20093else
20094  if test -n "$CC"; then
20095  ac_cv_prog_CC="$CC" # Let the user override the test.
20096else
20097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20098for as_dir in $PATH
20099do
20100  IFS=$as_save_IFS
20101  test -z "$as_dir" && as_dir=.
20102    for ac_exec_ext in '' $ac_executable_extensions; do
20103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20104    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20106    break 2
20107  fi
20108done
20109  done
20110IFS=$as_save_IFS
20111
20112fi
20113fi
20114CC=$ac_cv_prog_CC
20115if test -n "$CC"; then
20116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20117$as_echo "$CC" >&6; }
20118else
20119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20120$as_echo "no" >&6; }
20121fi
20122
20123
20124    test -n "$CC" && break
20125  done
20126fi
20127if test -z "$CC"; then
20128  ac_ct_CC=$CC
20129  for ac_prog in $CC
20130do
20131  # Extract the first word of "$ac_prog", so it can be a program name with args.
20132set dummy $ac_prog; ac_word=$2
20133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20134$as_echo_n "checking for $ac_word... " >&6; }
20135if ${ac_cv_prog_ac_ct_CC+:} false; then :
20136  $as_echo_n "(cached) " >&6
20137else
20138  if test -n "$ac_ct_CC"; then
20139  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20140else
20141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20142for as_dir in $PATH
20143do
20144  IFS=$as_save_IFS
20145  test -z "$as_dir" && as_dir=.
20146    for ac_exec_ext in '' $ac_executable_extensions; do
20147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20148    ac_cv_prog_ac_ct_CC="$ac_prog"
20149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20150    break 2
20151  fi
20152done
20153  done
20154IFS=$as_save_IFS
20155
20156fi
20157fi
20158ac_ct_CC=$ac_cv_prog_ac_ct_CC
20159if test -n "$ac_ct_CC"; then
20160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20161$as_echo "$ac_ct_CC" >&6; }
20162else
20163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20164$as_echo "no" >&6; }
20165fi
20166
20167
20168  test -n "$ac_ct_CC" && break
20169done
20170
20171  if test "x$ac_ct_CC" = x; then
20172    CC=""
20173  else
20174    case $cross_compiling:$ac_tool_warned in
20175yes:)
20176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20178ac_tool_warned=yes ;;
20179esac
20180    CC=$ac_ct_CC
20181  fi
20182fi
20183
20184
20185test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20186$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20187as_fn_error $? "no acceptable C compiler found in \$PATH
20188See \`config.log' for more details" "$LINENO" 5; }
20189
20190# Provide some information about the compiler.
20191$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20192set X $ac_compile
20193ac_compiler=$2
20194for ac_option in --version -v -V -qversion; do
20195  { { ac_try="$ac_compiler $ac_option >&5"
20196case "(($ac_try" in
20197  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20198  *) ac_try_echo=$ac_try;;
20199esac
20200eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20201$as_echo "$ac_try_echo"; } >&5
20202  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20203  ac_status=$?
20204  if test -s conftest.err; then
20205    sed '10a\
20206... rest of stderr output deleted ...
20207         10q' conftest.err >conftest.er1
20208    cat conftest.er1 >&5
20209  fi
20210  rm -f conftest.er1 conftest.err
20211  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20212  test $ac_status = 0; }
20213done
20214
20215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20216/* end confdefs.h.  */
20217
20218int
20219main ()
20220{
20221
20222  ;
20223  return 0;
20224}
20225_ACEOF
20226ac_clean_files_save=$ac_clean_files
20227ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20228# Try to create an executable without -o first, disregard a.out.
20229# It will help us diagnose broken compilers, and finding out an intuition
20230# of exeext.
20231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20232$as_echo_n "checking whether the C compiler works... " >&6; }
20233ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20234
20235# The possible output files:
20236ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20237
20238ac_rmfiles=
20239for ac_file in $ac_files
20240do
20241  case $ac_file in
20242    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20243    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20244  esac
20245done
20246rm -f $ac_rmfiles
20247
20248if { { ac_try="$ac_link_default"
20249case "(($ac_try" in
20250  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20251  *) ac_try_echo=$ac_try;;
20252esac
20253eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20254$as_echo "$ac_try_echo"; } >&5
20255  (eval "$ac_link_default") 2>&5
20256  ac_status=$?
20257  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20258  test $ac_status = 0; }; then :
20259  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20260# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20261# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20262# so that the user can short-circuit this test for compilers unknown to
20263# Autoconf.
20264for ac_file in $ac_files ''
20265do
20266  test -f "$ac_file" || continue
20267  case $ac_file in
20268    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20269	;;
20270    [ab].out )
20271	# We found the default executable, but exeext='' is most
20272	# certainly right.
20273	break;;
20274    *.* )
20275	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20276	then :; else
20277	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20278	fi
20279	# We set ac_cv_exeext here because the later test for it is not
20280	# safe: cross compilers may not add the suffix if given an `-o'
20281	# argument, so we may need to know it at that point already.
20282	# Even if this section looks crufty: it has the advantage of
20283	# actually working.
20284	break;;
20285    * )
20286	break;;
20287  esac
20288done
20289test "$ac_cv_exeext" = no && ac_cv_exeext=
20290
20291else
20292  ac_file=''
20293fi
20294if test -z "$ac_file"; then :
20295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20296$as_echo "no" >&6; }
20297$as_echo "$as_me: failed program was:" >&5
20298sed 's/^/| /' conftest.$ac_ext >&5
20299
20300{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20302as_fn_error 77 "C compiler cannot create executables
20303See \`config.log' for more details" "$LINENO" 5; }
20304else
20305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20306$as_echo "yes" >&6; }
20307fi
20308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20309$as_echo_n "checking for C compiler default output file name... " >&6; }
20310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20311$as_echo "$ac_file" >&6; }
20312ac_exeext=$ac_cv_exeext
20313
20314rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20315ac_clean_files=$ac_clean_files_save
20316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20317$as_echo_n "checking for suffix of executables... " >&6; }
20318if { { ac_try="$ac_link"
20319case "(($ac_try" in
20320  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20321  *) ac_try_echo=$ac_try;;
20322esac
20323eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20324$as_echo "$ac_try_echo"; } >&5
20325  (eval "$ac_link") 2>&5
20326  ac_status=$?
20327  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20328  test $ac_status = 0; }; then :
20329  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20330# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20331# work properly (i.e., refer to `conftest.exe'), while it won't with
20332# `rm'.
20333for ac_file in conftest.exe conftest conftest.*; do
20334  test -f "$ac_file" || continue
20335  case $ac_file in
20336    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20337    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20338	  break;;
20339    * ) break;;
20340  esac
20341done
20342else
20343  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20345as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20346See \`config.log' for more details" "$LINENO" 5; }
20347fi
20348rm -f conftest conftest$ac_cv_exeext
20349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20350$as_echo "$ac_cv_exeext" >&6; }
20351
20352rm -f conftest.$ac_ext
20353EXEEXT=$ac_cv_exeext
20354ac_exeext=$EXEEXT
20355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20356/* end confdefs.h.  */
20357#include <stdio.h>
20358int
20359main ()
20360{
20361FILE *f = fopen ("conftest.out", "w");
20362 return ferror (f) || fclose (f) != 0;
20363
20364  ;
20365  return 0;
20366}
20367_ACEOF
20368ac_clean_files="$ac_clean_files conftest.out"
20369# Check that the compiler produces executables we can run.  If not, either
20370# the compiler is broken, or we cross compile.
20371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20372$as_echo_n "checking whether we are cross compiling... " >&6; }
20373if test "$cross_compiling" != yes; then
20374  { { ac_try="$ac_link"
20375case "(($ac_try" in
20376  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20377  *) ac_try_echo=$ac_try;;
20378esac
20379eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20380$as_echo "$ac_try_echo"; } >&5
20381  (eval "$ac_link") 2>&5
20382  ac_status=$?
20383  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20384  test $ac_status = 0; }
20385  if { ac_try='./conftest$ac_cv_exeext'
20386  { { case "(($ac_try" in
20387  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20388  *) ac_try_echo=$ac_try;;
20389esac
20390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20391$as_echo "$ac_try_echo"; } >&5
20392  (eval "$ac_try") 2>&5
20393  ac_status=$?
20394  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20395  test $ac_status = 0; }; }; then
20396    cross_compiling=no
20397  else
20398    if test "$cross_compiling" = maybe; then
20399	cross_compiling=yes
20400    else
20401	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20402$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20403as_fn_error $? "cannot run C compiled programs.
20404If you meant to cross compile, use \`--host'.
20405See \`config.log' for more details" "$LINENO" 5; }
20406    fi
20407  fi
20408fi
20409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20410$as_echo "$cross_compiling" >&6; }
20411
20412rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20413ac_clean_files=$ac_clean_files_save
20414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20415$as_echo_n "checking for suffix of object files... " >&6; }
20416if ${ac_cv_objext+:} false; then :
20417  $as_echo_n "(cached) " >&6
20418else
20419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20420/* end confdefs.h.  */
20421
20422int
20423main ()
20424{
20425
20426  ;
20427  return 0;
20428}
20429_ACEOF
20430rm -f conftest.o conftest.obj
20431if { { ac_try="$ac_compile"
20432case "(($ac_try" in
20433  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20434  *) ac_try_echo=$ac_try;;
20435esac
20436eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20437$as_echo "$ac_try_echo"; } >&5
20438  (eval "$ac_compile") 2>&5
20439  ac_status=$?
20440  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20441  test $ac_status = 0; }; then :
20442  for ac_file in conftest.o conftest.obj conftest.*; do
20443  test -f "$ac_file" || continue;
20444  case $ac_file in
20445    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20446    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20447       break;;
20448  esac
20449done
20450else
20451  $as_echo "$as_me: failed program was:" >&5
20452sed 's/^/| /' conftest.$ac_ext >&5
20453
20454{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20456as_fn_error $? "cannot compute suffix of object files: cannot compile
20457See \`config.log' for more details" "$LINENO" 5; }
20458fi
20459rm -f conftest.$ac_cv_objext conftest.$ac_ext
20460fi
20461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20462$as_echo "$ac_cv_objext" >&6; }
20463OBJEXT=$ac_cv_objext
20464ac_objext=$OBJEXT
20465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20466$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20467if ${ac_cv_c_compiler_gnu+:} false; then :
20468  $as_echo_n "(cached) " >&6
20469else
20470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20471/* end confdefs.h.  */
20472
20473int
20474main ()
20475{
20476#ifndef __GNUC__
20477       choke me
20478#endif
20479
20480  ;
20481  return 0;
20482}
20483_ACEOF
20484if ac_fn_c_try_compile "$LINENO"; then :
20485  ac_compiler_gnu=yes
20486else
20487  ac_compiler_gnu=no
20488fi
20489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20490ac_cv_c_compiler_gnu=$ac_compiler_gnu
20491
20492fi
20493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20494$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20495if test $ac_compiler_gnu = yes; then
20496  GCC=yes
20497else
20498  GCC=
20499fi
20500ac_test_CFLAGS=${CFLAGS+set}
20501ac_save_CFLAGS=$CFLAGS
20502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20503$as_echo_n "checking whether $CC accepts -g... " >&6; }
20504if ${ac_cv_prog_cc_g+:} false; then :
20505  $as_echo_n "(cached) " >&6
20506else
20507  ac_save_c_werror_flag=$ac_c_werror_flag
20508   ac_c_werror_flag=yes
20509   ac_cv_prog_cc_g=no
20510   CFLAGS="-g"
20511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20512/* end confdefs.h.  */
20513
20514int
20515main ()
20516{
20517
20518  ;
20519  return 0;
20520}
20521_ACEOF
20522if ac_fn_c_try_compile "$LINENO"; then :
20523  ac_cv_prog_cc_g=yes
20524else
20525  CFLAGS=""
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
20539else
20540  ac_c_werror_flag=$ac_save_c_werror_flag
20541	 CFLAGS="-g"
20542	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20543/* end confdefs.h.  */
20544
20545int
20546main ()
20547{
20548
20549  ;
20550  return 0;
20551}
20552_ACEOF
20553if ac_fn_c_try_compile "$LINENO"; then :
20554  ac_cv_prog_cc_g=yes
20555fi
20556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20557fi
20558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20559fi
20560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20561   ac_c_werror_flag=$ac_save_c_werror_flag
20562fi
20563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20564$as_echo "$ac_cv_prog_cc_g" >&6; }
20565if test "$ac_test_CFLAGS" = set; then
20566  CFLAGS=$ac_save_CFLAGS
20567elif test $ac_cv_prog_cc_g = yes; then
20568  if test "$GCC" = yes; then
20569    CFLAGS="-g -O2"
20570  else
20571    CFLAGS="-g"
20572  fi
20573else
20574  if test "$GCC" = yes; then
20575    CFLAGS="-O2"
20576  else
20577    CFLAGS=
20578  fi
20579fi
20580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20581$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20582if ${ac_cv_prog_cc_c89+:} false; then :
20583  $as_echo_n "(cached) " >&6
20584else
20585  ac_cv_prog_cc_c89=no
20586ac_save_CC=$CC
20587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20588/* end confdefs.h.  */
20589#include <stdarg.h>
20590#include <stdio.h>
20591struct stat;
20592/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20593struct buf { int x; };
20594FILE * (*rcsopen) (struct buf *, struct stat *, int);
20595static char *e (p, i)
20596     char **p;
20597     int i;
20598{
20599  return p[i];
20600}
20601static char *f (char * (*g) (char **, int), char **p, ...)
20602{
20603  char *s;
20604  va_list v;
20605  va_start (v,p);
20606  s = g (p, va_arg (v,int));
20607  va_end (v);
20608  return s;
20609}
20610
20611/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20612   function prototypes and stuff, but not '\xHH' hex character constants.
20613   These don't provoke an error unfortunately, instead are silently treated
20614   as 'x'.  The following induces an error, until -std is added to get
20615   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20616   array size at least.  It's necessary to write '\x00'==0 to get something
20617   that's true only with -std.  */
20618int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20619
20620/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20621   inside strings and character constants.  */
20622#define FOO(x) 'x'
20623int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20624
20625int test (int i, double x);
20626struct s1 {int (*f) (int a);};
20627struct s2 {int (*f) (double a);};
20628int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20629int argc;
20630char **argv;
20631int
20632main ()
20633{
20634return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20635  ;
20636  return 0;
20637}
20638_ACEOF
20639for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20640	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20641do
20642  CC="$ac_save_CC $ac_arg"
20643  if ac_fn_c_try_compile "$LINENO"; then :
20644  ac_cv_prog_cc_c89=$ac_arg
20645fi
20646rm -f core conftest.err conftest.$ac_objext
20647  test "x$ac_cv_prog_cc_c89" != "xno" && break
20648done
20649rm -f conftest.$ac_ext
20650CC=$ac_save_CC
20651
20652fi
20653# AC_CACHE_VAL
20654case "x$ac_cv_prog_cc_c89" in
20655  x)
20656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20657$as_echo "none needed" >&6; } ;;
20658  xno)
20659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20660$as_echo "unsupported" >&6; } ;;
20661  *)
20662    CC="$CC $ac_cv_prog_cc_c89"
20663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20664$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20665esac
20666if test "x$ac_cv_prog_cc_c89" != xno; then :
20667
20668fi
20669
20670ac_ext=cpp
20671ac_cpp='$CXXCPP $CPPFLAGS'
20672ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20673ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20674ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20675
20676
20677  ### Locate C++ compiler (CXX)
20678
20679  if test "x$CXX" != x; then
20680    COMPILER_CHECK_LIST="$CXX"
20681  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20682    COMPILER_CHECK_LIST="cl"
20683  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20684    COMPILER_CHECK_LIST="CC g++"
20685  else
20686    COMPILER_CHECK_LIST="g++ CC"
20687  fi
20688
20689
20690  COMPILER_NAME=C++
20691
20692  CXX=
20693  # If TOOLS_DIR is set, check for all compiler names in there first
20694  # before checking the rest of the PATH.
20695  if test -n "$TOOLS_DIR"; then
20696    PATH_save="$PATH"
20697    PATH="$TOOLS_DIR"
20698    for ac_prog in $COMPILER_CHECK_LIST
20699do
20700  # Extract the first word of "$ac_prog", so it can be a program name with args.
20701set dummy $ac_prog; ac_word=$2
20702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20703$as_echo_n "checking for $ac_word... " >&6; }
20704if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20705  $as_echo_n "(cached) " >&6
20706else
20707  case $TOOLS_DIR_CXX in
20708  [\\/]* | ?:[\\/]*)
20709  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20710  ;;
20711  *)
20712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20713for as_dir in $PATH
20714do
20715  IFS=$as_save_IFS
20716  test -z "$as_dir" && as_dir=.
20717    for ac_exec_ext in '' $ac_executable_extensions; do
20718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20719    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20721    break 2
20722  fi
20723done
20724  done
20725IFS=$as_save_IFS
20726
20727  ;;
20728esac
20729fi
20730TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20731if test -n "$TOOLS_DIR_CXX"; then
20732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20733$as_echo "$TOOLS_DIR_CXX" >&6; }
20734else
20735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20736$as_echo "no" >&6; }
20737fi
20738
20739
20740  test -n "$TOOLS_DIR_CXX" && break
20741done
20742
20743    CXX=$TOOLS_DIR_CXX
20744    PATH="$PATH_save"
20745  fi
20746
20747  # AC_PATH_PROGS can't be run multiple times with the same variable,
20748  # so create a new name for this run.
20749  if test "x$CXX" = x; then
20750    for ac_prog in $COMPILER_CHECK_LIST
20751do
20752  # Extract the first word of "$ac_prog", so it can be a program name with args.
20753set dummy $ac_prog; ac_word=$2
20754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20755$as_echo_n "checking for $ac_word... " >&6; }
20756if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20757  $as_echo_n "(cached) " >&6
20758else
20759  case $POTENTIAL_CXX in
20760  [\\/]* | ?:[\\/]*)
20761  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20762  ;;
20763  *)
20764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20765for as_dir in $PATH
20766do
20767  IFS=$as_save_IFS
20768  test -z "$as_dir" && as_dir=.
20769    for ac_exec_ext in '' $ac_executable_extensions; do
20770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20771    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20773    break 2
20774  fi
20775done
20776  done
20777IFS=$as_save_IFS
20778
20779  ;;
20780esac
20781fi
20782POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20783if test -n "$POTENTIAL_CXX"; then
20784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20785$as_echo "$POTENTIAL_CXX" >&6; }
20786else
20787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20788$as_echo "no" >&6; }
20789fi
20790
20791
20792  test -n "$POTENTIAL_CXX" && break
20793done
20794
20795    CXX=$POTENTIAL_CXX
20796  fi
20797
20798  if test "x$CXX" = x; then
20799
20800  # Print a helpful message on how to acquire the necessary build dependency.
20801  # devkit is the help tag: freetype, cups, pulse, alsa etc
20802  MISSING_DEPENDENCY=devkit
20803
20804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20805    cygwin_help $MISSING_DEPENDENCY
20806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20807    msys_help $MISSING_DEPENDENCY
20808  else
20809    PKGHANDLER_COMMAND=
20810
20811    case $PKGHANDLER in
20812      apt-get)
20813        apt_help     $MISSING_DEPENDENCY ;;
20814      yum)
20815        yum_help     $MISSING_DEPENDENCY ;;
20816      port)
20817        port_help    $MISSING_DEPENDENCY ;;
20818      pkgutil)
20819        pkgutil_help $MISSING_DEPENDENCY ;;
20820      pkgadd)
20821        pkgadd_help  $MISSING_DEPENDENCY ;;
20822      * )
20823        break ;;
20824    esac
20825
20826    if test "x$PKGHANDLER_COMMAND" != x; then
20827      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20828    fi
20829  fi
20830
20831    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20832  fi
20833
20834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20835
20836  # First separate the path from the arguments. This will split at the first
20837  # space.
20838  complete="$CXX"
20839  path="${complete%% *}"
20840  tmp="$complete EOL"
20841  arguments="${tmp#* }"
20842
20843  # Input might be given as Windows format, start by converting to
20844  # unix format.
20845  new_path=`$CYGPATH -u "$path"`
20846
20847  # Now try to locate executable using which
20848  new_path=`$WHICH "$new_path" 2> /dev/null`
20849  # bat and cmd files are not always considered executable in cygwin causing which
20850  # to not find them
20851  if test "x$new_path" = x \
20852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20854    new_path=`$CYGPATH -u "$path"`
20855  fi
20856  if test "x$new_path" = x; then
20857    # Oops. Which didn't find the executable.
20858    # The splitting of arguments from the executable at a space might have been incorrect,
20859    # since paths with space are more likely in Windows. Give it another try with the whole
20860    # argument.
20861    path="$complete"
20862    arguments="EOL"
20863    new_path=`$CYGPATH -u "$path"`
20864    new_path=`$WHICH "$new_path" 2> /dev/null`
20865    # bat and cmd files are not always considered executable in cygwin causing which
20866    # to not find them
20867    if test "x$new_path" = x \
20868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20870      new_path=`$CYGPATH -u "$path"`
20871    fi
20872    if test "x$new_path" = x; then
20873      # It's still not found. Now this is an unrecoverable error.
20874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20875$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20876      has_space=`$ECHO "$complete" | $GREP " "`
20877      if test "x$has_space" != x; then
20878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20880      fi
20881      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20882    fi
20883  fi
20884
20885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20888  # "foo.exe" is OK but "foo" is an error.
20889  #
20890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20891  # It is also a way to make sure we got the proper file name for the real test later on.
20892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20893  if test "x$test_shortpath" = x; then
20894    # Short path failed, file does not exist as specified.
20895    # Try adding .exe or .cmd
20896    if test -f "${new_path}.exe"; then
20897      input_to_shortpath="${new_path}.exe"
20898    elif test -f "${new_path}.cmd"; then
20899      input_to_shortpath="${new_path}.cmd"
20900    else
20901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20902$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20905      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20906    fi
20907  else
20908    input_to_shortpath="$new_path"
20909  fi
20910
20911  # Call helper function which possibly converts this using DOS-style short mode.
20912  # If so, the updated path is stored in $new_path.
20913  new_path="$input_to_shortpath"
20914
20915  input_path="$input_to_shortpath"
20916  # Check if we need to convert this using DOS-style short mode. If the path
20917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20918  # take no chances and rewrite it.
20919  # Note: m4 eats our [], so we need to use [ and ] instead.
20920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20921  if test "x$has_forbidden_chars" != x; then
20922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20926      # Going to short mode and back again did indeed matter. Since short mode is
20927      # case insensitive, let's make it lowercase to improve readability.
20928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20929      # Now convert it back to Unix-stile (cygpath)
20930      input_path=`$CYGPATH -u "$shortmode_path"`
20931      new_path="$input_path"
20932    fi
20933  fi
20934
20935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20936  if test "x$test_cygdrive_prefix" = x; then
20937    # As a simple fix, exclude /usr/bin since it's not a real path.
20938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20940      # a path prefixed by /cygdrive for fixpath to work.
20941      new_path="$CYGWIN_ROOT_PATH$input_path"
20942    fi
20943  fi
20944
20945  # remove trailing .exe if any
20946  new_path="${new_path/%.exe/}"
20947
20948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20949
20950  # First separate the path from the arguments. This will split at the first
20951  # space.
20952  complete="$CXX"
20953  path="${complete%% *}"
20954  tmp="$complete EOL"
20955  arguments="${tmp#* }"
20956
20957  # Input might be given as Windows format, start by converting to
20958  # unix format.
20959  new_path="$path"
20960
20961  windows_path="$new_path"
20962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20963    unix_path=`$CYGPATH -u "$windows_path"`
20964    new_path="$unix_path"
20965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20967    new_path="$unix_path"
20968  fi
20969
20970
20971  # Now try to locate executable using which
20972  new_path=`$WHICH "$new_path" 2> /dev/null`
20973
20974  if test "x$new_path" = x; then
20975    # Oops. Which didn't find the executable.
20976    # The splitting of arguments from the executable at a space might have been incorrect,
20977    # since paths with space are more likely in Windows. Give it another try with the whole
20978    # argument.
20979    path="$complete"
20980    arguments="EOL"
20981    new_path="$path"
20982
20983  windows_path="$new_path"
20984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20985    unix_path=`$CYGPATH -u "$windows_path"`
20986    new_path="$unix_path"
20987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20989    new_path="$unix_path"
20990  fi
20991
20992
20993    new_path=`$WHICH "$new_path" 2> /dev/null`
20994
20995    if test "x$new_path" = x; then
20996      # It's still not found. Now this is an unrecoverable error.
20997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20998$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20999      has_space=`$ECHO "$complete" | $GREP " "`
21000      if test "x$has_space" != x; then
21001        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21002$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21003      fi
21004      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21005    fi
21006  fi
21007
21008  # Now new_path has a complete unix path to the binary
21009  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21010    # Keep paths in /bin as-is, but remove trailing .exe if any
21011    new_path="${new_path/%.exe/}"
21012    # Do not save /bin paths to all_fixpath_prefixes!
21013  else
21014    # Not in mixed or Windows style, start by that.
21015    new_path=`cmd //c echo $new_path`
21016
21017  input_path="$new_path"
21018  # Check if we need to convert this using DOS-style short mode. If the path
21019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21020  # take no chances and rewrite it.
21021  # Note: m4 eats our [], so we need to use [ and ] instead.
21022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21023  if test "x$has_forbidden_chars" != x; then
21024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21026  fi
21027
21028    # Output is in $new_path
21029
21030  windows_path="$new_path"
21031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21032    unix_path=`$CYGPATH -u "$windows_path"`
21033    new_path="$unix_path"
21034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21036    new_path="$unix_path"
21037  fi
21038
21039    # remove trailing .exe if any
21040    new_path="${new_path/%.exe/}"
21041
21042    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21043    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21044  fi
21045
21046  else
21047    # We're on a posix platform. Hooray! :)
21048    # First separate the path from the arguments. This will split at the first
21049    # space.
21050    complete="$CXX"
21051    path="${complete%% *}"
21052    tmp="$complete EOL"
21053    arguments="${tmp#* }"
21054
21055    # Cannot rely on the command "which" here since it doesn't always work.
21056    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21057    if test -z "$is_absolute_path"; then
21058      # Path to executable is not absolute. Find it.
21059      IFS_save="$IFS"
21060      IFS=:
21061      for p in $PATH; do
21062        if test -f "$p/$path" && test -x "$p/$path"; then
21063          new_path="$p/$path"
21064          break
21065        fi
21066      done
21067      IFS="$IFS_save"
21068    else
21069      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21070$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21071      new_path="$path"
21072    fi
21073
21074    if test "x$new_path" = x; then
21075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21076$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21077      has_space=`$ECHO "$complete" | $GREP " "`
21078      if test "x$has_space" != x; then
21079        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21080$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21081      fi
21082      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21083    fi
21084  fi
21085
21086  # Now join together the path and the arguments once again
21087  if test "x$arguments" != xEOL; then
21088    new_complete="$new_path ${arguments% *}"
21089  else
21090    new_complete="$new_path"
21091  fi
21092
21093  if test "x$complete" != "x$new_complete"; then
21094    CXX="$new_complete"
21095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21096$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21097  fi
21098
21099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21100$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21101  TEST_COMPILER="$CXX"
21102
21103  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21104    # Follow a chain of symbolic links. Use readlink
21105    # where it exists, else fall back to horribly
21106    # complicated shell code.
21107    if test "x$READLINK_TESTED" != yes; then
21108      # On MacOSX there is a readlink tool with a different
21109      # purpose than the GNU readlink tool. Check the found readlink.
21110      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21111      if test "x$ISGNU" = x; then
21112        # A readlink that we do not know how to use.
21113        # Are there other non-GNU readlinks out there?
21114        READLINK_TESTED=yes
21115        READLINK=
21116      fi
21117    fi
21118
21119    if test "x$READLINK" != x; then
21120      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21121    else
21122      # Save the current directory for restoring afterwards
21123      STARTDIR=$PWD
21124      COUNTER=0
21125      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21126      sym_link_file=`$BASENAME $TEST_COMPILER`
21127      cd $sym_link_dir
21128      # Use -P flag to resolve symlinks in directories.
21129      cd `$THEPWDCMD -P`
21130      sym_link_dir=`$THEPWDCMD -P`
21131      # Resolve file symlinks
21132      while test $COUNTER -lt 20; do
21133        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21134        if test "x$ISLINK" == x; then
21135          # This is not a symbolic link! We are done!
21136          break
21137        fi
21138        # Again resolve directory symlinks since the target of the just found
21139        # link could be in a different directory
21140        cd `$DIRNAME $ISLINK`
21141        sym_link_dir=`$THEPWDCMD -P`
21142        sym_link_file=`$BASENAME $ISLINK`
21143        let COUNTER=COUNTER+1
21144      done
21145      cd $STARTDIR
21146      TEST_COMPILER=$sym_link_dir/$sym_link_file
21147    fi
21148  fi
21149
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21151$as_echo "$TEST_COMPILER" >&6; }
21152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21153$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21154
21155  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21156  if test "x$COMPILER_BASENAME" = "xccache"; then
21157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21158$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21159    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21160    # We want to control ccache invocation ourselves, so ignore this cc and try
21161    # searching again.
21162
21163    # Remove the path to the fake ccache cc from the PATH
21164    RETRY_COMPILER_SAVED_PATH="$PATH"
21165    COMPILER_DIRNAME=`$DIRNAME $CXX`
21166    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21167
21168    # Try again looking for our compiler
21169    if test -n "$ac_tool_prefix"; then
21170  for ac_prog in $COMPILER_CHECK_LIST
21171  do
21172    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21173set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21175$as_echo_n "checking for $ac_word... " >&6; }
21176if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21177  $as_echo_n "(cached) " >&6
21178else
21179  if test -n "$PROPER_COMPILER_CXX"; then
21180  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21181else
21182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21183for as_dir in $PATH
21184do
21185  IFS=$as_save_IFS
21186  test -z "$as_dir" && as_dir=.
21187    for ac_exec_ext in '' $ac_executable_extensions; do
21188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21189    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21191    break 2
21192  fi
21193done
21194  done
21195IFS=$as_save_IFS
21196
21197fi
21198fi
21199PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21200if test -n "$PROPER_COMPILER_CXX"; then
21201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21202$as_echo "$PROPER_COMPILER_CXX" >&6; }
21203else
21204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21205$as_echo "no" >&6; }
21206fi
21207
21208
21209    test -n "$PROPER_COMPILER_CXX" && break
21210  done
21211fi
21212if test -z "$PROPER_COMPILER_CXX"; then
21213  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21214  for ac_prog in $COMPILER_CHECK_LIST
21215do
21216  # Extract the first word of "$ac_prog", so it can be a program name with args.
21217set dummy $ac_prog; ac_word=$2
21218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21219$as_echo_n "checking for $ac_word... " >&6; }
21220if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21221  $as_echo_n "(cached) " >&6
21222else
21223  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21224  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21225else
21226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21227for as_dir in $PATH
21228do
21229  IFS=$as_save_IFS
21230  test -z "$as_dir" && as_dir=.
21231    for ac_exec_ext in '' $ac_executable_extensions; do
21232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21233    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21235    break 2
21236  fi
21237done
21238  done
21239IFS=$as_save_IFS
21240
21241fi
21242fi
21243ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21244if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21246$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21247else
21248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21249$as_echo "no" >&6; }
21250fi
21251
21252
21253  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21254done
21255
21256  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21257    PROPER_COMPILER_CXX=""
21258  else
21259    case $cross_compiling:$ac_tool_warned in
21260yes:)
21261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21263ac_tool_warned=yes ;;
21264esac
21265    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21266  fi
21267fi
21268
21269
21270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21271
21272  # First separate the path from the arguments. This will split at the first
21273  # space.
21274  complete="$PROPER_COMPILER_CXX"
21275  path="${complete%% *}"
21276  tmp="$complete EOL"
21277  arguments="${tmp#* }"
21278
21279  # Input might be given as Windows format, start by converting to
21280  # unix format.
21281  new_path=`$CYGPATH -u "$path"`
21282
21283  # Now try to locate executable using which
21284  new_path=`$WHICH "$new_path" 2> /dev/null`
21285  # bat and cmd files are not always considered executable in cygwin causing which
21286  # to not find them
21287  if test "x$new_path" = x \
21288      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21289      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21290    new_path=`$CYGPATH -u "$path"`
21291  fi
21292  if test "x$new_path" = x; then
21293    # Oops. Which didn't find the executable.
21294    # The splitting of arguments from the executable at a space might have been incorrect,
21295    # since paths with space are more likely in Windows. Give it another try with the whole
21296    # argument.
21297    path="$complete"
21298    arguments="EOL"
21299    new_path=`$CYGPATH -u "$path"`
21300    new_path=`$WHICH "$new_path" 2> /dev/null`
21301    # bat and cmd files are not always considered executable in cygwin causing which
21302    # to not find them
21303    if test "x$new_path" = x \
21304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21306      new_path=`$CYGPATH -u "$path"`
21307    fi
21308    if test "x$new_path" = x; then
21309      # It's still not found. Now this is an unrecoverable error.
21310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21311$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21312      has_space=`$ECHO "$complete" | $GREP " "`
21313      if test "x$has_space" != x; then
21314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21316      fi
21317      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21318    fi
21319  fi
21320
21321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21324  # "foo.exe" is OK but "foo" is an error.
21325  #
21326  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21327  # It is also a way to make sure we got the proper file name for the real test later on.
21328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21329  if test "x$test_shortpath" = x; then
21330    # Short path failed, file does not exist as specified.
21331    # Try adding .exe or .cmd
21332    if test -f "${new_path}.exe"; then
21333      input_to_shortpath="${new_path}.exe"
21334    elif test -f "${new_path}.cmd"; then
21335      input_to_shortpath="${new_path}.cmd"
21336    else
21337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21338$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21339      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21341      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21342    fi
21343  else
21344    input_to_shortpath="$new_path"
21345  fi
21346
21347  # Call helper function which possibly converts this using DOS-style short mode.
21348  # If so, the updated path is stored in $new_path.
21349  new_path="$input_to_shortpath"
21350
21351  input_path="$input_to_shortpath"
21352  # Check if we need to convert this using DOS-style short mode. If the path
21353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21354  # take no chances and rewrite it.
21355  # Note: m4 eats our [], so we need to use [ and ] instead.
21356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21357  if test "x$has_forbidden_chars" != x; then
21358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21362      # Going to short mode and back again did indeed matter. Since short mode is
21363      # case insensitive, let's make it lowercase to improve readability.
21364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21365      # Now convert it back to Unix-stile (cygpath)
21366      input_path=`$CYGPATH -u "$shortmode_path"`
21367      new_path="$input_path"
21368    fi
21369  fi
21370
21371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21372  if test "x$test_cygdrive_prefix" = x; then
21373    # As a simple fix, exclude /usr/bin since it's not a real path.
21374    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21376      # a path prefixed by /cygdrive for fixpath to work.
21377      new_path="$CYGWIN_ROOT_PATH$input_path"
21378    fi
21379  fi
21380
21381  # remove trailing .exe if any
21382  new_path="${new_path/%.exe/}"
21383
21384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21385
21386  # First separate the path from the arguments. This will split at the first
21387  # space.
21388  complete="$PROPER_COMPILER_CXX"
21389  path="${complete%% *}"
21390  tmp="$complete EOL"
21391  arguments="${tmp#* }"
21392
21393  # Input might be given as Windows format, start by converting to
21394  # unix format.
21395  new_path="$path"
21396
21397  windows_path="$new_path"
21398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21399    unix_path=`$CYGPATH -u "$windows_path"`
21400    new_path="$unix_path"
21401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21403    new_path="$unix_path"
21404  fi
21405
21406
21407  # Now try to locate executable using which
21408  new_path=`$WHICH "$new_path" 2> /dev/null`
21409
21410  if test "x$new_path" = x; then
21411    # Oops. Which didn't find the executable.
21412    # The splitting of arguments from the executable at a space might have been incorrect,
21413    # since paths with space are more likely in Windows. Give it another try with the whole
21414    # argument.
21415    path="$complete"
21416    arguments="EOL"
21417    new_path="$path"
21418
21419  windows_path="$new_path"
21420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21421    unix_path=`$CYGPATH -u "$windows_path"`
21422    new_path="$unix_path"
21423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21425    new_path="$unix_path"
21426  fi
21427
21428
21429    new_path=`$WHICH "$new_path" 2> /dev/null`
21430
21431    if test "x$new_path" = x; then
21432      # It's still not found. Now this is an unrecoverable error.
21433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21434$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21435      has_space=`$ECHO "$complete" | $GREP " "`
21436      if test "x$has_space" != x; then
21437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21439      fi
21440      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21441    fi
21442  fi
21443
21444  # Now new_path has a complete unix path to the binary
21445  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21446    # Keep paths in /bin as-is, but remove trailing .exe if any
21447    new_path="${new_path/%.exe/}"
21448    # Do not save /bin paths to all_fixpath_prefixes!
21449  else
21450    # Not in mixed or Windows style, start by that.
21451    new_path=`cmd //c echo $new_path`
21452
21453  input_path="$new_path"
21454  # Check if we need to convert this using DOS-style short mode. If the path
21455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21456  # take no chances and rewrite it.
21457  # Note: m4 eats our [], so we need to use [ and ] instead.
21458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21459  if test "x$has_forbidden_chars" != x; then
21460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21462  fi
21463
21464    # Output is in $new_path
21465
21466  windows_path="$new_path"
21467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21468    unix_path=`$CYGPATH -u "$windows_path"`
21469    new_path="$unix_path"
21470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21472    new_path="$unix_path"
21473  fi
21474
21475    # remove trailing .exe if any
21476    new_path="${new_path/%.exe/}"
21477
21478    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21479    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21480  fi
21481
21482  else
21483    # We're on a posix platform. Hooray! :)
21484    # First separate the path from the arguments. This will split at the first
21485    # space.
21486    complete="$PROPER_COMPILER_CXX"
21487    path="${complete%% *}"
21488    tmp="$complete EOL"
21489    arguments="${tmp#* }"
21490
21491    # Cannot rely on the command "which" here since it doesn't always work.
21492    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21493    if test -z "$is_absolute_path"; then
21494      # Path to executable is not absolute. Find it.
21495      IFS_save="$IFS"
21496      IFS=:
21497      for p in $PATH; do
21498        if test -f "$p/$path" && test -x "$p/$path"; then
21499          new_path="$p/$path"
21500          break
21501        fi
21502      done
21503      IFS="$IFS_save"
21504    else
21505      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21506$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21507      new_path="$path"
21508    fi
21509
21510    if test "x$new_path" = x; then
21511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21512$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21513      has_space=`$ECHO "$complete" | $GREP " "`
21514      if test "x$has_space" != x; then
21515        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21517      fi
21518      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21519    fi
21520  fi
21521
21522  # Now join together the path and the arguments once again
21523  if test "x$arguments" != xEOL; then
21524    new_complete="$new_path ${arguments% *}"
21525  else
21526    new_complete="$new_path"
21527  fi
21528
21529  if test "x$complete" != "x$new_complete"; then
21530    PROPER_COMPILER_CXX="$new_complete"
21531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21532$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21533  fi
21534
21535    PATH="$RETRY_COMPILER_SAVED_PATH"
21536
21537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21538$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21539
21540  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21541    # Follow a chain of symbolic links. Use readlink
21542    # where it exists, else fall back to horribly
21543    # complicated shell code.
21544    if test "x$READLINK_TESTED" != yes; then
21545      # On MacOSX there is a readlink tool with a different
21546      # purpose than the GNU readlink tool. Check the found readlink.
21547      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21548      if test "x$ISGNU" = x; then
21549        # A readlink that we do not know how to use.
21550        # Are there other non-GNU readlinks out there?
21551        READLINK_TESTED=yes
21552        READLINK=
21553      fi
21554    fi
21555
21556    if test "x$READLINK" != x; then
21557      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21558    else
21559      # Save the current directory for restoring afterwards
21560      STARTDIR=$PWD
21561      COUNTER=0
21562      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21563      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21564      cd $sym_link_dir
21565      # Use -P flag to resolve symlinks in directories.
21566      cd `$THEPWDCMD -P`
21567      sym_link_dir=`$THEPWDCMD -P`
21568      # Resolve file symlinks
21569      while test $COUNTER -lt 20; do
21570        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21571        if test "x$ISLINK" == x; then
21572          # This is not a symbolic link! We are done!
21573          break
21574        fi
21575        # Again resolve directory symlinks since the target of the just found
21576        # link could be in a different directory
21577        cd `$DIRNAME $ISLINK`
21578        sym_link_dir=`$THEPWDCMD -P`
21579        sym_link_file=`$BASENAME $ISLINK`
21580        let COUNTER=COUNTER+1
21581      done
21582      cd $STARTDIR
21583      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21584    fi
21585  fi
21586
21587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21588$as_echo "$PROPER_COMPILER_CXX" >&6; }
21589    CXX="$PROPER_COMPILER_CXX"
21590  else
21591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21592$as_echo "no, keeping CXX" >&6; }
21593    CXX="$TEST_COMPILER"
21594  fi
21595
21596  COMPILER=$CXX
21597  COMPILER_NAME=$COMPILER_NAME
21598
21599  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21600    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21601    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21602    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21603    if test $? -ne 0; then
21604      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21605
21606      { $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
21607$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21608      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21609$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21610      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21611    else
21612      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21613      COMPILER_VENDOR="Sun Studio"
21614    fi
21615  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21616    # First line typically looks something like:
21617    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21618    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21619    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21620    COMPILER_VENDOR="Microsoft CL.EXE"
21621    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21622    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21623      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21624        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21625      fi
21626    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21627      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21628        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21629      fi
21630    fi
21631  else
21632    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21633    # Check that this is likely to be GCC.
21634    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21635    if test $? -ne 0; then
21636      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21637$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21638      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21639$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21640      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21641    fi
21642
21643    # First line typically looks something like:
21644    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21645    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21646    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21647  fi
21648  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21649  CXX_VERSION="$COMPILER_VERSION"
21650  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21651  CXX_VENDOR="$COMPILER_VENDOR"
21652
21653  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21654$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21655
21656
21657  # Now that we have resolved CXX ourself, let autoconf have its go at it
21658  ac_ext=cpp
21659ac_cpp='$CXXCPP $CPPFLAGS'
21660ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21661ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21662ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21663if test -z "$CXX"; then
21664  if test -n "$CCC"; then
21665    CXX=$CCC
21666  else
21667    if test -n "$ac_tool_prefix"; then
21668  for ac_prog in $CXX
21669  do
21670    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21671set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21673$as_echo_n "checking for $ac_word... " >&6; }
21674if ${ac_cv_prog_CXX+:} false; then :
21675  $as_echo_n "(cached) " >&6
21676else
21677  if test -n "$CXX"; then
21678  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21679else
21680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21681for as_dir in $PATH
21682do
21683  IFS=$as_save_IFS
21684  test -z "$as_dir" && as_dir=.
21685    for ac_exec_ext in '' $ac_executable_extensions; do
21686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21687    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21689    break 2
21690  fi
21691done
21692  done
21693IFS=$as_save_IFS
21694
21695fi
21696fi
21697CXX=$ac_cv_prog_CXX
21698if test -n "$CXX"; then
21699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21700$as_echo "$CXX" >&6; }
21701else
21702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21703$as_echo "no" >&6; }
21704fi
21705
21706
21707    test -n "$CXX" && break
21708  done
21709fi
21710if test -z "$CXX"; then
21711  ac_ct_CXX=$CXX
21712  for ac_prog in $CXX
21713do
21714  # Extract the first word of "$ac_prog", so it can be a program name with args.
21715set dummy $ac_prog; ac_word=$2
21716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21717$as_echo_n "checking for $ac_word... " >&6; }
21718if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21719  $as_echo_n "(cached) " >&6
21720else
21721  if test -n "$ac_ct_CXX"; then
21722  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21723else
21724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21725for as_dir in $PATH
21726do
21727  IFS=$as_save_IFS
21728  test -z "$as_dir" && as_dir=.
21729    for ac_exec_ext in '' $ac_executable_extensions; do
21730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21731    ac_cv_prog_ac_ct_CXX="$ac_prog"
21732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21733    break 2
21734  fi
21735done
21736  done
21737IFS=$as_save_IFS
21738
21739fi
21740fi
21741ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21742if test -n "$ac_ct_CXX"; then
21743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21744$as_echo "$ac_ct_CXX" >&6; }
21745else
21746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21747$as_echo "no" >&6; }
21748fi
21749
21750
21751  test -n "$ac_ct_CXX" && break
21752done
21753
21754  if test "x$ac_ct_CXX" = x; then
21755    CXX="g++"
21756  else
21757    case $cross_compiling:$ac_tool_warned in
21758yes:)
21759{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21760$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21761ac_tool_warned=yes ;;
21762esac
21763    CXX=$ac_ct_CXX
21764  fi
21765fi
21766
21767  fi
21768fi
21769# Provide some information about the compiler.
21770$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21771set X $ac_compile
21772ac_compiler=$2
21773for ac_option in --version -v -V -qversion; do
21774  { { ac_try="$ac_compiler $ac_option >&5"
21775case "(($ac_try" in
21776  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21777  *) ac_try_echo=$ac_try;;
21778esac
21779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21780$as_echo "$ac_try_echo"; } >&5
21781  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21782  ac_status=$?
21783  if test -s conftest.err; then
21784    sed '10a\
21785... rest of stderr output deleted ...
21786         10q' conftest.err >conftest.er1
21787    cat conftest.er1 >&5
21788  fi
21789  rm -f conftest.er1 conftest.err
21790  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21791  test $ac_status = 0; }
21792done
21793
21794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21795$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21796if ${ac_cv_cxx_compiler_gnu+:} false; then :
21797  $as_echo_n "(cached) " >&6
21798else
21799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21800/* end confdefs.h.  */
21801
21802int
21803main ()
21804{
21805#ifndef __GNUC__
21806       choke me
21807#endif
21808
21809  ;
21810  return 0;
21811}
21812_ACEOF
21813if ac_fn_cxx_try_compile "$LINENO"; then :
21814  ac_compiler_gnu=yes
21815else
21816  ac_compiler_gnu=no
21817fi
21818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21819ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21820
21821fi
21822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21823$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21824if test $ac_compiler_gnu = yes; then
21825  GXX=yes
21826else
21827  GXX=
21828fi
21829ac_test_CXXFLAGS=${CXXFLAGS+set}
21830ac_save_CXXFLAGS=$CXXFLAGS
21831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21832$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21833if ${ac_cv_prog_cxx_g+:} false; then :
21834  $as_echo_n "(cached) " >&6
21835else
21836  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21837   ac_cxx_werror_flag=yes
21838   ac_cv_prog_cxx_g=no
21839   CXXFLAGS="-g"
21840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21841/* end confdefs.h.  */
21842
21843int
21844main ()
21845{
21846
21847  ;
21848  return 0;
21849}
21850_ACEOF
21851if ac_fn_cxx_try_compile "$LINENO"; then :
21852  ac_cv_prog_cxx_g=yes
21853else
21854  CXXFLAGS=""
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
21868else
21869  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21870	 CXXFLAGS="-g"
21871	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21872/* end confdefs.h.  */
21873
21874int
21875main ()
21876{
21877
21878  ;
21879  return 0;
21880}
21881_ACEOF
21882if ac_fn_cxx_try_compile "$LINENO"; then :
21883  ac_cv_prog_cxx_g=yes
21884fi
21885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21886fi
21887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21888fi
21889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21890   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21891fi
21892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21893$as_echo "$ac_cv_prog_cxx_g" >&6; }
21894if test "$ac_test_CXXFLAGS" = set; then
21895  CXXFLAGS=$ac_save_CXXFLAGS
21896elif test $ac_cv_prog_cxx_g = yes; then
21897  if test "$GXX" = yes; then
21898    CXXFLAGS="-g -O2"
21899  else
21900    CXXFLAGS="-g"
21901  fi
21902else
21903  if test "$GXX" = yes; then
21904    CXXFLAGS="-O2"
21905  else
21906    CXXFLAGS=
21907  fi
21908fi
21909ac_ext=cpp
21910ac_cpp='$CXXCPP $CPPFLAGS'
21911ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21912ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21913ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21914
21915
21916  ### Locate other tools
21917
21918  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21919    ac_ext=m
21920ac_cpp='$OBJCPP $CPPFLAGS'
21921ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21922ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21923ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21924if test -n "$ac_tool_prefix"; then
21925  for ac_prog in gcc objcc objc cc CC
21926  do
21927    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21928set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21930$as_echo_n "checking for $ac_word... " >&6; }
21931if ${ac_cv_prog_OBJC+:} false; then :
21932  $as_echo_n "(cached) " >&6
21933else
21934  if test -n "$OBJC"; then
21935  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21936else
21937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21938for as_dir in $PATH
21939do
21940  IFS=$as_save_IFS
21941  test -z "$as_dir" && as_dir=.
21942    for ac_exec_ext in '' $ac_executable_extensions; do
21943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21944    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21946    break 2
21947  fi
21948done
21949  done
21950IFS=$as_save_IFS
21951
21952fi
21953fi
21954OBJC=$ac_cv_prog_OBJC
21955if test -n "$OBJC"; then
21956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21957$as_echo "$OBJC" >&6; }
21958else
21959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21960$as_echo "no" >&6; }
21961fi
21962
21963
21964    test -n "$OBJC" && break
21965  done
21966fi
21967if test -z "$OBJC"; then
21968  ac_ct_OBJC=$OBJC
21969  for ac_prog in gcc objcc objc cc CC
21970do
21971  # Extract the first word of "$ac_prog", so it can be a program name with args.
21972set dummy $ac_prog; ac_word=$2
21973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21974$as_echo_n "checking for $ac_word... " >&6; }
21975if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21976  $as_echo_n "(cached) " >&6
21977else
21978  if test -n "$ac_ct_OBJC"; then
21979  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21980else
21981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21982for as_dir in $PATH
21983do
21984  IFS=$as_save_IFS
21985  test -z "$as_dir" && as_dir=.
21986    for ac_exec_ext in '' $ac_executable_extensions; do
21987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21988    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21990    break 2
21991  fi
21992done
21993  done
21994IFS=$as_save_IFS
21995
21996fi
21997fi
21998ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21999if test -n "$ac_ct_OBJC"; then
22000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22001$as_echo "$ac_ct_OBJC" >&6; }
22002else
22003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22004$as_echo "no" >&6; }
22005fi
22006
22007
22008  test -n "$ac_ct_OBJC" && break
22009done
22010
22011  if test "x$ac_ct_OBJC" = x; then
22012    OBJC="gcc"
22013  else
22014    case $cross_compiling:$ac_tool_warned in
22015yes:)
22016{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22017$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22018ac_tool_warned=yes ;;
22019esac
22020    OBJC=$ac_ct_OBJC
22021  fi
22022fi
22023
22024# Provide some information about the compiler.
22025$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22026set X $ac_compile
22027ac_compiler=$2
22028for ac_option in --version -v -V -qversion; do
22029  { { ac_try="$ac_compiler $ac_option >&5"
22030case "(($ac_try" in
22031  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22032  *) ac_try_echo=$ac_try;;
22033esac
22034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22035$as_echo "$ac_try_echo"; } >&5
22036  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22037  ac_status=$?
22038  if test -s conftest.err; then
22039    sed '10a\
22040... rest of stderr output deleted ...
22041         10q' conftest.err >conftest.er1
22042    cat conftest.er1 >&5
22043  fi
22044  rm -f conftest.er1 conftest.err
22045  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22046  test $ac_status = 0; }
22047done
22048
22049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22050$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22051if ${ac_cv_objc_compiler_gnu+:} false; then :
22052  $as_echo_n "(cached) " >&6
22053else
22054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22055/* end confdefs.h.  */
22056
22057int
22058main ()
22059{
22060#ifndef __GNUC__
22061       choke me
22062#endif
22063
22064  ;
22065  return 0;
22066}
22067_ACEOF
22068if ac_fn_objc_try_compile "$LINENO"; then :
22069  ac_compiler_gnu=yes
22070else
22071  ac_compiler_gnu=no
22072fi
22073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22074ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22075
22076fi
22077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22078$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22079if test $ac_compiler_gnu = yes; then
22080  GOBJC=yes
22081else
22082  GOBJC=
22083fi
22084ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22085ac_save_OBJCFLAGS=$OBJCFLAGS
22086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22087$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22088if ${ac_cv_prog_objc_g+:} false; then :
22089  $as_echo_n "(cached) " >&6
22090else
22091  ac_save_objc_werror_flag=$ac_objc_werror_flag
22092   ac_objc_werror_flag=yes
22093   ac_cv_prog_objc_g=no
22094   OBJCFLAGS="-g"
22095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22096/* end confdefs.h.  */
22097
22098int
22099main ()
22100{
22101
22102  ;
22103  return 0;
22104}
22105_ACEOF
22106if ac_fn_objc_try_compile "$LINENO"; then :
22107  ac_cv_prog_objc_g=yes
22108else
22109  OBJCFLAGS=""
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
22123else
22124  ac_objc_werror_flag=$ac_save_objc_werror_flag
22125	 OBJCFLAGS="-g"
22126	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22127/* end confdefs.h.  */
22128
22129int
22130main ()
22131{
22132
22133  ;
22134  return 0;
22135}
22136_ACEOF
22137if ac_fn_objc_try_compile "$LINENO"; then :
22138  ac_cv_prog_objc_g=yes
22139fi
22140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22141fi
22142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22143fi
22144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22145   ac_objc_werror_flag=$ac_save_objc_werror_flag
22146fi
22147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22148$as_echo "$ac_cv_prog_objc_g" >&6; }
22149if test "$ac_test_OBJCFLAGS" = set; then
22150  OBJCFLAGS=$ac_save_OBJCFLAGS
22151elif test $ac_cv_prog_objc_g = yes; then
22152  if test "$GOBJC" = yes; then
22153    OBJCFLAGS="-g -O2"
22154  else
22155    OBJCFLAGS="-g"
22156  fi
22157else
22158  if test "$GOBJC" = yes; then
22159    OBJCFLAGS="-O2"
22160  else
22161    OBJCFLAGS=
22162  fi
22163fi
22164ac_ext=cpp
22165ac_cpp='$CXXCPP $CPPFLAGS'
22166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22169
22170
22171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22172
22173  # First separate the path from the arguments. This will split at the first
22174  # space.
22175  complete="$OBJC"
22176  path="${complete%% *}"
22177  tmp="$complete EOL"
22178  arguments="${tmp#* }"
22179
22180  # Input might be given as Windows format, start by converting to
22181  # unix format.
22182  new_path=`$CYGPATH -u "$path"`
22183
22184  # Now try to locate executable using which
22185  new_path=`$WHICH "$new_path" 2> /dev/null`
22186  # bat and cmd files are not always considered executable in cygwin causing which
22187  # to not find them
22188  if test "x$new_path" = x \
22189      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22190      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22191    new_path=`$CYGPATH -u "$path"`
22192  fi
22193  if test "x$new_path" = x; then
22194    # Oops. Which didn't find the executable.
22195    # The splitting of arguments from the executable at a space might have been incorrect,
22196    # since paths with space are more likely in Windows. Give it another try with the whole
22197    # argument.
22198    path="$complete"
22199    arguments="EOL"
22200    new_path=`$CYGPATH -u "$path"`
22201    new_path=`$WHICH "$new_path" 2> /dev/null`
22202    # bat and cmd files are not always considered executable in cygwin causing which
22203    # to not find them
22204    if test "x$new_path" = x \
22205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22207      new_path=`$CYGPATH -u "$path"`
22208    fi
22209    if test "x$new_path" = x; then
22210      # It's still not found. Now this is an unrecoverable error.
22211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22212$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22213      has_space=`$ECHO "$complete" | $GREP " "`
22214      if test "x$has_space" != x; then
22215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22217      fi
22218      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22219    fi
22220  fi
22221
22222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22225  # "foo.exe" is OK but "foo" is an error.
22226  #
22227  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22228  # It is also a way to make sure we got the proper file name for the real test later on.
22229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22230  if test "x$test_shortpath" = x; then
22231    # Short path failed, file does not exist as specified.
22232    # Try adding .exe or .cmd
22233    if test -f "${new_path}.exe"; then
22234      input_to_shortpath="${new_path}.exe"
22235    elif test -f "${new_path}.cmd"; then
22236      input_to_shortpath="${new_path}.cmd"
22237    else
22238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22239$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22240      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22241$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22242      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22243    fi
22244  else
22245    input_to_shortpath="$new_path"
22246  fi
22247
22248  # Call helper function which possibly converts this using DOS-style short mode.
22249  # If so, the updated path is stored in $new_path.
22250  new_path="$input_to_shortpath"
22251
22252  input_path="$input_to_shortpath"
22253  # Check if we need to convert this using DOS-style short mode. If the path
22254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22255  # take no chances and rewrite it.
22256  # Note: m4 eats our [], so we need to use [ and ] instead.
22257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22258  if test "x$has_forbidden_chars" != x; then
22259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22263      # Going to short mode and back again did indeed matter. Since short mode is
22264      # case insensitive, let's make it lowercase to improve readability.
22265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22266      # Now convert it back to Unix-stile (cygpath)
22267      input_path=`$CYGPATH -u "$shortmode_path"`
22268      new_path="$input_path"
22269    fi
22270  fi
22271
22272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22273  if test "x$test_cygdrive_prefix" = x; then
22274    # As a simple fix, exclude /usr/bin since it's not a real path.
22275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22277      # a path prefixed by /cygdrive for fixpath to work.
22278      new_path="$CYGWIN_ROOT_PATH$input_path"
22279    fi
22280  fi
22281
22282  # remove trailing .exe if any
22283  new_path="${new_path/%.exe/}"
22284
22285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22286
22287  # First separate the path from the arguments. This will split at the first
22288  # space.
22289  complete="$OBJC"
22290  path="${complete%% *}"
22291  tmp="$complete EOL"
22292  arguments="${tmp#* }"
22293
22294  # Input might be given as Windows format, start by converting to
22295  # unix format.
22296  new_path="$path"
22297
22298  windows_path="$new_path"
22299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22300    unix_path=`$CYGPATH -u "$windows_path"`
22301    new_path="$unix_path"
22302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22304    new_path="$unix_path"
22305  fi
22306
22307
22308  # Now try to locate executable using which
22309  new_path=`$WHICH "$new_path" 2> /dev/null`
22310
22311  if test "x$new_path" = x; then
22312    # Oops. Which didn't find the executable.
22313    # The splitting of arguments from the executable at a space might have been incorrect,
22314    # since paths with space are more likely in Windows. Give it another try with the whole
22315    # argument.
22316    path="$complete"
22317    arguments="EOL"
22318    new_path="$path"
22319
22320  windows_path="$new_path"
22321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22322    unix_path=`$CYGPATH -u "$windows_path"`
22323    new_path="$unix_path"
22324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22326    new_path="$unix_path"
22327  fi
22328
22329
22330    new_path=`$WHICH "$new_path" 2> /dev/null`
22331
22332    if test "x$new_path" = x; then
22333      # It's still not found. Now this is an unrecoverable error.
22334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22335$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22336      has_space=`$ECHO "$complete" | $GREP " "`
22337      if test "x$has_space" != x; then
22338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22340      fi
22341      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22342    fi
22343  fi
22344
22345  # Now new_path has a complete unix path to the binary
22346  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22347    # Keep paths in /bin as-is, but remove trailing .exe if any
22348    new_path="${new_path/%.exe/}"
22349    # Do not save /bin paths to all_fixpath_prefixes!
22350  else
22351    # Not in mixed or Windows style, start by that.
22352    new_path=`cmd //c echo $new_path`
22353
22354  input_path="$new_path"
22355  # Check if we need to convert this using DOS-style short mode. If the path
22356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22357  # take no chances and rewrite it.
22358  # Note: m4 eats our [], so we need to use [ and ] instead.
22359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22360  if test "x$has_forbidden_chars" != x; then
22361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22363  fi
22364
22365    # Output is in $new_path
22366
22367  windows_path="$new_path"
22368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22369    unix_path=`$CYGPATH -u "$windows_path"`
22370    new_path="$unix_path"
22371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22373    new_path="$unix_path"
22374  fi
22375
22376    # remove trailing .exe if any
22377    new_path="${new_path/%.exe/}"
22378
22379    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22380    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22381  fi
22382
22383  else
22384    # We're on a posix platform. Hooray! :)
22385    # First separate the path from the arguments. This will split at the first
22386    # space.
22387    complete="$OBJC"
22388    path="${complete%% *}"
22389    tmp="$complete EOL"
22390    arguments="${tmp#* }"
22391
22392    # Cannot rely on the command "which" here since it doesn't always work.
22393    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22394    if test -z "$is_absolute_path"; then
22395      # Path to executable is not absolute. Find it.
22396      IFS_save="$IFS"
22397      IFS=:
22398      for p in $PATH; do
22399        if test -f "$p/$path" && test -x "$p/$path"; then
22400          new_path="$p/$path"
22401          break
22402        fi
22403      done
22404      IFS="$IFS_save"
22405    else
22406      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22407$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22408      new_path="$path"
22409    fi
22410
22411    if test "x$new_path" = x; then
22412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22413$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22414      has_space=`$ECHO "$complete" | $GREP " "`
22415      if test "x$has_space" != x; then
22416        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22417$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22418      fi
22419      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22420    fi
22421  fi
22422
22423  # Now join together the path and the arguments once again
22424  if test "x$arguments" != xEOL; then
22425    new_complete="$new_path ${arguments% *}"
22426  else
22427    new_complete="$new_path"
22428  fi
22429
22430  if test "x$complete" != "x$new_complete"; then
22431    OBJC="$new_complete"
22432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22433$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22434  fi
22435
22436  else
22437    OBJC=
22438  fi
22439
22440  # Restore the flags to the user specified values.
22441  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22442  CFLAGS="$ORG_CFLAGS"
22443  CXXFLAGS="$ORG_CXXFLAGS"
22444  OBJCFLAGS="$ORG_OBJCFLAGS"
22445
22446  LD="$CC"
22447  LDEXE="$CC"
22448  LDCXX="$CXX"
22449  LDEXECXX="$CXX"
22450
22451  # LDEXE is the linker to use, when creating executables.
22452
22453  # Linking C++ libraries.
22454
22455  # Linking C++ executables.
22456
22457
22458  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22459    if test -n "$ac_tool_prefix"; then
22460  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22461set dummy ${ac_tool_prefix}ar; ac_word=$2
22462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22463$as_echo_n "checking for $ac_word... " >&6; }
22464if ${ac_cv_prog_AR+:} false; then :
22465  $as_echo_n "(cached) " >&6
22466else
22467  if test -n "$AR"; then
22468  ac_cv_prog_AR="$AR" # Let the user override the test.
22469else
22470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22471for as_dir in $PATH
22472do
22473  IFS=$as_save_IFS
22474  test -z "$as_dir" && as_dir=.
22475    for ac_exec_ext in '' $ac_executable_extensions; do
22476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22477    ac_cv_prog_AR="${ac_tool_prefix}ar"
22478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22479    break 2
22480  fi
22481done
22482  done
22483IFS=$as_save_IFS
22484
22485fi
22486fi
22487AR=$ac_cv_prog_AR
22488if test -n "$AR"; then
22489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22490$as_echo "$AR" >&6; }
22491else
22492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22493$as_echo "no" >&6; }
22494fi
22495
22496
22497fi
22498if test -z "$ac_cv_prog_AR"; then
22499  ac_ct_AR=$AR
22500  # Extract the first word of "ar", so it can be a program name with args.
22501set dummy ar; ac_word=$2
22502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22503$as_echo_n "checking for $ac_word... " >&6; }
22504if ${ac_cv_prog_ac_ct_AR+:} false; then :
22505  $as_echo_n "(cached) " >&6
22506else
22507  if test -n "$ac_ct_AR"; then
22508  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22509else
22510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22511for as_dir in $PATH
22512do
22513  IFS=$as_save_IFS
22514  test -z "$as_dir" && as_dir=.
22515    for ac_exec_ext in '' $ac_executable_extensions; do
22516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22517    ac_cv_prog_ac_ct_AR="ar"
22518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22519    break 2
22520  fi
22521done
22522  done
22523IFS=$as_save_IFS
22524
22525fi
22526fi
22527ac_ct_AR=$ac_cv_prog_ac_ct_AR
22528if test -n "$ac_ct_AR"; then
22529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22530$as_echo "$ac_ct_AR" >&6; }
22531else
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22533$as_echo "no" >&6; }
22534fi
22535
22536  if test "x$ac_ct_AR" = x; then
22537    AR=""
22538  else
22539    case $cross_compiling:$ac_tool_warned in
22540yes:)
22541{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22542$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22543ac_tool_warned=yes ;;
22544esac
22545    AR=$ac_ct_AR
22546  fi
22547else
22548  AR="$ac_cv_prog_AR"
22549fi
22550
22551
22552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22553
22554  # First separate the path from the arguments. This will split at the first
22555  # space.
22556  complete="$AR"
22557  path="${complete%% *}"
22558  tmp="$complete EOL"
22559  arguments="${tmp#* }"
22560
22561  # Input might be given as Windows format, start by converting to
22562  # unix format.
22563  new_path=`$CYGPATH -u "$path"`
22564
22565  # Now try to locate executable using which
22566  new_path=`$WHICH "$new_path" 2> /dev/null`
22567  # bat and cmd files are not always considered executable in cygwin causing which
22568  # to not find them
22569  if test "x$new_path" = x \
22570      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22571      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22572    new_path=`$CYGPATH -u "$path"`
22573  fi
22574  if test "x$new_path" = x; then
22575    # Oops. Which didn't find the executable.
22576    # The splitting of arguments from the executable at a space might have been incorrect,
22577    # since paths with space are more likely in Windows. Give it another try with the whole
22578    # argument.
22579    path="$complete"
22580    arguments="EOL"
22581    new_path=`$CYGPATH -u "$path"`
22582    new_path=`$WHICH "$new_path" 2> /dev/null`
22583    # bat and cmd files are not always considered executable in cygwin causing which
22584    # to not find them
22585    if test "x$new_path" = x \
22586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22588      new_path=`$CYGPATH -u "$path"`
22589    fi
22590    if test "x$new_path" = x; then
22591      # It's still not found. Now this is an unrecoverable error.
22592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22593$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22594      has_space=`$ECHO "$complete" | $GREP " "`
22595      if test "x$has_space" != x; then
22596        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22597$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22598      fi
22599      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22600    fi
22601  fi
22602
22603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22606  # "foo.exe" is OK but "foo" is an error.
22607  #
22608  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22609  # It is also a way to make sure we got the proper file name for the real test later on.
22610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22611  if test "x$test_shortpath" = x; then
22612    # Short path failed, file does not exist as specified.
22613    # Try adding .exe or .cmd
22614    if test -f "${new_path}.exe"; then
22615      input_to_shortpath="${new_path}.exe"
22616    elif test -f "${new_path}.cmd"; then
22617      input_to_shortpath="${new_path}.cmd"
22618    else
22619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22620$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22621      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22622$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22623      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22624    fi
22625  else
22626    input_to_shortpath="$new_path"
22627  fi
22628
22629  # Call helper function which possibly converts this using DOS-style short mode.
22630  # If so, the updated path is stored in $new_path.
22631  new_path="$input_to_shortpath"
22632
22633  input_path="$input_to_shortpath"
22634  # Check if we need to convert this using DOS-style short mode. If the path
22635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22636  # take no chances and rewrite it.
22637  # Note: m4 eats our [], so we need to use [ and ] instead.
22638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22639  if test "x$has_forbidden_chars" != x; then
22640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22644      # Going to short mode and back again did indeed matter. Since short mode is
22645      # case insensitive, let's make it lowercase to improve readability.
22646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22647      # Now convert it back to Unix-stile (cygpath)
22648      input_path=`$CYGPATH -u "$shortmode_path"`
22649      new_path="$input_path"
22650    fi
22651  fi
22652
22653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22654  if test "x$test_cygdrive_prefix" = x; then
22655    # As a simple fix, exclude /usr/bin since it's not a real path.
22656    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22658      # a path prefixed by /cygdrive for fixpath to work.
22659      new_path="$CYGWIN_ROOT_PATH$input_path"
22660    fi
22661  fi
22662
22663  # remove trailing .exe if any
22664  new_path="${new_path/%.exe/}"
22665
22666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22667
22668  # First separate the path from the arguments. This will split at the first
22669  # space.
22670  complete="$AR"
22671  path="${complete%% *}"
22672  tmp="$complete EOL"
22673  arguments="${tmp#* }"
22674
22675  # Input might be given as Windows format, start by converting to
22676  # unix format.
22677  new_path="$path"
22678
22679  windows_path="$new_path"
22680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22681    unix_path=`$CYGPATH -u "$windows_path"`
22682    new_path="$unix_path"
22683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22685    new_path="$unix_path"
22686  fi
22687
22688
22689  # Now try to locate executable using which
22690  new_path=`$WHICH "$new_path" 2> /dev/null`
22691
22692  if test "x$new_path" = x; then
22693    # Oops. Which didn't find the executable.
22694    # The splitting of arguments from the executable at a space might have been incorrect,
22695    # since paths with space are more likely in Windows. Give it another try with the whole
22696    # argument.
22697    path="$complete"
22698    arguments="EOL"
22699    new_path="$path"
22700
22701  windows_path="$new_path"
22702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22703    unix_path=`$CYGPATH -u "$windows_path"`
22704    new_path="$unix_path"
22705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22707    new_path="$unix_path"
22708  fi
22709
22710
22711    new_path=`$WHICH "$new_path" 2> /dev/null`
22712
22713    if test "x$new_path" = x; then
22714      # It's still not found. Now this is an unrecoverable error.
22715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22716$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22717      has_space=`$ECHO "$complete" | $GREP " "`
22718      if test "x$has_space" != x; then
22719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22721      fi
22722      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22723    fi
22724  fi
22725
22726  # Now new_path has a complete unix path to the binary
22727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22728    # Keep paths in /bin as-is, but remove trailing .exe if any
22729    new_path="${new_path/%.exe/}"
22730    # Do not save /bin paths to all_fixpath_prefixes!
22731  else
22732    # Not in mixed or Windows style, start by that.
22733    new_path=`cmd //c echo $new_path`
22734
22735  input_path="$new_path"
22736  # Check if we need to convert this using DOS-style short mode. If the path
22737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22738  # take no chances and rewrite it.
22739  # Note: m4 eats our [], so we need to use [ and ] instead.
22740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22741  if test "x$has_forbidden_chars" != x; then
22742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22744  fi
22745
22746    # Output is in $new_path
22747
22748  windows_path="$new_path"
22749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22750    unix_path=`$CYGPATH -u "$windows_path"`
22751    new_path="$unix_path"
22752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22754    new_path="$unix_path"
22755  fi
22756
22757    # remove trailing .exe if any
22758    new_path="${new_path/%.exe/}"
22759
22760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22762  fi
22763
22764  else
22765    # We're on a posix platform. Hooray! :)
22766    # First separate the path from the arguments. This will split at the first
22767    # space.
22768    complete="$AR"
22769    path="${complete%% *}"
22770    tmp="$complete EOL"
22771    arguments="${tmp#* }"
22772
22773    # Cannot rely on the command "which" here since it doesn't always work.
22774    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22775    if test -z "$is_absolute_path"; then
22776      # Path to executable is not absolute. Find it.
22777      IFS_save="$IFS"
22778      IFS=:
22779      for p in $PATH; do
22780        if test -f "$p/$path" && test -x "$p/$path"; then
22781          new_path="$p/$path"
22782          break
22783        fi
22784      done
22785      IFS="$IFS_save"
22786    else
22787      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22788$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22789      new_path="$path"
22790    fi
22791
22792    if test "x$new_path" = x; then
22793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22794$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22795      has_space=`$ECHO "$complete" | $GREP " "`
22796      if test "x$has_space" != x; then
22797        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22798$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22799      fi
22800      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22801    fi
22802  fi
22803
22804  # Now join together the path and the arguments once again
22805  if test "x$arguments" != xEOL; then
22806    new_complete="$new_path ${arguments% *}"
22807  else
22808    new_complete="$new_path"
22809  fi
22810
22811  if test "x$complete" != "x$new_complete"; then
22812    AR="$new_complete"
22813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22814$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22815  fi
22816
22817  fi
22818  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22819    ARFLAGS="-r"
22820  else
22821    ARFLAGS=""
22822  fi
22823
22824
22825  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22826  HOTSPOT_CXX="$CXX"
22827  HOTSPOT_LD="$LD"
22828
22829
22830
22831  COMPILER_NAME=gcc
22832  COMPILER_TYPE=CC
22833  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22834
22835    # For now, assume that we are always compiling using cl.exe.
22836    CC_OUT_OPTION=-Fo
22837    EXE_OUT_OPTION=-out:
22838    LD_OUT_OPTION=-out:
22839    AR_OUT_OPTION=-out:
22840    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22841    # program for something completely different.
22842    # Extract the first word of "link", so it can be a program name with args.
22843set dummy link; ac_word=$2
22844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22845$as_echo_n "checking for $ac_word... " >&6; }
22846if ${ac_cv_prog_WINLD+:} false; then :
22847  $as_echo_n "(cached) " >&6
22848else
22849  if test -n "$WINLD"; then
22850  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22851else
22852  ac_prog_rejected=no
22853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22854for as_dir in $PATH
22855do
22856  IFS=$as_save_IFS
22857  test -z "$as_dir" && as_dir=.
22858    for ac_exec_ext in '' $ac_executable_extensions; do
22859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22860    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22861       ac_prog_rejected=yes
22862       continue
22863     fi
22864    ac_cv_prog_WINLD="link"
22865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22866    break 2
22867  fi
22868done
22869  done
22870IFS=$as_save_IFS
22871
22872if test $ac_prog_rejected = yes; then
22873  # We found a bogon in the path, so make sure we never use it.
22874  set dummy $ac_cv_prog_WINLD
22875  shift
22876  if test $# != 0; then
22877    # We chose a different compiler from the bogus one.
22878    # However, it has the same basename, so the bogon will be chosen
22879    # first if we set WINLD to just the basename; use the full file name.
22880    shift
22881    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22882  fi
22883fi
22884fi
22885fi
22886WINLD=$ac_cv_prog_WINLD
22887if test -n "$WINLD"; then
22888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22889$as_echo "$WINLD" >&6; }
22890else
22891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22892$as_echo "no" >&6; }
22893fi
22894
22895
22896    # Since we must ignore the first found link, WINLD will contain
22897    # the full path to the link.exe program.
22898
22899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22900
22901  # First separate the path from the arguments. This will split at the first
22902  # space.
22903  complete="$WINLD"
22904  path="${complete%% *}"
22905  tmp="$complete EOL"
22906  arguments="${tmp#* }"
22907
22908  # Input might be given as Windows format, start by converting to
22909  # unix format.
22910  new_path=`$CYGPATH -u "$path"`
22911
22912  # Now try to locate executable using which
22913  new_path=`$WHICH "$new_path" 2> /dev/null`
22914  # bat and cmd files are not always considered executable in cygwin causing which
22915  # to not find them
22916  if test "x$new_path" = x \
22917      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22918      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22919    new_path=`$CYGPATH -u "$path"`
22920  fi
22921  if test "x$new_path" = x; then
22922    # Oops. Which didn't find the executable.
22923    # The splitting of arguments from the executable at a space might have been incorrect,
22924    # since paths with space are more likely in Windows. Give it another try with the whole
22925    # argument.
22926    path="$complete"
22927    arguments="EOL"
22928    new_path=`$CYGPATH -u "$path"`
22929    new_path=`$WHICH "$new_path" 2> /dev/null`
22930    # bat and cmd files are not always considered executable in cygwin causing which
22931    # to not find them
22932    if test "x$new_path" = x \
22933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22935      new_path=`$CYGPATH -u "$path"`
22936    fi
22937    if test "x$new_path" = x; then
22938      # It's still not found. Now this is an unrecoverable error.
22939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22940$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22941      has_space=`$ECHO "$complete" | $GREP " "`
22942      if test "x$has_space" != x; then
22943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22945      fi
22946      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22947    fi
22948  fi
22949
22950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22953  # "foo.exe" is OK but "foo" is an error.
22954  #
22955  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22956  # It is also a way to make sure we got the proper file name for the real test later on.
22957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22958  if test "x$test_shortpath" = x; then
22959    # Short path failed, file does not exist as specified.
22960    # Try adding .exe or .cmd
22961    if test -f "${new_path}.exe"; then
22962      input_to_shortpath="${new_path}.exe"
22963    elif test -f "${new_path}.cmd"; then
22964      input_to_shortpath="${new_path}.cmd"
22965    else
22966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22967$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22968      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22969$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22970      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22971    fi
22972  else
22973    input_to_shortpath="$new_path"
22974  fi
22975
22976  # Call helper function which possibly converts this using DOS-style short mode.
22977  # If so, the updated path is stored in $new_path.
22978  new_path="$input_to_shortpath"
22979
22980  input_path="$input_to_shortpath"
22981  # Check if we need to convert this using DOS-style short mode. If the path
22982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22983  # take no chances and rewrite it.
22984  # Note: m4 eats our [], so we need to use [ and ] instead.
22985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22986  if test "x$has_forbidden_chars" != x; then
22987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22991      # Going to short mode and back again did indeed matter. Since short mode is
22992      # case insensitive, let's make it lowercase to improve readability.
22993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22994      # Now convert it back to Unix-stile (cygpath)
22995      input_path=`$CYGPATH -u "$shortmode_path"`
22996      new_path="$input_path"
22997    fi
22998  fi
22999
23000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23001  if test "x$test_cygdrive_prefix" = x; then
23002    # As a simple fix, exclude /usr/bin since it's not a real path.
23003    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23005      # a path prefixed by /cygdrive for fixpath to work.
23006      new_path="$CYGWIN_ROOT_PATH$input_path"
23007    fi
23008  fi
23009
23010  # remove trailing .exe if any
23011  new_path="${new_path/%.exe/}"
23012
23013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23014
23015  # First separate the path from the arguments. This will split at the first
23016  # space.
23017  complete="$WINLD"
23018  path="${complete%% *}"
23019  tmp="$complete EOL"
23020  arguments="${tmp#* }"
23021
23022  # Input might be given as Windows format, start by converting to
23023  # unix format.
23024  new_path="$path"
23025
23026  windows_path="$new_path"
23027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23028    unix_path=`$CYGPATH -u "$windows_path"`
23029    new_path="$unix_path"
23030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23032    new_path="$unix_path"
23033  fi
23034
23035
23036  # Now try to locate executable using which
23037  new_path=`$WHICH "$new_path" 2> /dev/null`
23038
23039  if test "x$new_path" = x; then
23040    # Oops. Which didn't find the executable.
23041    # The splitting of arguments from the executable at a space might have been incorrect,
23042    # since paths with space are more likely in Windows. Give it another try with the whole
23043    # argument.
23044    path="$complete"
23045    arguments="EOL"
23046    new_path="$path"
23047
23048  windows_path="$new_path"
23049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23050    unix_path=`$CYGPATH -u "$windows_path"`
23051    new_path="$unix_path"
23052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23054    new_path="$unix_path"
23055  fi
23056
23057
23058    new_path=`$WHICH "$new_path" 2> /dev/null`
23059
23060    if test "x$new_path" = x; then
23061      # It's still not found. Now this is an unrecoverable error.
23062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23063$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23064      has_space=`$ECHO "$complete" | $GREP " "`
23065      if test "x$has_space" != x; then
23066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23068      fi
23069      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23070    fi
23071  fi
23072
23073  # Now new_path has a complete unix path to the binary
23074  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23075    # Keep paths in /bin as-is, but remove trailing .exe if any
23076    new_path="${new_path/%.exe/}"
23077    # Do not save /bin paths to all_fixpath_prefixes!
23078  else
23079    # Not in mixed or Windows style, start by that.
23080    new_path=`cmd //c echo $new_path`
23081
23082  input_path="$new_path"
23083  # Check if we need to convert this using DOS-style short mode. If the path
23084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23085  # take no chances and rewrite it.
23086  # Note: m4 eats our [], so we need to use [ and ] instead.
23087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23088  if test "x$has_forbidden_chars" != x; then
23089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23091  fi
23092
23093    # Output is in $new_path
23094
23095  windows_path="$new_path"
23096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23097    unix_path=`$CYGPATH -u "$windows_path"`
23098    new_path="$unix_path"
23099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23101    new_path="$unix_path"
23102  fi
23103
23104    # remove trailing .exe if any
23105    new_path="${new_path/%.exe/}"
23106
23107    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23108    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23109  fi
23110
23111  else
23112    # We're on a posix platform. Hooray! :)
23113    # First separate the path from the arguments. This will split at the first
23114    # space.
23115    complete="$WINLD"
23116    path="${complete%% *}"
23117    tmp="$complete EOL"
23118    arguments="${tmp#* }"
23119
23120    # Cannot rely on the command "which" here since it doesn't always work.
23121    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23122    if test -z "$is_absolute_path"; then
23123      # Path to executable is not absolute. Find it.
23124      IFS_save="$IFS"
23125      IFS=:
23126      for p in $PATH; do
23127        if test -f "$p/$path" && test -x "$p/$path"; then
23128          new_path="$p/$path"
23129          break
23130        fi
23131      done
23132      IFS="$IFS_save"
23133    else
23134      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23135$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23136      new_path="$path"
23137    fi
23138
23139    if test "x$new_path" = x; then
23140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23141$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23142      has_space=`$ECHO "$complete" | $GREP " "`
23143      if test "x$has_space" != x; then
23144        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23145$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23146      fi
23147      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23148    fi
23149  fi
23150
23151  # Now join together the path and the arguments once again
23152  if test "x$arguments" != xEOL; then
23153    new_complete="$new_path ${arguments% *}"
23154  else
23155    new_complete="$new_path"
23156  fi
23157
23158  if test "x$complete" != "x$new_complete"; then
23159    WINLD="$new_complete"
23160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23161$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23162  fi
23163
23164    printf "Windows linker was found at $WINLD\n"
23165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23166$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23167    "$WINLD" --version > /dev/null
23168    if test $? -eq 0 ; then
23169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23170$as_echo "no" >&6; }
23171      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23172    else
23173      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23174$as_echo "yes" >&6; }
23175    fi
23176    LD="$WINLD"
23177    LDEXE="$WINLD"
23178    LDCXX="$WINLD"
23179    LDEXECXX="$WINLD"
23180
23181    # Extract the first word of "mt", so it can be a program name with args.
23182set dummy mt; ac_word=$2
23183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23184$as_echo_n "checking for $ac_word... " >&6; }
23185if ${ac_cv_prog_MT+:} false; then :
23186  $as_echo_n "(cached) " >&6
23187else
23188  if test -n "$MT"; then
23189  ac_cv_prog_MT="$MT" # Let the user override the test.
23190else
23191  ac_prog_rejected=no
23192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23193for as_dir in $PATH
23194do
23195  IFS=$as_save_IFS
23196  test -z "$as_dir" && as_dir=.
23197    for ac_exec_ext in '' $ac_executable_extensions; do
23198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23199    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23200       ac_prog_rejected=yes
23201       continue
23202     fi
23203    ac_cv_prog_MT="mt"
23204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23205    break 2
23206  fi
23207done
23208  done
23209IFS=$as_save_IFS
23210
23211if test $ac_prog_rejected = yes; then
23212  # We found a bogon in the path, so make sure we never use it.
23213  set dummy $ac_cv_prog_MT
23214  shift
23215  if test $# != 0; then
23216    # We chose a different compiler from the bogus one.
23217    # However, it has the same basename, so the bogon will be chosen
23218    # first if we set MT to just the basename; use the full file name.
23219    shift
23220    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23221  fi
23222fi
23223fi
23224fi
23225MT=$ac_cv_prog_MT
23226if test -n "$MT"; then
23227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23228$as_echo "$MT" >&6; }
23229else
23230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23231$as_echo "no" >&6; }
23232fi
23233
23234
23235
23236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23237
23238  # First separate the path from the arguments. This will split at the first
23239  # space.
23240  complete="$MT"
23241  path="${complete%% *}"
23242  tmp="$complete EOL"
23243  arguments="${tmp#* }"
23244
23245  # Input might be given as Windows format, start by converting to
23246  # unix format.
23247  new_path=`$CYGPATH -u "$path"`
23248
23249  # Now try to locate executable using which
23250  new_path=`$WHICH "$new_path" 2> /dev/null`
23251  # bat and cmd files are not always considered executable in cygwin causing which
23252  # to not find them
23253  if test "x$new_path" = x \
23254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23256    new_path=`$CYGPATH -u "$path"`
23257  fi
23258  if test "x$new_path" = x; then
23259    # Oops. Which didn't find the executable.
23260    # The splitting of arguments from the executable at a space might have been incorrect,
23261    # since paths with space are more likely in Windows. Give it another try with the whole
23262    # argument.
23263    path="$complete"
23264    arguments="EOL"
23265    new_path=`$CYGPATH -u "$path"`
23266    new_path=`$WHICH "$new_path" 2> /dev/null`
23267    # bat and cmd files are not always considered executable in cygwin causing which
23268    # to not find them
23269    if test "x$new_path" = x \
23270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23272      new_path=`$CYGPATH -u "$path"`
23273    fi
23274    if test "x$new_path" = x; then
23275      # It's still not found. Now this is an unrecoverable error.
23276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23277$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23278      has_space=`$ECHO "$complete" | $GREP " "`
23279      if test "x$has_space" != x; then
23280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23282      fi
23283      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23284    fi
23285  fi
23286
23287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23290  # "foo.exe" is OK but "foo" is an error.
23291  #
23292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23293  # It is also a way to make sure we got the proper file name for the real test later on.
23294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23295  if test "x$test_shortpath" = x; then
23296    # Short path failed, file does not exist as specified.
23297    # Try adding .exe or .cmd
23298    if test -f "${new_path}.exe"; then
23299      input_to_shortpath="${new_path}.exe"
23300    elif test -f "${new_path}.cmd"; then
23301      input_to_shortpath="${new_path}.cmd"
23302    else
23303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23304$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23307      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23308    fi
23309  else
23310    input_to_shortpath="$new_path"
23311  fi
23312
23313  # Call helper function which possibly converts this using DOS-style short mode.
23314  # If so, the updated path is stored in $new_path.
23315  new_path="$input_to_shortpath"
23316
23317  input_path="$input_to_shortpath"
23318  # Check if we need to convert this using DOS-style short mode. If the path
23319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23320  # take no chances and rewrite it.
23321  # Note: m4 eats our [], so we need to use [ and ] instead.
23322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23323  if test "x$has_forbidden_chars" != x; then
23324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23328      # Going to short mode and back again did indeed matter. Since short mode is
23329      # case insensitive, let's make it lowercase to improve readability.
23330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23331      # Now convert it back to Unix-stile (cygpath)
23332      input_path=`$CYGPATH -u "$shortmode_path"`
23333      new_path="$input_path"
23334    fi
23335  fi
23336
23337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23338  if test "x$test_cygdrive_prefix" = x; then
23339    # As a simple fix, exclude /usr/bin since it's not a real path.
23340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23342      # a path prefixed by /cygdrive for fixpath to work.
23343      new_path="$CYGWIN_ROOT_PATH$input_path"
23344    fi
23345  fi
23346
23347  # remove trailing .exe if any
23348  new_path="${new_path/%.exe/}"
23349
23350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23351
23352  # First separate the path from the arguments. This will split at the first
23353  # space.
23354  complete="$MT"
23355  path="${complete%% *}"
23356  tmp="$complete EOL"
23357  arguments="${tmp#* }"
23358
23359  # Input might be given as Windows format, start by converting to
23360  # unix format.
23361  new_path="$path"
23362
23363  windows_path="$new_path"
23364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23365    unix_path=`$CYGPATH -u "$windows_path"`
23366    new_path="$unix_path"
23367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23369    new_path="$unix_path"
23370  fi
23371
23372
23373  # Now try to locate executable using which
23374  new_path=`$WHICH "$new_path" 2> /dev/null`
23375
23376  if test "x$new_path" = x; then
23377    # Oops. Which didn't find the executable.
23378    # The splitting of arguments from the executable at a space might have been incorrect,
23379    # since paths with space are more likely in Windows. Give it another try with the whole
23380    # argument.
23381    path="$complete"
23382    arguments="EOL"
23383    new_path="$path"
23384
23385  windows_path="$new_path"
23386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23387    unix_path=`$CYGPATH -u "$windows_path"`
23388    new_path="$unix_path"
23389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23391    new_path="$unix_path"
23392  fi
23393
23394
23395    new_path=`$WHICH "$new_path" 2> /dev/null`
23396
23397    if test "x$new_path" = x; then
23398      # It's still not found. Now this is an unrecoverable error.
23399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23400$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23401      has_space=`$ECHO "$complete" | $GREP " "`
23402      if test "x$has_space" != x; then
23403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23405      fi
23406      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23407    fi
23408  fi
23409
23410  # Now new_path has a complete unix path to the binary
23411  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23412    # Keep paths in /bin as-is, but remove trailing .exe if any
23413    new_path="${new_path/%.exe/}"
23414    # Do not save /bin paths to all_fixpath_prefixes!
23415  else
23416    # Not in mixed or Windows style, start by that.
23417    new_path=`cmd //c echo $new_path`
23418
23419  input_path="$new_path"
23420  # Check if we need to convert this using DOS-style short mode. If the path
23421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23422  # take no chances and rewrite it.
23423  # Note: m4 eats our [], so we need to use [ and ] instead.
23424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23425  if test "x$has_forbidden_chars" != x; then
23426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23428  fi
23429
23430    # Output is in $new_path
23431
23432  windows_path="$new_path"
23433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23434    unix_path=`$CYGPATH -u "$windows_path"`
23435    new_path="$unix_path"
23436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23438    new_path="$unix_path"
23439  fi
23440
23441    # remove trailing .exe if any
23442    new_path="${new_path/%.exe/}"
23443
23444    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23445    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23446  fi
23447
23448  else
23449    # We're on a posix platform. Hooray! :)
23450    # First separate the path from the arguments. This will split at the first
23451    # space.
23452    complete="$MT"
23453    path="${complete%% *}"
23454    tmp="$complete EOL"
23455    arguments="${tmp#* }"
23456
23457    # Cannot rely on the command "which" here since it doesn't always work.
23458    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23459    if test -z "$is_absolute_path"; then
23460      # Path to executable is not absolute. Find it.
23461      IFS_save="$IFS"
23462      IFS=:
23463      for p in $PATH; do
23464        if test -f "$p/$path" && test -x "$p/$path"; then
23465          new_path="$p/$path"
23466          break
23467        fi
23468      done
23469      IFS="$IFS_save"
23470    else
23471      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23472$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23473      new_path="$path"
23474    fi
23475
23476    if test "x$new_path" = x; then
23477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23478$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23479      has_space=`$ECHO "$complete" | $GREP " "`
23480      if test "x$has_space" != x; then
23481        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23482$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23483      fi
23484      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23485    fi
23486  fi
23487
23488  # Now join together the path and the arguments once again
23489  if test "x$arguments" != xEOL; then
23490    new_complete="$new_path ${arguments% *}"
23491  else
23492    new_complete="$new_path"
23493  fi
23494
23495  if test "x$complete" != "x$new_complete"; then
23496    MT="$new_complete"
23497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23498$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23499  fi
23500
23501    # The resource compiler
23502    # Extract the first word of "rc", so it can be a program name with args.
23503set dummy rc; ac_word=$2
23504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23505$as_echo_n "checking for $ac_word... " >&6; }
23506if ${ac_cv_prog_RC+:} false; then :
23507  $as_echo_n "(cached) " >&6
23508else
23509  if test -n "$RC"; then
23510  ac_cv_prog_RC="$RC" # Let the user override the test.
23511else
23512  ac_prog_rejected=no
23513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23514for as_dir in $PATH
23515do
23516  IFS=$as_save_IFS
23517  test -z "$as_dir" && as_dir=.
23518    for ac_exec_ext in '' $ac_executable_extensions; do
23519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23520    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23521       ac_prog_rejected=yes
23522       continue
23523     fi
23524    ac_cv_prog_RC="rc"
23525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23526    break 2
23527  fi
23528done
23529  done
23530IFS=$as_save_IFS
23531
23532if test $ac_prog_rejected = yes; then
23533  # We found a bogon in the path, so make sure we never use it.
23534  set dummy $ac_cv_prog_RC
23535  shift
23536  if test $# != 0; then
23537    # We chose a different compiler from the bogus one.
23538    # However, it has the same basename, so the bogon will be chosen
23539    # first if we set RC to just the basename; use the full file name.
23540    shift
23541    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23542  fi
23543fi
23544fi
23545fi
23546RC=$ac_cv_prog_RC
23547if test -n "$RC"; then
23548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23549$as_echo "$RC" >&6; }
23550else
23551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23552$as_echo "no" >&6; }
23553fi
23554
23555
23556
23557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23558
23559  # First separate the path from the arguments. This will split at the first
23560  # space.
23561  complete="$RC"
23562  path="${complete%% *}"
23563  tmp="$complete EOL"
23564  arguments="${tmp#* }"
23565
23566  # Input might be given as Windows format, start by converting to
23567  # unix format.
23568  new_path=`$CYGPATH -u "$path"`
23569
23570  # Now try to locate executable using which
23571  new_path=`$WHICH "$new_path" 2> /dev/null`
23572  # bat and cmd files are not always considered executable in cygwin causing which
23573  # to not find them
23574  if test "x$new_path" = x \
23575      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23576      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23577    new_path=`$CYGPATH -u "$path"`
23578  fi
23579  if test "x$new_path" = x; then
23580    # Oops. Which didn't find the executable.
23581    # The splitting of arguments from the executable at a space might have been incorrect,
23582    # since paths with space are more likely in Windows. Give it another try with the whole
23583    # argument.
23584    path="$complete"
23585    arguments="EOL"
23586    new_path=`$CYGPATH -u "$path"`
23587    new_path=`$WHICH "$new_path" 2> /dev/null`
23588    # bat and cmd files are not always considered executable in cygwin causing which
23589    # to not find them
23590    if test "x$new_path" = x \
23591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23593      new_path=`$CYGPATH -u "$path"`
23594    fi
23595    if test "x$new_path" = x; then
23596      # It's still not found. Now this is an unrecoverable error.
23597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23598$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23599      has_space=`$ECHO "$complete" | $GREP " "`
23600      if test "x$has_space" != x; then
23601        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23602$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23603      fi
23604      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23605    fi
23606  fi
23607
23608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23611  # "foo.exe" is OK but "foo" is an error.
23612  #
23613  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23614  # It is also a way to make sure we got the proper file name for the real test later on.
23615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23616  if test "x$test_shortpath" = x; then
23617    # Short path failed, file does not exist as specified.
23618    # Try adding .exe or .cmd
23619    if test -f "${new_path}.exe"; then
23620      input_to_shortpath="${new_path}.exe"
23621    elif test -f "${new_path}.cmd"; then
23622      input_to_shortpath="${new_path}.cmd"
23623    else
23624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23625$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23626      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23627$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23628      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23629    fi
23630  else
23631    input_to_shortpath="$new_path"
23632  fi
23633
23634  # Call helper function which possibly converts this using DOS-style short mode.
23635  # If so, the updated path is stored in $new_path.
23636  new_path="$input_to_shortpath"
23637
23638  input_path="$input_to_shortpath"
23639  # Check if we need to convert this using DOS-style short mode. If the path
23640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23641  # take no chances and rewrite it.
23642  # Note: m4 eats our [], so we need to use [ and ] instead.
23643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23644  if test "x$has_forbidden_chars" != x; then
23645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23649      # Going to short mode and back again did indeed matter. Since short mode is
23650      # case insensitive, let's make it lowercase to improve readability.
23651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23652      # Now convert it back to Unix-stile (cygpath)
23653      input_path=`$CYGPATH -u "$shortmode_path"`
23654      new_path="$input_path"
23655    fi
23656  fi
23657
23658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23659  if test "x$test_cygdrive_prefix" = x; then
23660    # As a simple fix, exclude /usr/bin since it's not a real path.
23661    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23663      # a path prefixed by /cygdrive for fixpath to work.
23664      new_path="$CYGWIN_ROOT_PATH$input_path"
23665    fi
23666  fi
23667
23668  # remove trailing .exe if any
23669  new_path="${new_path/%.exe/}"
23670
23671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23672
23673  # First separate the path from the arguments. This will split at the first
23674  # space.
23675  complete="$RC"
23676  path="${complete%% *}"
23677  tmp="$complete EOL"
23678  arguments="${tmp#* }"
23679
23680  # Input might be given as Windows format, start by converting to
23681  # unix format.
23682  new_path="$path"
23683
23684  windows_path="$new_path"
23685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23686    unix_path=`$CYGPATH -u "$windows_path"`
23687    new_path="$unix_path"
23688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23690    new_path="$unix_path"
23691  fi
23692
23693
23694  # Now try to locate executable using which
23695  new_path=`$WHICH "$new_path" 2> /dev/null`
23696
23697  if test "x$new_path" = x; then
23698    # Oops. Which didn't find the executable.
23699    # The splitting of arguments from the executable at a space might have been incorrect,
23700    # since paths with space are more likely in Windows. Give it another try with the whole
23701    # argument.
23702    path="$complete"
23703    arguments="EOL"
23704    new_path="$path"
23705
23706  windows_path="$new_path"
23707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23708    unix_path=`$CYGPATH -u "$windows_path"`
23709    new_path="$unix_path"
23710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23712    new_path="$unix_path"
23713  fi
23714
23715
23716    new_path=`$WHICH "$new_path" 2> /dev/null`
23717
23718    if test "x$new_path" = x; then
23719      # It's still not found. Now this is an unrecoverable error.
23720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23721$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23722      has_space=`$ECHO "$complete" | $GREP " "`
23723      if test "x$has_space" != x; then
23724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23726      fi
23727      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23728    fi
23729  fi
23730
23731  # Now new_path has a complete unix path to the binary
23732  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23733    # Keep paths in /bin as-is, but remove trailing .exe if any
23734    new_path="${new_path/%.exe/}"
23735    # Do not save /bin paths to all_fixpath_prefixes!
23736  else
23737    # Not in mixed or Windows style, start by that.
23738    new_path=`cmd //c echo $new_path`
23739
23740  input_path="$new_path"
23741  # Check if we need to convert this using DOS-style short mode. If the path
23742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23743  # take no chances and rewrite it.
23744  # Note: m4 eats our [], so we need to use [ and ] instead.
23745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23746  if test "x$has_forbidden_chars" != x; then
23747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23749  fi
23750
23751    # Output is in $new_path
23752
23753  windows_path="$new_path"
23754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23755    unix_path=`$CYGPATH -u "$windows_path"`
23756    new_path="$unix_path"
23757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23759    new_path="$unix_path"
23760  fi
23761
23762    # remove trailing .exe if any
23763    new_path="${new_path/%.exe/}"
23764
23765    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23766    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23767  fi
23768
23769  else
23770    # We're on a posix platform. Hooray! :)
23771    # First separate the path from the arguments. This will split at the first
23772    # space.
23773    complete="$RC"
23774    path="${complete%% *}"
23775    tmp="$complete EOL"
23776    arguments="${tmp#* }"
23777
23778    # Cannot rely on the command "which" here since it doesn't always work.
23779    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23780    if test -z "$is_absolute_path"; then
23781      # Path to executable is not absolute. Find it.
23782      IFS_save="$IFS"
23783      IFS=:
23784      for p in $PATH; do
23785        if test -f "$p/$path" && test -x "$p/$path"; then
23786          new_path="$p/$path"
23787          break
23788        fi
23789      done
23790      IFS="$IFS_save"
23791    else
23792      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23793$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23794      new_path="$path"
23795    fi
23796
23797    if test "x$new_path" = x; then
23798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23799$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23800      has_space=`$ECHO "$complete" | $GREP " "`
23801      if test "x$has_space" != x; then
23802        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23803$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23804      fi
23805      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23806    fi
23807  fi
23808
23809  # Now join together the path and the arguments once again
23810  if test "x$arguments" != xEOL; then
23811    new_complete="$new_path ${arguments% *}"
23812  else
23813    new_complete="$new_path"
23814  fi
23815
23816  if test "x$complete" != "x$new_complete"; then
23817    RC="$new_complete"
23818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23819$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23820  fi
23821
23822
23823    # For hotspot, we need these in Windows mixed path,
23824    # so rewrite them all. Need added .exe suffix.
23825    HOTSPOT_CXX="$CXX.exe"
23826    HOTSPOT_LD="$LD.exe"
23827    HOTSPOT_MT="$MT.exe"
23828    HOTSPOT_RC="$RC.exe"
23829
23830  unix_path="$HOTSPOT_CXX"
23831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23832    windows_path=`$CYGPATH -m "$unix_path"`
23833    HOTSPOT_CXX="$windows_path"
23834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23835    windows_path=`cmd //c echo $unix_path`
23836    HOTSPOT_CXX="$windows_path"
23837  fi
23838
23839
23840  unix_path="$HOTSPOT_LD"
23841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23842    windows_path=`$CYGPATH -m "$unix_path"`
23843    HOTSPOT_LD="$windows_path"
23844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23845    windows_path=`cmd //c echo $unix_path`
23846    HOTSPOT_LD="$windows_path"
23847  fi
23848
23849
23850  unix_path="$HOTSPOT_MT"
23851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23852    windows_path=`$CYGPATH -m "$unix_path"`
23853    HOTSPOT_MT="$windows_path"
23854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23855    windows_path=`cmd //c echo $unix_path`
23856    HOTSPOT_MT="$windows_path"
23857  fi
23858
23859
23860  unix_path="$HOTSPOT_RC"
23861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23862    windows_path=`$CYGPATH -m "$unix_path"`
23863    HOTSPOT_RC="$windows_path"
23864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23865    windows_path=`cmd //c echo $unix_path`
23866    HOTSPOT_RC="$windows_path"
23867  fi
23868
23869
23870
23871
23872    RC_FLAGS="-nologo -l 0x409 -r"
23873    if test "x$VARIANT" = xOPT; then :
23874
23875    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23876
23877fi
23878
23879  # The version variables used to create RC_FLAGS may be overridden
23880  # in a custom configure script, or possibly the command line.
23881  # Let those variables be expanded at make time in spec.gmk.
23882  # The \$ are escaped to the shell, and the $(...) variables
23883  # are evaluated by make.
23884  RC_FLAGS="$RC_FLAGS \
23885      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23886      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23887      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23888      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23889      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23890      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23891      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23892
23893  # lib.exe is used to create static libraries.
23894  # Extract the first word of "lib", so it can be a program name with args.
23895set dummy lib; ac_word=$2
23896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23897$as_echo_n "checking for $ac_word... " >&6; }
23898if ${ac_cv_prog_WINAR+:} false; then :
23899  $as_echo_n "(cached) " >&6
23900else
23901  if test -n "$WINAR"; then
23902  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23903else
23904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23905for as_dir in $PATH
23906do
23907  IFS=$as_save_IFS
23908  test -z "$as_dir" && as_dir=.
23909    for ac_exec_ext in '' $ac_executable_extensions; do
23910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23911    ac_cv_prog_WINAR="lib"
23912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23913    break 2
23914  fi
23915done
23916  done
23917IFS=$as_save_IFS
23918
23919fi
23920fi
23921WINAR=$ac_cv_prog_WINAR
23922if test -n "$WINAR"; then
23923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23924$as_echo "$WINAR" >&6; }
23925else
23926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23927$as_echo "no" >&6; }
23928fi
23929
23930
23931
23932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23933
23934  # First separate the path from the arguments. This will split at the first
23935  # space.
23936  complete="$WINAR"
23937  path="${complete%% *}"
23938  tmp="$complete EOL"
23939  arguments="${tmp#* }"
23940
23941  # Input might be given as Windows format, start by converting to
23942  # unix format.
23943  new_path=`$CYGPATH -u "$path"`
23944
23945  # Now try to locate executable using which
23946  new_path=`$WHICH "$new_path" 2> /dev/null`
23947  # bat and cmd files are not always considered executable in cygwin causing which
23948  # to not find them
23949  if test "x$new_path" = x \
23950      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23951      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23952    new_path=`$CYGPATH -u "$path"`
23953  fi
23954  if test "x$new_path" = x; then
23955    # Oops. Which didn't find the executable.
23956    # The splitting of arguments from the executable at a space might have been incorrect,
23957    # since paths with space are more likely in Windows. Give it another try with the whole
23958    # argument.
23959    path="$complete"
23960    arguments="EOL"
23961    new_path=`$CYGPATH -u "$path"`
23962    new_path=`$WHICH "$new_path" 2> /dev/null`
23963    # bat and cmd files are not always considered executable in cygwin causing which
23964    # to not find them
23965    if test "x$new_path" = x \
23966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23968      new_path=`$CYGPATH -u "$path"`
23969    fi
23970    if test "x$new_path" = x; then
23971      # It's still not found. Now this is an unrecoverable error.
23972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23973$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23974      has_space=`$ECHO "$complete" | $GREP " "`
23975      if test "x$has_space" != x; then
23976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23978      fi
23979      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23980    fi
23981  fi
23982
23983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23986  # "foo.exe" is OK but "foo" is an error.
23987  #
23988  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23989  # It is also a way to make sure we got the proper file name for the real test later on.
23990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23991  if test "x$test_shortpath" = x; then
23992    # Short path failed, file does not exist as specified.
23993    # Try adding .exe or .cmd
23994    if test -f "${new_path}.exe"; then
23995      input_to_shortpath="${new_path}.exe"
23996    elif test -f "${new_path}.cmd"; then
23997      input_to_shortpath="${new_path}.cmd"
23998    else
23999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24000$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24003      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24004    fi
24005  else
24006    input_to_shortpath="$new_path"
24007  fi
24008
24009  # Call helper function which possibly converts this using DOS-style short mode.
24010  # If so, the updated path is stored in $new_path.
24011  new_path="$input_to_shortpath"
24012
24013  input_path="$input_to_shortpath"
24014  # Check if we need to convert this using DOS-style short mode. If the path
24015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24016  # take no chances and rewrite it.
24017  # Note: m4 eats our [], so we need to use [ and ] instead.
24018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24019  if test "x$has_forbidden_chars" != x; then
24020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24024      # Going to short mode and back again did indeed matter. Since short mode is
24025      # case insensitive, let's make it lowercase to improve readability.
24026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24027      # Now convert it back to Unix-stile (cygpath)
24028      input_path=`$CYGPATH -u "$shortmode_path"`
24029      new_path="$input_path"
24030    fi
24031  fi
24032
24033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24034  if test "x$test_cygdrive_prefix" = x; then
24035    # As a simple fix, exclude /usr/bin since it's not a real path.
24036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24038      # a path prefixed by /cygdrive for fixpath to work.
24039      new_path="$CYGWIN_ROOT_PATH$input_path"
24040    fi
24041  fi
24042
24043  # remove trailing .exe if any
24044  new_path="${new_path/%.exe/}"
24045
24046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24047
24048  # First separate the path from the arguments. This will split at the first
24049  # space.
24050  complete="$WINAR"
24051  path="${complete%% *}"
24052  tmp="$complete EOL"
24053  arguments="${tmp#* }"
24054
24055  # Input might be given as Windows format, start by converting to
24056  # unix format.
24057  new_path="$path"
24058
24059  windows_path="$new_path"
24060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24061    unix_path=`$CYGPATH -u "$windows_path"`
24062    new_path="$unix_path"
24063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24065    new_path="$unix_path"
24066  fi
24067
24068
24069  # Now try to locate executable using which
24070  new_path=`$WHICH "$new_path" 2> /dev/null`
24071
24072  if test "x$new_path" = x; then
24073    # Oops. Which didn't find the executable.
24074    # The splitting of arguments from the executable at a space might have been incorrect,
24075    # since paths with space are more likely in Windows. Give it another try with the whole
24076    # argument.
24077    path="$complete"
24078    arguments="EOL"
24079    new_path="$path"
24080
24081  windows_path="$new_path"
24082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24083    unix_path=`$CYGPATH -u "$windows_path"`
24084    new_path="$unix_path"
24085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24087    new_path="$unix_path"
24088  fi
24089
24090
24091    new_path=`$WHICH "$new_path" 2> /dev/null`
24092
24093    if test "x$new_path" = x; then
24094      # It's still not found. Now this is an unrecoverable error.
24095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24096$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24097      has_space=`$ECHO "$complete" | $GREP " "`
24098      if test "x$has_space" != x; then
24099        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24100$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24101      fi
24102      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24103    fi
24104  fi
24105
24106  # Now new_path has a complete unix path to the binary
24107  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24108    # Keep paths in /bin as-is, but remove trailing .exe if any
24109    new_path="${new_path/%.exe/}"
24110    # Do not save /bin paths to all_fixpath_prefixes!
24111  else
24112    # Not in mixed or Windows style, start by that.
24113    new_path=`cmd //c echo $new_path`
24114
24115  input_path="$new_path"
24116  # Check if we need to convert this using DOS-style short mode. If the path
24117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24118  # take no chances and rewrite it.
24119  # Note: m4 eats our [], so we need to use [ and ] instead.
24120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24121  if test "x$has_forbidden_chars" != x; then
24122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24124  fi
24125
24126    # Output is in $new_path
24127
24128  windows_path="$new_path"
24129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24130    unix_path=`$CYGPATH -u "$windows_path"`
24131    new_path="$unix_path"
24132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24134    new_path="$unix_path"
24135  fi
24136
24137    # remove trailing .exe if any
24138    new_path="${new_path/%.exe/}"
24139
24140    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24141    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24142  fi
24143
24144  else
24145    # We're on a posix platform. Hooray! :)
24146    # First separate the path from the arguments. This will split at the first
24147    # space.
24148    complete="$WINAR"
24149    path="${complete%% *}"
24150    tmp="$complete EOL"
24151    arguments="${tmp#* }"
24152
24153    # Cannot rely on the command "which" here since it doesn't always work.
24154    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24155    if test -z "$is_absolute_path"; then
24156      # Path to executable is not absolute. Find it.
24157      IFS_save="$IFS"
24158      IFS=:
24159      for p in $PATH; do
24160        if test -f "$p/$path" && test -x "$p/$path"; then
24161          new_path="$p/$path"
24162          break
24163        fi
24164      done
24165      IFS="$IFS_save"
24166    else
24167      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24168$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24169      new_path="$path"
24170    fi
24171
24172    if test "x$new_path" = x; then
24173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24174$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24175      has_space=`$ECHO "$complete" | $GREP " "`
24176      if test "x$has_space" != x; then
24177        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24178$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24179      fi
24180      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24181    fi
24182  fi
24183
24184  # Now join together the path and the arguments once again
24185  if test "x$arguments" != xEOL; then
24186    new_complete="$new_path ${arguments% *}"
24187  else
24188    new_complete="$new_path"
24189  fi
24190
24191  if test "x$complete" != "x$new_complete"; then
24192    WINAR="$new_complete"
24193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24194$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24195  fi
24196
24197  AR="$WINAR"
24198  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24199
24200  # Extract the first word of "dumpbin", so it can be a program name with args.
24201set dummy dumpbin; ac_word=$2
24202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24203$as_echo_n "checking for $ac_word... " >&6; }
24204if ${ac_cv_prog_DUMPBIN+:} false; then :
24205  $as_echo_n "(cached) " >&6
24206else
24207  if test -n "$DUMPBIN"; then
24208  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24209else
24210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24211for as_dir in $PATH
24212do
24213  IFS=$as_save_IFS
24214  test -z "$as_dir" && as_dir=.
24215    for ac_exec_ext in '' $ac_executable_extensions; do
24216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24217    ac_cv_prog_DUMPBIN="dumpbin"
24218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24219    break 2
24220  fi
24221done
24222  done
24223IFS=$as_save_IFS
24224
24225fi
24226fi
24227DUMPBIN=$ac_cv_prog_DUMPBIN
24228if test -n "$DUMPBIN"; then
24229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24230$as_echo "$DUMPBIN" >&6; }
24231else
24232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24233$as_echo "no" >&6; }
24234fi
24235
24236
24237
24238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24239
24240  # First separate the path from the arguments. This will split at the first
24241  # space.
24242  complete="$DUMPBIN"
24243  path="${complete%% *}"
24244  tmp="$complete EOL"
24245  arguments="${tmp#* }"
24246
24247  # Input might be given as Windows format, start by converting to
24248  # unix format.
24249  new_path=`$CYGPATH -u "$path"`
24250
24251  # Now try to locate executable using which
24252  new_path=`$WHICH "$new_path" 2> /dev/null`
24253  # bat and cmd files are not always considered executable in cygwin causing which
24254  # to not find them
24255  if test "x$new_path" = x \
24256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24258    new_path=`$CYGPATH -u "$path"`
24259  fi
24260  if test "x$new_path" = x; then
24261    # Oops. Which didn't find the executable.
24262    # The splitting of arguments from the executable at a space might have been incorrect,
24263    # since paths with space are more likely in Windows. Give it another try with the whole
24264    # argument.
24265    path="$complete"
24266    arguments="EOL"
24267    new_path=`$CYGPATH -u "$path"`
24268    new_path=`$WHICH "$new_path" 2> /dev/null`
24269    # bat and cmd files are not always considered executable in cygwin causing which
24270    # to not find them
24271    if test "x$new_path" = x \
24272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24274      new_path=`$CYGPATH -u "$path"`
24275    fi
24276    if test "x$new_path" = x; then
24277      # It's still not found. Now this is an unrecoverable error.
24278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24279$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24280      has_space=`$ECHO "$complete" | $GREP " "`
24281      if test "x$has_space" != x; then
24282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24284      fi
24285      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24286    fi
24287  fi
24288
24289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24292  # "foo.exe" is OK but "foo" is an error.
24293  #
24294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24295  # It is also a way to make sure we got the proper file name for the real test later on.
24296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24297  if test "x$test_shortpath" = x; then
24298    # Short path failed, file does not exist as specified.
24299    # Try adding .exe or .cmd
24300    if test -f "${new_path}.exe"; then
24301      input_to_shortpath="${new_path}.exe"
24302    elif test -f "${new_path}.cmd"; then
24303      input_to_shortpath="${new_path}.cmd"
24304    else
24305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24306$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24309      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24310    fi
24311  else
24312    input_to_shortpath="$new_path"
24313  fi
24314
24315  # Call helper function which possibly converts this using DOS-style short mode.
24316  # If so, the updated path is stored in $new_path.
24317  new_path="$input_to_shortpath"
24318
24319  input_path="$input_to_shortpath"
24320  # Check if we need to convert this using DOS-style short mode. If the path
24321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24322  # take no chances and rewrite it.
24323  # Note: m4 eats our [], so we need to use [ and ] instead.
24324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24325  if test "x$has_forbidden_chars" != x; then
24326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24330      # Going to short mode and back again did indeed matter. Since short mode is
24331      # case insensitive, let's make it lowercase to improve readability.
24332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24333      # Now convert it back to Unix-stile (cygpath)
24334      input_path=`$CYGPATH -u "$shortmode_path"`
24335      new_path="$input_path"
24336    fi
24337  fi
24338
24339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24340  if test "x$test_cygdrive_prefix" = x; then
24341    # As a simple fix, exclude /usr/bin since it's not a real path.
24342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24344      # a path prefixed by /cygdrive for fixpath to work.
24345      new_path="$CYGWIN_ROOT_PATH$input_path"
24346    fi
24347  fi
24348
24349  # remove trailing .exe if any
24350  new_path="${new_path/%.exe/}"
24351
24352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24353
24354  # First separate the path from the arguments. This will split at the first
24355  # space.
24356  complete="$DUMPBIN"
24357  path="${complete%% *}"
24358  tmp="$complete EOL"
24359  arguments="${tmp#* }"
24360
24361  # Input might be given as Windows format, start by converting to
24362  # unix format.
24363  new_path="$path"
24364
24365  windows_path="$new_path"
24366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24367    unix_path=`$CYGPATH -u "$windows_path"`
24368    new_path="$unix_path"
24369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24371    new_path="$unix_path"
24372  fi
24373
24374
24375  # Now try to locate executable using which
24376  new_path=`$WHICH "$new_path" 2> /dev/null`
24377
24378  if test "x$new_path" = x; then
24379    # Oops. Which didn't find the executable.
24380    # The splitting of arguments from the executable at a space might have been incorrect,
24381    # since paths with space are more likely in Windows. Give it another try with the whole
24382    # argument.
24383    path="$complete"
24384    arguments="EOL"
24385    new_path="$path"
24386
24387  windows_path="$new_path"
24388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24389    unix_path=`$CYGPATH -u "$windows_path"`
24390    new_path="$unix_path"
24391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24393    new_path="$unix_path"
24394  fi
24395
24396
24397    new_path=`$WHICH "$new_path" 2> /dev/null`
24398
24399    if test "x$new_path" = x; then
24400      # It's still not found. Now this is an unrecoverable error.
24401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24402$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24403      has_space=`$ECHO "$complete" | $GREP " "`
24404      if test "x$has_space" != x; then
24405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24407      fi
24408      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24409    fi
24410  fi
24411
24412  # Now new_path has a complete unix path to the binary
24413  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24414    # Keep paths in /bin as-is, but remove trailing .exe if any
24415    new_path="${new_path/%.exe/}"
24416    # Do not save /bin paths to all_fixpath_prefixes!
24417  else
24418    # Not in mixed or Windows style, start by that.
24419    new_path=`cmd //c echo $new_path`
24420
24421  input_path="$new_path"
24422  # Check if we need to convert this using DOS-style short mode. If the path
24423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24424  # take no chances and rewrite it.
24425  # Note: m4 eats our [], so we need to use [ and ] instead.
24426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24427  if test "x$has_forbidden_chars" != x; then
24428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24430  fi
24431
24432    # Output is in $new_path
24433
24434  windows_path="$new_path"
24435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24436    unix_path=`$CYGPATH -u "$windows_path"`
24437    new_path="$unix_path"
24438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24440    new_path="$unix_path"
24441  fi
24442
24443    # remove trailing .exe if any
24444    new_path="${new_path/%.exe/}"
24445
24446    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24447    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24448  fi
24449
24450  else
24451    # We're on a posix platform. Hooray! :)
24452    # First separate the path from the arguments. This will split at the first
24453    # space.
24454    complete="$DUMPBIN"
24455    path="${complete%% *}"
24456    tmp="$complete EOL"
24457    arguments="${tmp#* }"
24458
24459    # Cannot rely on the command "which" here since it doesn't always work.
24460    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24461    if test -z "$is_absolute_path"; then
24462      # Path to executable is not absolute. Find it.
24463      IFS_save="$IFS"
24464      IFS=:
24465      for p in $PATH; do
24466        if test -f "$p/$path" && test -x "$p/$path"; then
24467          new_path="$p/$path"
24468          break
24469        fi
24470      done
24471      IFS="$IFS_save"
24472    else
24473      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24474$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24475      new_path="$path"
24476    fi
24477
24478    if test "x$new_path" = x; then
24479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24480$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24481      has_space=`$ECHO "$complete" | $GREP " "`
24482      if test "x$has_space" != x; then
24483        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24484$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24485      fi
24486      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24487    fi
24488  fi
24489
24490  # Now join together the path and the arguments once again
24491  if test "x$arguments" != xEOL; then
24492    new_complete="$new_path ${arguments% *}"
24493  else
24494    new_complete="$new_path"
24495  fi
24496
24497  if test "x$complete" != "x$new_complete"; then
24498    DUMPBIN="$new_complete"
24499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24500$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24501  fi
24502
24503
24504      COMPILER_TYPE=CL
24505      CCXXFLAGS="$CCXXFLAGS -nologo"
24506
24507fi
24508
24509
24510
24511  ac_ext=c
24512ac_cpp='$CPP $CPPFLAGS'
24513ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24514ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24515ac_compiler_gnu=$ac_cv_c_compiler_gnu
24516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24517$as_echo_n "checking how to run the C preprocessor... " >&6; }
24518# On Suns, sometimes $CPP names a directory.
24519if test -n "$CPP" && test -d "$CPP"; then
24520  CPP=
24521fi
24522if test -z "$CPP"; then
24523  if ${ac_cv_prog_CPP+:} false; then :
24524  $as_echo_n "(cached) " >&6
24525else
24526      # Double quotes because CPP needs to be expanded
24527    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24528    do
24529      ac_preproc_ok=false
24530for ac_c_preproc_warn_flag in '' yes
24531do
24532  # Use a header file that comes with gcc, so configuring glibc
24533  # with a fresh cross-compiler works.
24534  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24535  # <limits.h> exists even on freestanding compilers.
24536  # On the NeXT, cc -E runs the code through the compiler's parser,
24537  # not just through cpp. "Syntax error" is here to catch this case.
24538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24539/* end confdefs.h.  */
24540#ifdef __STDC__
24541# include <limits.h>
24542#else
24543# include <assert.h>
24544#endif
24545		     Syntax error
24546_ACEOF
24547if ac_fn_c_try_cpp "$LINENO"; then :
24548
24549else
24550  # Broken: fails on valid input.
24551continue
24552fi
24553rm -f conftest.err conftest.i conftest.$ac_ext
24554
24555  # OK, works on sane cases.  Now check whether nonexistent headers
24556  # can be detected and how.
24557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24558/* end confdefs.h.  */
24559#include <ac_nonexistent.h>
24560_ACEOF
24561if ac_fn_c_try_cpp "$LINENO"; then :
24562  # Broken: success on invalid input.
24563continue
24564else
24565  # Passes both tests.
24566ac_preproc_ok=:
24567break
24568fi
24569rm -f conftest.err conftest.i conftest.$ac_ext
24570
24571done
24572# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24573rm -f conftest.i conftest.err conftest.$ac_ext
24574if $ac_preproc_ok; then :
24575  break
24576fi
24577
24578    done
24579    ac_cv_prog_CPP=$CPP
24580
24581fi
24582  CPP=$ac_cv_prog_CPP
24583else
24584  ac_cv_prog_CPP=$CPP
24585fi
24586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24587$as_echo "$CPP" >&6; }
24588ac_preproc_ok=false
24589for ac_c_preproc_warn_flag in '' yes
24590do
24591  # Use a header file that comes with gcc, so configuring glibc
24592  # with a fresh cross-compiler works.
24593  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24594  # <limits.h> exists even on freestanding compilers.
24595  # On the NeXT, cc -E runs the code through the compiler's parser,
24596  # not just through cpp. "Syntax error" is here to catch this case.
24597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24598/* end confdefs.h.  */
24599#ifdef __STDC__
24600# include <limits.h>
24601#else
24602# include <assert.h>
24603#endif
24604		     Syntax error
24605_ACEOF
24606if ac_fn_c_try_cpp "$LINENO"; then :
24607
24608else
24609  # Broken: fails on valid input.
24610continue
24611fi
24612rm -f conftest.err conftest.i conftest.$ac_ext
24613
24614  # OK, works on sane cases.  Now check whether nonexistent headers
24615  # can be detected and how.
24616  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24617/* end confdefs.h.  */
24618#include <ac_nonexistent.h>
24619_ACEOF
24620if ac_fn_c_try_cpp "$LINENO"; then :
24621  # Broken: success on invalid input.
24622continue
24623else
24624  # Passes both tests.
24625ac_preproc_ok=:
24626break
24627fi
24628rm -f conftest.err conftest.i conftest.$ac_ext
24629
24630done
24631# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24632rm -f conftest.i conftest.err conftest.$ac_ext
24633if $ac_preproc_ok; then :
24634
24635else
24636  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24638as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24639See \`config.log' for more details" "$LINENO" 5; }
24640fi
24641
24642ac_ext=cpp
24643ac_cpp='$CXXCPP $CPPFLAGS'
24644ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24645ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24646ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24647
24648
24649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24650
24651  # First separate the path from the arguments. This will split at the first
24652  # space.
24653  complete="$CPP"
24654  path="${complete%% *}"
24655  tmp="$complete EOL"
24656  arguments="${tmp#* }"
24657
24658  # Input might be given as Windows format, start by converting to
24659  # unix format.
24660  new_path=`$CYGPATH -u "$path"`
24661
24662  # Now try to locate executable using which
24663  new_path=`$WHICH "$new_path" 2> /dev/null`
24664  # bat and cmd files are not always considered executable in cygwin causing which
24665  # to not find them
24666  if test "x$new_path" = x \
24667      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24668      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24669    new_path=`$CYGPATH -u "$path"`
24670  fi
24671  if test "x$new_path" = x; then
24672    # Oops. Which didn't find the executable.
24673    # The splitting of arguments from the executable at a space might have been incorrect,
24674    # since paths with space are more likely in Windows. Give it another try with the whole
24675    # argument.
24676    path="$complete"
24677    arguments="EOL"
24678    new_path=`$CYGPATH -u "$path"`
24679    new_path=`$WHICH "$new_path" 2> /dev/null`
24680    # bat and cmd files are not always considered executable in cygwin causing which
24681    # to not find them
24682    if test "x$new_path" = x \
24683        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24684        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24685      new_path=`$CYGPATH -u "$path"`
24686    fi
24687    if test "x$new_path" = x; then
24688      # It's still not found. Now this is an unrecoverable error.
24689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24690$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24691      has_space=`$ECHO "$complete" | $GREP " "`
24692      if test "x$has_space" != x; then
24693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24695      fi
24696      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24697    fi
24698  fi
24699
24700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24703  # "foo.exe" is OK but "foo" is an error.
24704  #
24705  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24706  # It is also a way to make sure we got the proper file name for the real test later on.
24707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24708  if test "x$test_shortpath" = x; then
24709    # Short path failed, file does not exist as specified.
24710    # Try adding .exe or .cmd
24711    if test -f "${new_path}.exe"; then
24712      input_to_shortpath="${new_path}.exe"
24713    elif test -f "${new_path}.cmd"; then
24714      input_to_shortpath="${new_path}.cmd"
24715    else
24716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24717$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24718      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24719$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24720      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24721    fi
24722  else
24723    input_to_shortpath="$new_path"
24724  fi
24725
24726  # Call helper function which possibly converts this using DOS-style short mode.
24727  # If so, the updated path is stored in $new_path.
24728  new_path="$input_to_shortpath"
24729
24730  input_path="$input_to_shortpath"
24731  # Check if we need to convert this using DOS-style short mode. If the path
24732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24733  # take no chances and rewrite it.
24734  # Note: m4 eats our [], so we need to use [ and ] instead.
24735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24736  if test "x$has_forbidden_chars" != x; then
24737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24741      # Going to short mode and back again did indeed matter. Since short mode is
24742      # case insensitive, let's make it lowercase to improve readability.
24743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24744      # Now convert it back to Unix-stile (cygpath)
24745      input_path=`$CYGPATH -u "$shortmode_path"`
24746      new_path="$input_path"
24747    fi
24748  fi
24749
24750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24751  if test "x$test_cygdrive_prefix" = x; then
24752    # As a simple fix, exclude /usr/bin since it's not a real path.
24753    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24755      # a path prefixed by /cygdrive for fixpath to work.
24756      new_path="$CYGWIN_ROOT_PATH$input_path"
24757    fi
24758  fi
24759
24760  # remove trailing .exe if any
24761  new_path="${new_path/%.exe/}"
24762
24763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24764
24765  # First separate the path from the arguments. This will split at the first
24766  # space.
24767  complete="$CPP"
24768  path="${complete%% *}"
24769  tmp="$complete EOL"
24770  arguments="${tmp#* }"
24771
24772  # Input might be given as Windows format, start by converting to
24773  # unix format.
24774  new_path="$path"
24775
24776  windows_path="$new_path"
24777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24778    unix_path=`$CYGPATH -u "$windows_path"`
24779    new_path="$unix_path"
24780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24782    new_path="$unix_path"
24783  fi
24784
24785
24786  # Now try to locate executable using which
24787  new_path=`$WHICH "$new_path" 2> /dev/null`
24788
24789  if test "x$new_path" = x; then
24790    # Oops. Which didn't find the executable.
24791    # The splitting of arguments from the executable at a space might have been incorrect,
24792    # since paths with space are more likely in Windows. Give it another try with the whole
24793    # argument.
24794    path="$complete"
24795    arguments="EOL"
24796    new_path="$path"
24797
24798  windows_path="$new_path"
24799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24800    unix_path=`$CYGPATH -u "$windows_path"`
24801    new_path="$unix_path"
24802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24804    new_path="$unix_path"
24805  fi
24806
24807
24808    new_path=`$WHICH "$new_path" 2> /dev/null`
24809
24810    if test "x$new_path" = x; then
24811      # It's still not found. Now this is an unrecoverable error.
24812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24813$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24814      has_space=`$ECHO "$complete" | $GREP " "`
24815      if test "x$has_space" != x; then
24816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24818      fi
24819      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24820    fi
24821  fi
24822
24823  # Now new_path has a complete unix path to the binary
24824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24825    # Keep paths in /bin as-is, but remove trailing .exe if any
24826    new_path="${new_path/%.exe/}"
24827    # Do not save /bin paths to all_fixpath_prefixes!
24828  else
24829    # Not in mixed or Windows style, start by that.
24830    new_path=`cmd //c echo $new_path`
24831
24832  input_path="$new_path"
24833  # Check if we need to convert this using DOS-style short mode. If the path
24834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24835  # take no chances and rewrite it.
24836  # Note: m4 eats our [], so we need to use [ and ] instead.
24837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24838  if test "x$has_forbidden_chars" != x; then
24839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24841  fi
24842
24843    # Output is in $new_path
24844
24845  windows_path="$new_path"
24846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24847    unix_path=`$CYGPATH -u "$windows_path"`
24848    new_path="$unix_path"
24849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24851    new_path="$unix_path"
24852  fi
24853
24854    # remove trailing .exe if any
24855    new_path="${new_path/%.exe/}"
24856
24857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24859  fi
24860
24861  else
24862    # We're on a posix platform. Hooray! :)
24863    # First separate the path from the arguments. This will split at the first
24864    # space.
24865    complete="$CPP"
24866    path="${complete%% *}"
24867    tmp="$complete EOL"
24868    arguments="${tmp#* }"
24869
24870    # Cannot rely on the command "which" here since it doesn't always work.
24871    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24872    if test -z "$is_absolute_path"; then
24873      # Path to executable is not absolute. Find it.
24874      IFS_save="$IFS"
24875      IFS=:
24876      for p in $PATH; do
24877        if test -f "$p/$path" && test -x "$p/$path"; then
24878          new_path="$p/$path"
24879          break
24880        fi
24881      done
24882      IFS="$IFS_save"
24883    else
24884      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24885$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24886      new_path="$path"
24887    fi
24888
24889    if test "x$new_path" = x; then
24890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24891$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24892      has_space=`$ECHO "$complete" | $GREP " "`
24893      if test "x$has_space" != x; then
24894        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24896      fi
24897      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24898    fi
24899  fi
24900
24901  # Now join together the path and the arguments once again
24902  if test "x$arguments" != xEOL; then
24903    new_complete="$new_path ${arguments% *}"
24904  else
24905    new_complete="$new_path"
24906  fi
24907
24908  if test "x$complete" != "x$new_complete"; then
24909    CPP="$new_complete"
24910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24911$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24912  fi
24913
24914
24915  ac_ext=cpp
24916ac_cpp='$CXXCPP $CPPFLAGS'
24917ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24918ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24919ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24921$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24922if test -z "$CXXCPP"; then
24923  if ${ac_cv_prog_CXXCPP+:} false; then :
24924  $as_echo_n "(cached) " >&6
24925else
24926      # Double quotes because CXXCPP needs to be expanded
24927    for CXXCPP in "$CXX -E" "/lib/cpp"
24928    do
24929      ac_preproc_ok=false
24930for ac_cxx_preproc_warn_flag in '' yes
24931do
24932  # Use a header file that comes with gcc, so configuring glibc
24933  # with a fresh cross-compiler works.
24934  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24935  # <limits.h> exists even on freestanding compilers.
24936  # On the NeXT, cc -E runs the code through the compiler's parser,
24937  # not just through cpp. "Syntax error" is here to catch this case.
24938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24939/* end confdefs.h.  */
24940#ifdef __STDC__
24941# include <limits.h>
24942#else
24943# include <assert.h>
24944#endif
24945		     Syntax error
24946_ACEOF
24947if ac_fn_cxx_try_cpp "$LINENO"; then :
24948
24949else
24950  # Broken: fails on valid input.
24951continue
24952fi
24953rm -f conftest.err conftest.i conftest.$ac_ext
24954
24955  # OK, works on sane cases.  Now check whether nonexistent headers
24956  # can be detected and how.
24957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24958/* end confdefs.h.  */
24959#include <ac_nonexistent.h>
24960_ACEOF
24961if ac_fn_cxx_try_cpp "$LINENO"; then :
24962  # Broken: success on invalid input.
24963continue
24964else
24965  # Passes both tests.
24966ac_preproc_ok=:
24967break
24968fi
24969rm -f conftest.err conftest.i conftest.$ac_ext
24970
24971done
24972# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24973rm -f conftest.i conftest.err conftest.$ac_ext
24974if $ac_preproc_ok; then :
24975  break
24976fi
24977
24978    done
24979    ac_cv_prog_CXXCPP=$CXXCPP
24980
24981fi
24982  CXXCPP=$ac_cv_prog_CXXCPP
24983else
24984  ac_cv_prog_CXXCPP=$CXXCPP
24985fi
24986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24987$as_echo "$CXXCPP" >&6; }
24988ac_preproc_ok=false
24989for ac_cxx_preproc_warn_flag in '' yes
24990do
24991  # Use a header file that comes with gcc, so configuring glibc
24992  # with a fresh cross-compiler works.
24993  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24994  # <limits.h> exists even on freestanding compilers.
24995  # On the NeXT, cc -E runs the code through the compiler's parser,
24996  # not just through cpp. "Syntax error" is here to catch this case.
24997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24998/* end confdefs.h.  */
24999#ifdef __STDC__
25000# include <limits.h>
25001#else
25002# include <assert.h>
25003#endif
25004		     Syntax error
25005_ACEOF
25006if ac_fn_cxx_try_cpp "$LINENO"; then :
25007
25008else
25009  # Broken: fails on valid input.
25010continue
25011fi
25012rm -f conftest.err conftest.i conftest.$ac_ext
25013
25014  # OK, works on sane cases.  Now check whether nonexistent headers
25015  # can be detected and how.
25016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25017/* end confdefs.h.  */
25018#include <ac_nonexistent.h>
25019_ACEOF
25020if ac_fn_cxx_try_cpp "$LINENO"; then :
25021  # Broken: success on invalid input.
25022continue
25023else
25024  # Passes both tests.
25025ac_preproc_ok=:
25026break
25027fi
25028rm -f conftest.err conftest.i conftest.$ac_ext
25029
25030done
25031# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25032rm -f conftest.i conftest.err conftest.$ac_ext
25033if $ac_preproc_ok; then :
25034
25035else
25036  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25038as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25039See \`config.log' for more details" "$LINENO" 5; }
25040fi
25041
25042ac_ext=cpp
25043ac_cpp='$CXXCPP $CPPFLAGS'
25044ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25045ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25046ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25047
25048
25049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25050
25051  # First separate the path from the arguments. This will split at the first
25052  # space.
25053  complete="$CXXCPP"
25054  path="${complete%% *}"
25055  tmp="$complete EOL"
25056  arguments="${tmp#* }"
25057
25058  # Input might be given as Windows format, start by converting to
25059  # unix format.
25060  new_path=`$CYGPATH -u "$path"`
25061
25062  # Now try to locate executable using which
25063  new_path=`$WHICH "$new_path" 2> /dev/null`
25064  # bat and cmd files are not always considered executable in cygwin causing which
25065  # to not find them
25066  if test "x$new_path" = x \
25067      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25068      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25069    new_path=`$CYGPATH -u "$path"`
25070  fi
25071  if test "x$new_path" = x; then
25072    # Oops. Which didn't find the executable.
25073    # The splitting of arguments from the executable at a space might have been incorrect,
25074    # since paths with space are more likely in Windows. Give it another try with the whole
25075    # argument.
25076    path="$complete"
25077    arguments="EOL"
25078    new_path=`$CYGPATH -u "$path"`
25079    new_path=`$WHICH "$new_path" 2> /dev/null`
25080    # bat and cmd files are not always considered executable in cygwin causing which
25081    # to not find them
25082    if test "x$new_path" = x \
25083        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25084        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25085      new_path=`$CYGPATH -u "$path"`
25086    fi
25087    if test "x$new_path" = x; then
25088      # It's still not found. Now this is an unrecoverable error.
25089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25090$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25091      has_space=`$ECHO "$complete" | $GREP " "`
25092      if test "x$has_space" != x; then
25093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25095      fi
25096      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25097    fi
25098  fi
25099
25100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25103  # "foo.exe" is OK but "foo" is an error.
25104  #
25105  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25106  # It is also a way to make sure we got the proper file name for the real test later on.
25107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25108  if test "x$test_shortpath" = x; then
25109    # Short path failed, file does not exist as specified.
25110    # Try adding .exe or .cmd
25111    if test -f "${new_path}.exe"; then
25112      input_to_shortpath="${new_path}.exe"
25113    elif test -f "${new_path}.cmd"; then
25114      input_to_shortpath="${new_path}.cmd"
25115    else
25116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25117$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25118      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25119$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25120      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25121    fi
25122  else
25123    input_to_shortpath="$new_path"
25124  fi
25125
25126  # Call helper function which possibly converts this using DOS-style short mode.
25127  # If so, the updated path is stored in $new_path.
25128  new_path="$input_to_shortpath"
25129
25130  input_path="$input_to_shortpath"
25131  # Check if we need to convert this using DOS-style short mode. If the path
25132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25133  # take no chances and rewrite it.
25134  # Note: m4 eats our [], so we need to use [ and ] instead.
25135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25136  if test "x$has_forbidden_chars" != x; then
25137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25141      # Going to short mode and back again did indeed matter. Since short mode is
25142      # case insensitive, let's make it lowercase to improve readability.
25143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25144      # Now convert it back to Unix-stile (cygpath)
25145      input_path=`$CYGPATH -u "$shortmode_path"`
25146      new_path="$input_path"
25147    fi
25148  fi
25149
25150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25151  if test "x$test_cygdrive_prefix" = x; then
25152    # As a simple fix, exclude /usr/bin since it's not a real path.
25153    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25155      # a path prefixed by /cygdrive for fixpath to work.
25156      new_path="$CYGWIN_ROOT_PATH$input_path"
25157    fi
25158  fi
25159
25160  # remove trailing .exe if any
25161  new_path="${new_path/%.exe/}"
25162
25163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25164
25165  # First separate the path from the arguments. This will split at the first
25166  # space.
25167  complete="$CXXCPP"
25168  path="${complete%% *}"
25169  tmp="$complete EOL"
25170  arguments="${tmp#* }"
25171
25172  # Input might be given as Windows format, start by converting to
25173  # unix format.
25174  new_path="$path"
25175
25176  windows_path="$new_path"
25177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25178    unix_path=`$CYGPATH -u "$windows_path"`
25179    new_path="$unix_path"
25180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25182    new_path="$unix_path"
25183  fi
25184
25185
25186  # Now try to locate executable using which
25187  new_path=`$WHICH "$new_path" 2> /dev/null`
25188
25189  if test "x$new_path" = x; then
25190    # Oops. Which didn't find the executable.
25191    # The splitting of arguments from the executable at a space might have been incorrect,
25192    # since paths with space are more likely in Windows. Give it another try with the whole
25193    # argument.
25194    path="$complete"
25195    arguments="EOL"
25196    new_path="$path"
25197
25198  windows_path="$new_path"
25199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25200    unix_path=`$CYGPATH -u "$windows_path"`
25201    new_path="$unix_path"
25202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25204    new_path="$unix_path"
25205  fi
25206
25207
25208    new_path=`$WHICH "$new_path" 2> /dev/null`
25209
25210    if test "x$new_path" = x; then
25211      # It's still not found. Now this is an unrecoverable error.
25212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25213$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25214      has_space=`$ECHO "$complete" | $GREP " "`
25215      if test "x$has_space" != x; then
25216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25218      fi
25219      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25220    fi
25221  fi
25222
25223  # Now new_path has a complete unix path to the binary
25224  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25225    # Keep paths in /bin as-is, but remove trailing .exe if any
25226    new_path="${new_path/%.exe/}"
25227    # Do not save /bin paths to all_fixpath_prefixes!
25228  else
25229    # Not in mixed or Windows style, start by that.
25230    new_path=`cmd //c echo $new_path`
25231
25232  input_path="$new_path"
25233  # Check if we need to convert this using DOS-style short mode. If the path
25234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25235  # take no chances and rewrite it.
25236  # Note: m4 eats our [], so we need to use [ and ] instead.
25237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25238  if test "x$has_forbidden_chars" != x; then
25239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25241  fi
25242
25243    # Output is in $new_path
25244
25245  windows_path="$new_path"
25246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25247    unix_path=`$CYGPATH -u "$windows_path"`
25248    new_path="$unix_path"
25249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25251    new_path="$unix_path"
25252  fi
25253
25254    # remove trailing .exe if any
25255    new_path="${new_path/%.exe/}"
25256
25257    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25258    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25259  fi
25260
25261  else
25262    # We're on a posix platform. Hooray! :)
25263    # First separate the path from the arguments. This will split at the first
25264    # space.
25265    complete="$CXXCPP"
25266    path="${complete%% *}"
25267    tmp="$complete EOL"
25268    arguments="${tmp#* }"
25269
25270    # Cannot rely on the command "which" here since it doesn't always work.
25271    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25272    if test -z "$is_absolute_path"; then
25273      # Path to executable is not absolute. Find it.
25274      IFS_save="$IFS"
25275      IFS=:
25276      for p in $PATH; do
25277        if test -f "$p/$path" && test -x "$p/$path"; then
25278          new_path="$p/$path"
25279          break
25280        fi
25281      done
25282      IFS="$IFS_save"
25283    else
25284      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25285$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25286      new_path="$path"
25287    fi
25288
25289    if test "x$new_path" = x; then
25290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25291$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25292      has_space=`$ECHO "$complete" | $GREP " "`
25293      if test "x$has_space" != x; then
25294        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25295$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25296      fi
25297      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25298    fi
25299  fi
25300
25301  # Now join together the path and the arguments once again
25302  if test "x$arguments" != xEOL; then
25303    new_complete="$new_path ${arguments% *}"
25304  else
25305    new_complete="$new_path"
25306  fi
25307
25308  if test "x$complete" != "x$new_complete"; then
25309    CXXCPP="$new_complete"
25310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25311$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25312  fi
25313
25314
25315  if test "x$COMPILE_TYPE" != "xcross"; then
25316    # If we are not cross compiling, use the same compilers for
25317    # building the build platform executables. The cross-compilation
25318    # case needed to be done earlier, but this can only be done after
25319    # the native tools have been localized.
25320    BUILD_CC="$CC"
25321    BUILD_CXX="$CXX"
25322    BUILD_LD="$LD"
25323  fi
25324
25325  # for solaris we really need solaris tools, and not gnu equivalent
25326  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25327  #   starting to probe
25328  #
25329  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25330  #         so that it can be overriden --with-tools-dir
25331  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25332    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25333  fi
25334
25335  # Find the right assembler.
25336  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25337    # Extract the first word of "as", so it can be a program name with args.
25338set dummy as; ac_word=$2
25339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25340$as_echo_n "checking for $ac_word... " >&6; }
25341if ${ac_cv_path_AS+:} false; then :
25342  $as_echo_n "(cached) " >&6
25343else
25344  case $AS in
25345  [\\/]* | ?:[\\/]*)
25346  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25347  ;;
25348  *)
25349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25350for as_dir in $PATH
25351do
25352  IFS=$as_save_IFS
25353  test -z "$as_dir" && as_dir=.
25354    for ac_exec_ext in '' $ac_executable_extensions; do
25355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25356    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25358    break 2
25359  fi
25360done
25361  done
25362IFS=$as_save_IFS
25363
25364  ;;
25365esac
25366fi
25367AS=$ac_cv_path_AS
25368if test -n "$AS"; then
25369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25370$as_echo "$AS" >&6; }
25371else
25372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25373$as_echo "no" >&6; }
25374fi
25375
25376
25377
25378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25379
25380  # First separate the path from the arguments. This will split at the first
25381  # space.
25382  complete="$AS"
25383  path="${complete%% *}"
25384  tmp="$complete EOL"
25385  arguments="${tmp#* }"
25386
25387  # Input might be given as Windows format, start by converting to
25388  # unix format.
25389  new_path=`$CYGPATH -u "$path"`
25390
25391  # Now try to locate executable using which
25392  new_path=`$WHICH "$new_path" 2> /dev/null`
25393  # bat and cmd files are not always considered executable in cygwin causing which
25394  # to not find them
25395  if test "x$new_path" = x \
25396      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25397      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25398    new_path=`$CYGPATH -u "$path"`
25399  fi
25400  if test "x$new_path" = x; then
25401    # Oops. Which didn't find the executable.
25402    # The splitting of arguments from the executable at a space might have been incorrect,
25403    # since paths with space are more likely in Windows. Give it another try with the whole
25404    # argument.
25405    path="$complete"
25406    arguments="EOL"
25407    new_path=`$CYGPATH -u "$path"`
25408    new_path=`$WHICH "$new_path" 2> /dev/null`
25409    # bat and cmd files are not always considered executable in cygwin causing which
25410    # to not find them
25411    if test "x$new_path" = x \
25412        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25413        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25414      new_path=`$CYGPATH -u "$path"`
25415    fi
25416    if test "x$new_path" = x; then
25417      # It's still not found. Now this is an unrecoverable error.
25418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25419$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25420      has_space=`$ECHO "$complete" | $GREP " "`
25421      if test "x$has_space" != x; then
25422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25424      fi
25425      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25426    fi
25427  fi
25428
25429  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25430  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25431  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25432  # "foo.exe" is OK but "foo" is an error.
25433  #
25434  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25435  # It is also a way to make sure we got the proper file name for the real test later on.
25436  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25437  if test "x$test_shortpath" = x; then
25438    # Short path failed, file does not exist as specified.
25439    # Try adding .exe or .cmd
25440    if test -f "${new_path}.exe"; then
25441      input_to_shortpath="${new_path}.exe"
25442    elif test -f "${new_path}.cmd"; then
25443      input_to_shortpath="${new_path}.cmd"
25444    else
25445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25446$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25447      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25448$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25449      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25450    fi
25451  else
25452    input_to_shortpath="$new_path"
25453  fi
25454
25455  # Call helper function which possibly converts this using DOS-style short mode.
25456  # If so, the updated path is stored in $new_path.
25457  new_path="$input_to_shortpath"
25458
25459  input_path="$input_to_shortpath"
25460  # Check if we need to convert this using DOS-style short mode. If the path
25461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25462  # take no chances and rewrite it.
25463  # Note: m4 eats our [], so we need to use [ and ] instead.
25464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25465  if test "x$has_forbidden_chars" != x; then
25466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25470      # Going to short mode and back again did indeed matter. Since short mode is
25471      # case insensitive, let's make it lowercase to improve readability.
25472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25473      # Now convert it back to Unix-stile (cygpath)
25474      input_path=`$CYGPATH -u "$shortmode_path"`
25475      new_path="$input_path"
25476    fi
25477  fi
25478
25479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25480  if test "x$test_cygdrive_prefix" = x; then
25481    # As a simple fix, exclude /usr/bin since it's not a real path.
25482    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25484      # a path prefixed by /cygdrive for fixpath to work.
25485      new_path="$CYGWIN_ROOT_PATH$input_path"
25486    fi
25487  fi
25488
25489  # remove trailing .exe if any
25490  new_path="${new_path/%.exe/}"
25491
25492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25493
25494  # First separate the path from the arguments. This will split at the first
25495  # space.
25496  complete="$AS"
25497  path="${complete%% *}"
25498  tmp="$complete EOL"
25499  arguments="${tmp#* }"
25500
25501  # Input might be given as Windows format, start by converting to
25502  # unix format.
25503  new_path="$path"
25504
25505  windows_path="$new_path"
25506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25507    unix_path=`$CYGPATH -u "$windows_path"`
25508    new_path="$unix_path"
25509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25511    new_path="$unix_path"
25512  fi
25513
25514
25515  # Now try to locate executable using which
25516  new_path=`$WHICH "$new_path" 2> /dev/null`
25517
25518  if test "x$new_path" = x; then
25519    # Oops. Which didn't find the executable.
25520    # The splitting of arguments from the executable at a space might have been incorrect,
25521    # since paths with space are more likely in Windows. Give it another try with the whole
25522    # argument.
25523    path="$complete"
25524    arguments="EOL"
25525    new_path="$path"
25526
25527  windows_path="$new_path"
25528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25529    unix_path=`$CYGPATH -u "$windows_path"`
25530    new_path="$unix_path"
25531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25533    new_path="$unix_path"
25534  fi
25535
25536
25537    new_path=`$WHICH "$new_path" 2> /dev/null`
25538
25539    if test "x$new_path" = x; then
25540      # It's still not found. Now this is an unrecoverable error.
25541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25542$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25543      has_space=`$ECHO "$complete" | $GREP " "`
25544      if test "x$has_space" != x; then
25545        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25546$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25547      fi
25548      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25549    fi
25550  fi
25551
25552  # Now new_path has a complete unix path to the binary
25553  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25554    # Keep paths in /bin as-is, but remove trailing .exe if any
25555    new_path="${new_path/%.exe/}"
25556    # Do not save /bin paths to all_fixpath_prefixes!
25557  else
25558    # Not in mixed or Windows style, start by that.
25559    new_path=`cmd //c echo $new_path`
25560
25561  input_path="$new_path"
25562  # Check if we need to convert this using DOS-style short mode. If the path
25563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25564  # take no chances and rewrite it.
25565  # Note: m4 eats our [], so we need to use [ and ] instead.
25566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25567  if test "x$has_forbidden_chars" != x; then
25568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25570  fi
25571
25572    # Output is in $new_path
25573
25574  windows_path="$new_path"
25575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25576    unix_path=`$CYGPATH -u "$windows_path"`
25577    new_path="$unix_path"
25578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25580    new_path="$unix_path"
25581  fi
25582
25583    # remove trailing .exe if any
25584    new_path="${new_path/%.exe/}"
25585
25586    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25587    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25588  fi
25589
25590  else
25591    # We're on a posix platform. Hooray! :)
25592    # First separate the path from the arguments. This will split at the first
25593    # space.
25594    complete="$AS"
25595    path="${complete%% *}"
25596    tmp="$complete EOL"
25597    arguments="${tmp#* }"
25598
25599    # Cannot rely on the command "which" here since it doesn't always work.
25600    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25601    if test -z "$is_absolute_path"; then
25602      # Path to executable is not absolute. Find it.
25603      IFS_save="$IFS"
25604      IFS=:
25605      for p in $PATH; do
25606        if test -f "$p/$path" && test -x "$p/$path"; then
25607          new_path="$p/$path"
25608          break
25609        fi
25610      done
25611      IFS="$IFS_save"
25612    else
25613      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25614$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25615      new_path="$path"
25616    fi
25617
25618    if test "x$new_path" = x; then
25619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25620$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25621      has_space=`$ECHO "$complete" | $GREP " "`
25622      if test "x$has_space" != x; then
25623        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25624$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25625      fi
25626      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25627    fi
25628  fi
25629
25630  # Now join together the path and the arguments once again
25631  if test "x$arguments" != xEOL; then
25632    new_complete="$new_path ${arguments% *}"
25633  else
25634    new_complete="$new_path"
25635  fi
25636
25637  if test "x$complete" != "x$new_complete"; then
25638    AS="$new_complete"
25639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25640$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25641  fi
25642
25643  else
25644    AS="$CC -c"
25645  fi
25646
25647
25648  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25649    # Extract the first word of "nm", so it can be a program name with args.
25650set dummy nm; ac_word=$2
25651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25652$as_echo_n "checking for $ac_word... " >&6; }
25653if ${ac_cv_path_NM+:} false; then :
25654  $as_echo_n "(cached) " >&6
25655else
25656  case $NM in
25657  [\\/]* | ?:[\\/]*)
25658  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25659  ;;
25660  *)
25661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25662for as_dir in $PATH
25663do
25664  IFS=$as_save_IFS
25665  test -z "$as_dir" && as_dir=.
25666    for ac_exec_ext in '' $ac_executable_extensions; do
25667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25668    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25670    break 2
25671  fi
25672done
25673  done
25674IFS=$as_save_IFS
25675
25676  ;;
25677esac
25678fi
25679NM=$ac_cv_path_NM
25680if test -n "$NM"; then
25681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25682$as_echo "$NM" >&6; }
25683else
25684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25685$as_echo "no" >&6; }
25686fi
25687
25688
25689
25690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25691
25692  # First separate the path from the arguments. This will split at the first
25693  # space.
25694  complete="$NM"
25695  path="${complete%% *}"
25696  tmp="$complete EOL"
25697  arguments="${tmp#* }"
25698
25699  # Input might be given as Windows format, start by converting to
25700  # unix format.
25701  new_path=`$CYGPATH -u "$path"`
25702
25703  # Now try to locate executable using which
25704  new_path=`$WHICH "$new_path" 2> /dev/null`
25705  # bat and cmd files are not always considered executable in cygwin causing which
25706  # to not find them
25707  if test "x$new_path" = x \
25708      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25709      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25710    new_path=`$CYGPATH -u "$path"`
25711  fi
25712  if test "x$new_path" = x; then
25713    # Oops. Which didn't find the executable.
25714    # The splitting of arguments from the executable at a space might have been incorrect,
25715    # since paths with space are more likely in Windows. Give it another try with the whole
25716    # argument.
25717    path="$complete"
25718    arguments="EOL"
25719    new_path=`$CYGPATH -u "$path"`
25720    new_path=`$WHICH "$new_path" 2> /dev/null`
25721    # bat and cmd files are not always considered executable in cygwin causing which
25722    # to not find them
25723    if test "x$new_path" = x \
25724        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25725        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25726      new_path=`$CYGPATH -u "$path"`
25727    fi
25728    if test "x$new_path" = x; then
25729      # It's still not found. Now this is an unrecoverable error.
25730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25731$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25732      has_space=`$ECHO "$complete" | $GREP " "`
25733      if test "x$has_space" != x; then
25734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25736      fi
25737      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25738    fi
25739  fi
25740
25741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25744  # "foo.exe" is OK but "foo" is an error.
25745  #
25746  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25747  # It is also a way to make sure we got the proper file name for the real test later on.
25748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25749  if test "x$test_shortpath" = x; then
25750    # Short path failed, file does not exist as specified.
25751    # Try adding .exe or .cmd
25752    if test -f "${new_path}.exe"; then
25753      input_to_shortpath="${new_path}.exe"
25754    elif test -f "${new_path}.cmd"; then
25755      input_to_shortpath="${new_path}.cmd"
25756    else
25757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25758$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25759      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25760$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25761      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25762    fi
25763  else
25764    input_to_shortpath="$new_path"
25765  fi
25766
25767  # Call helper function which possibly converts this using DOS-style short mode.
25768  # If so, the updated path is stored in $new_path.
25769  new_path="$input_to_shortpath"
25770
25771  input_path="$input_to_shortpath"
25772  # Check if we need to convert this using DOS-style short mode. If the path
25773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25774  # take no chances and rewrite it.
25775  # Note: m4 eats our [], so we need to use [ and ] instead.
25776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25777  if test "x$has_forbidden_chars" != x; then
25778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25782      # Going to short mode and back again did indeed matter. Since short mode is
25783      # case insensitive, let's make it lowercase to improve readability.
25784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25785      # Now convert it back to Unix-stile (cygpath)
25786      input_path=`$CYGPATH -u "$shortmode_path"`
25787      new_path="$input_path"
25788    fi
25789  fi
25790
25791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25792  if test "x$test_cygdrive_prefix" = x; then
25793    # As a simple fix, exclude /usr/bin since it's not a real path.
25794    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25796      # a path prefixed by /cygdrive for fixpath to work.
25797      new_path="$CYGWIN_ROOT_PATH$input_path"
25798    fi
25799  fi
25800
25801  # remove trailing .exe if any
25802  new_path="${new_path/%.exe/}"
25803
25804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25805
25806  # First separate the path from the arguments. This will split at the first
25807  # space.
25808  complete="$NM"
25809  path="${complete%% *}"
25810  tmp="$complete EOL"
25811  arguments="${tmp#* }"
25812
25813  # Input might be given as Windows format, start by converting to
25814  # unix format.
25815  new_path="$path"
25816
25817  windows_path="$new_path"
25818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25819    unix_path=`$CYGPATH -u "$windows_path"`
25820    new_path="$unix_path"
25821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25823    new_path="$unix_path"
25824  fi
25825
25826
25827  # Now try to locate executable using which
25828  new_path=`$WHICH "$new_path" 2> /dev/null`
25829
25830  if test "x$new_path" = x; then
25831    # Oops. Which didn't find the executable.
25832    # The splitting of arguments from the executable at a space might have been incorrect,
25833    # since paths with space are more likely in Windows. Give it another try with the whole
25834    # argument.
25835    path="$complete"
25836    arguments="EOL"
25837    new_path="$path"
25838
25839  windows_path="$new_path"
25840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25841    unix_path=`$CYGPATH -u "$windows_path"`
25842    new_path="$unix_path"
25843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25845    new_path="$unix_path"
25846  fi
25847
25848
25849    new_path=`$WHICH "$new_path" 2> /dev/null`
25850
25851    if test "x$new_path" = x; then
25852      # It's still not found. Now this is an unrecoverable error.
25853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25854$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25855      has_space=`$ECHO "$complete" | $GREP " "`
25856      if test "x$has_space" != x; then
25857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25859      fi
25860      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25861    fi
25862  fi
25863
25864  # Now new_path has a complete unix path to the binary
25865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25866    # Keep paths in /bin as-is, but remove trailing .exe if any
25867    new_path="${new_path/%.exe/}"
25868    # Do not save /bin paths to all_fixpath_prefixes!
25869  else
25870    # Not in mixed or Windows style, start by that.
25871    new_path=`cmd //c echo $new_path`
25872
25873  input_path="$new_path"
25874  # Check if we need to convert this using DOS-style short mode. If the path
25875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25876  # take no chances and rewrite it.
25877  # Note: m4 eats our [], so we need to use [ and ] instead.
25878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25879  if test "x$has_forbidden_chars" != x; then
25880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25882  fi
25883
25884    # Output is in $new_path
25885
25886  windows_path="$new_path"
25887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25888    unix_path=`$CYGPATH -u "$windows_path"`
25889    new_path="$unix_path"
25890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25892    new_path="$unix_path"
25893  fi
25894
25895    # remove trailing .exe if any
25896    new_path="${new_path/%.exe/}"
25897
25898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25900  fi
25901
25902  else
25903    # We're on a posix platform. Hooray! :)
25904    # First separate the path from the arguments. This will split at the first
25905    # space.
25906    complete="$NM"
25907    path="${complete%% *}"
25908    tmp="$complete EOL"
25909    arguments="${tmp#* }"
25910
25911    # Cannot rely on the command "which" here since it doesn't always work.
25912    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25913    if test -z "$is_absolute_path"; then
25914      # Path to executable is not absolute. Find it.
25915      IFS_save="$IFS"
25916      IFS=:
25917      for p in $PATH; do
25918        if test -f "$p/$path" && test -x "$p/$path"; then
25919          new_path="$p/$path"
25920          break
25921        fi
25922      done
25923      IFS="$IFS_save"
25924    else
25925      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25926$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25927      new_path="$path"
25928    fi
25929
25930    if test "x$new_path" = x; then
25931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25932$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25933      has_space=`$ECHO "$complete" | $GREP " "`
25934      if test "x$has_space" != x; then
25935        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25937      fi
25938      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25939    fi
25940  fi
25941
25942  # Now join together the path and the arguments once again
25943  if test "x$arguments" != xEOL; then
25944    new_complete="$new_path ${arguments% *}"
25945  else
25946    new_complete="$new_path"
25947  fi
25948
25949  if test "x$complete" != "x$new_complete"; then
25950    NM="$new_complete"
25951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25952$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25953  fi
25954
25955    # Extract the first word of "gnm", so it can be a program name with args.
25956set dummy gnm; ac_word=$2
25957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25958$as_echo_n "checking for $ac_word... " >&6; }
25959if ${ac_cv_path_GNM+:} false; then :
25960  $as_echo_n "(cached) " >&6
25961else
25962  case $GNM in
25963  [\\/]* | ?:[\\/]*)
25964  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25965  ;;
25966  *)
25967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25968for as_dir in $PATH
25969do
25970  IFS=$as_save_IFS
25971  test -z "$as_dir" && as_dir=.
25972    for ac_exec_ext in '' $ac_executable_extensions; do
25973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25974    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25976    break 2
25977  fi
25978done
25979  done
25980IFS=$as_save_IFS
25981
25982  ;;
25983esac
25984fi
25985GNM=$ac_cv_path_GNM
25986if test -n "$GNM"; then
25987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25988$as_echo "$GNM" >&6; }
25989else
25990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25991$as_echo "no" >&6; }
25992fi
25993
25994
25995
25996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25997
25998  # First separate the path from the arguments. This will split at the first
25999  # space.
26000  complete="$GNM"
26001  path="${complete%% *}"
26002  tmp="$complete EOL"
26003  arguments="${tmp#* }"
26004
26005  # Input might be given as Windows format, start by converting to
26006  # unix format.
26007  new_path=`$CYGPATH -u "$path"`
26008
26009  # Now try to locate executable using which
26010  new_path=`$WHICH "$new_path" 2> /dev/null`
26011  # bat and cmd files are not always considered executable in cygwin causing which
26012  # to not find them
26013  if test "x$new_path" = x \
26014      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26015      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26016    new_path=`$CYGPATH -u "$path"`
26017  fi
26018  if test "x$new_path" = x; then
26019    # Oops. Which didn't find the executable.
26020    # The splitting of arguments from the executable at a space might have been incorrect,
26021    # since paths with space are more likely in Windows. Give it another try with the whole
26022    # argument.
26023    path="$complete"
26024    arguments="EOL"
26025    new_path=`$CYGPATH -u "$path"`
26026    new_path=`$WHICH "$new_path" 2> /dev/null`
26027    # bat and cmd files are not always considered executable in cygwin causing which
26028    # to not find them
26029    if test "x$new_path" = x \
26030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26032      new_path=`$CYGPATH -u "$path"`
26033    fi
26034    if test "x$new_path" = x; then
26035      # It's still not found. Now this is an unrecoverable error.
26036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26037$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26038      has_space=`$ECHO "$complete" | $GREP " "`
26039      if test "x$has_space" != x; then
26040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26042      fi
26043      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26044    fi
26045  fi
26046
26047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26050  # "foo.exe" is OK but "foo" is an error.
26051  #
26052  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26053  # It is also a way to make sure we got the proper file name for the real test later on.
26054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26055  if test "x$test_shortpath" = x; then
26056    # Short path failed, file does not exist as specified.
26057    # Try adding .exe or .cmd
26058    if test -f "${new_path}.exe"; then
26059      input_to_shortpath="${new_path}.exe"
26060    elif test -f "${new_path}.cmd"; then
26061      input_to_shortpath="${new_path}.cmd"
26062    else
26063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26064$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26067      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26068    fi
26069  else
26070    input_to_shortpath="$new_path"
26071  fi
26072
26073  # Call helper function which possibly converts this using DOS-style short mode.
26074  # If so, the updated path is stored in $new_path.
26075  new_path="$input_to_shortpath"
26076
26077  input_path="$input_to_shortpath"
26078  # Check if we need to convert this using DOS-style short mode. If the path
26079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26080  # take no chances and rewrite it.
26081  # Note: m4 eats our [], so we need to use [ and ] instead.
26082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26083  if test "x$has_forbidden_chars" != x; then
26084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26088      # Going to short mode and back again did indeed matter. Since short mode is
26089      # case insensitive, let's make it lowercase to improve readability.
26090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26091      # Now convert it back to Unix-stile (cygpath)
26092      input_path=`$CYGPATH -u "$shortmode_path"`
26093      new_path="$input_path"
26094    fi
26095  fi
26096
26097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26098  if test "x$test_cygdrive_prefix" = x; then
26099    # As a simple fix, exclude /usr/bin since it's not a real path.
26100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26102      # a path prefixed by /cygdrive for fixpath to work.
26103      new_path="$CYGWIN_ROOT_PATH$input_path"
26104    fi
26105  fi
26106
26107  # remove trailing .exe if any
26108  new_path="${new_path/%.exe/}"
26109
26110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26111
26112  # First separate the path from the arguments. This will split at the first
26113  # space.
26114  complete="$GNM"
26115  path="${complete%% *}"
26116  tmp="$complete EOL"
26117  arguments="${tmp#* }"
26118
26119  # Input might be given as Windows format, start by converting to
26120  # unix format.
26121  new_path="$path"
26122
26123  windows_path="$new_path"
26124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26125    unix_path=`$CYGPATH -u "$windows_path"`
26126    new_path="$unix_path"
26127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26129    new_path="$unix_path"
26130  fi
26131
26132
26133  # Now try to locate executable using which
26134  new_path=`$WHICH "$new_path" 2> /dev/null`
26135
26136  if test "x$new_path" = x; then
26137    # Oops. Which didn't find the executable.
26138    # The splitting of arguments from the executable at a space might have been incorrect,
26139    # since paths with space are more likely in Windows. Give it another try with the whole
26140    # argument.
26141    path="$complete"
26142    arguments="EOL"
26143    new_path="$path"
26144
26145  windows_path="$new_path"
26146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26147    unix_path=`$CYGPATH -u "$windows_path"`
26148    new_path="$unix_path"
26149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26151    new_path="$unix_path"
26152  fi
26153
26154
26155    new_path=`$WHICH "$new_path" 2> /dev/null`
26156
26157    if test "x$new_path" = x; then
26158      # It's still not found. Now this is an unrecoverable error.
26159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26160$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26161      has_space=`$ECHO "$complete" | $GREP " "`
26162      if test "x$has_space" != x; then
26163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26165      fi
26166      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26167    fi
26168  fi
26169
26170  # Now new_path has a complete unix path to the binary
26171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26172    # Keep paths in /bin as-is, but remove trailing .exe if any
26173    new_path="${new_path/%.exe/}"
26174    # Do not save /bin paths to all_fixpath_prefixes!
26175  else
26176    # Not in mixed or Windows style, start by that.
26177    new_path=`cmd //c echo $new_path`
26178
26179  input_path="$new_path"
26180  # Check if we need to convert this using DOS-style short mode. If the path
26181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26182  # take no chances and rewrite it.
26183  # Note: m4 eats our [], so we need to use [ and ] instead.
26184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26185  if test "x$has_forbidden_chars" != x; then
26186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26188  fi
26189
26190    # Output is in $new_path
26191
26192  windows_path="$new_path"
26193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26194    unix_path=`$CYGPATH -u "$windows_path"`
26195    new_path="$unix_path"
26196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26198    new_path="$unix_path"
26199  fi
26200
26201    # remove trailing .exe if any
26202    new_path="${new_path/%.exe/}"
26203
26204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26206  fi
26207
26208  else
26209    # We're on a posix platform. Hooray! :)
26210    # First separate the path from the arguments. This will split at the first
26211    # space.
26212    complete="$GNM"
26213    path="${complete%% *}"
26214    tmp="$complete EOL"
26215    arguments="${tmp#* }"
26216
26217    # Cannot rely on the command "which" here since it doesn't always work.
26218    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26219    if test -z "$is_absolute_path"; then
26220      # Path to executable is not absolute. Find it.
26221      IFS_save="$IFS"
26222      IFS=:
26223      for p in $PATH; do
26224        if test -f "$p/$path" && test -x "$p/$path"; then
26225          new_path="$p/$path"
26226          break
26227        fi
26228      done
26229      IFS="$IFS_save"
26230    else
26231      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26232$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26233      new_path="$path"
26234    fi
26235
26236    if test "x$new_path" = x; then
26237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26238$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26239      has_space=`$ECHO "$complete" | $GREP " "`
26240      if test "x$has_space" != x; then
26241        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26242$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26243      fi
26244      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26245    fi
26246  fi
26247
26248  # Now join together the path and the arguments once again
26249  if test "x$arguments" != xEOL; then
26250    new_complete="$new_path ${arguments% *}"
26251  else
26252    new_complete="$new_path"
26253  fi
26254
26255  if test "x$complete" != "x$new_complete"; then
26256    GNM="$new_complete"
26257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26258$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26259  fi
26260
26261    # Extract the first word of "strip", so it can be a program name with args.
26262set dummy strip; ac_word=$2
26263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26264$as_echo_n "checking for $ac_word... " >&6; }
26265if ${ac_cv_path_STRIP+:} false; then :
26266  $as_echo_n "(cached) " >&6
26267else
26268  case $STRIP in
26269  [\\/]* | ?:[\\/]*)
26270  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26271  ;;
26272  *)
26273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26274for as_dir in $PATH
26275do
26276  IFS=$as_save_IFS
26277  test -z "$as_dir" && as_dir=.
26278    for ac_exec_ext in '' $ac_executable_extensions; do
26279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26280    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26282    break 2
26283  fi
26284done
26285  done
26286IFS=$as_save_IFS
26287
26288  ;;
26289esac
26290fi
26291STRIP=$ac_cv_path_STRIP
26292if test -n "$STRIP"; then
26293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26294$as_echo "$STRIP" >&6; }
26295else
26296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26297$as_echo "no" >&6; }
26298fi
26299
26300
26301
26302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26303
26304  # First separate the path from the arguments. This will split at the first
26305  # space.
26306  complete="$STRIP"
26307  path="${complete%% *}"
26308  tmp="$complete EOL"
26309  arguments="${tmp#* }"
26310
26311  # Input might be given as Windows format, start by converting to
26312  # unix format.
26313  new_path=`$CYGPATH -u "$path"`
26314
26315  # Now try to locate executable using which
26316  new_path=`$WHICH "$new_path" 2> /dev/null`
26317  # bat and cmd files are not always considered executable in cygwin causing which
26318  # to not find them
26319  if test "x$new_path" = x \
26320      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26321      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26322    new_path=`$CYGPATH -u "$path"`
26323  fi
26324  if test "x$new_path" = x; then
26325    # Oops. Which didn't find the executable.
26326    # The splitting of arguments from the executable at a space might have been incorrect,
26327    # since paths with space are more likely in Windows. Give it another try with the whole
26328    # argument.
26329    path="$complete"
26330    arguments="EOL"
26331    new_path=`$CYGPATH -u "$path"`
26332    new_path=`$WHICH "$new_path" 2> /dev/null`
26333    # bat and cmd files are not always considered executable in cygwin causing which
26334    # to not find them
26335    if test "x$new_path" = x \
26336        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26337        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26338      new_path=`$CYGPATH -u "$path"`
26339    fi
26340    if test "x$new_path" = x; then
26341      # It's still not found. Now this is an unrecoverable error.
26342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26343$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26344      has_space=`$ECHO "$complete" | $GREP " "`
26345      if test "x$has_space" != x; then
26346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26348      fi
26349      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26350    fi
26351  fi
26352
26353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26356  # "foo.exe" is OK but "foo" is an error.
26357  #
26358  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26359  # It is also a way to make sure we got the proper file name for the real test later on.
26360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26361  if test "x$test_shortpath" = x; then
26362    # Short path failed, file does not exist as specified.
26363    # Try adding .exe or .cmd
26364    if test -f "${new_path}.exe"; then
26365      input_to_shortpath="${new_path}.exe"
26366    elif test -f "${new_path}.cmd"; then
26367      input_to_shortpath="${new_path}.cmd"
26368    else
26369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26370$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26373      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26374    fi
26375  else
26376    input_to_shortpath="$new_path"
26377  fi
26378
26379  # Call helper function which possibly converts this using DOS-style short mode.
26380  # If so, the updated path is stored in $new_path.
26381  new_path="$input_to_shortpath"
26382
26383  input_path="$input_to_shortpath"
26384  # Check if we need to convert this using DOS-style short mode. If the path
26385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26386  # take no chances and rewrite it.
26387  # Note: m4 eats our [], so we need to use [ and ] instead.
26388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26389  if test "x$has_forbidden_chars" != x; then
26390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26394      # Going to short mode and back again did indeed matter. Since short mode is
26395      # case insensitive, let's make it lowercase to improve readability.
26396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26397      # Now convert it back to Unix-stile (cygpath)
26398      input_path=`$CYGPATH -u "$shortmode_path"`
26399      new_path="$input_path"
26400    fi
26401  fi
26402
26403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26404  if test "x$test_cygdrive_prefix" = x; then
26405    # As a simple fix, exclude /usr/bin since it's not a real path.
26406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26408      # a path prefixed by /cygdrive for fixpath to work.
26409      new_path="$CYGWIN_ROOT_PATH$input_path"
26410    fi
26411  fi
26412
26413  # remove trailing .exe if any
26414  new_path="${new_path/%.exe/}"
26415
26416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26417
26418  # First separate the path from the arguments. This will split at the first
26419  # space.
26420  complete="$STRIP"
26421  path="${complete%% *}"
26422  tmp="$complete EOL"
26423  arguments="${tmp#* }"
26424
26425  # Input might be given as Windows format, start by converting to
26426  # unix format.
26427  new_path="$path"
26428
26429  windows_path="$new_path"
26430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26431    unix_path=`$CYGPATH -u "$windows_path"`
26432    new_path="$unix_path"
26433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26435    new_path="$unix_path"
26436  fi
26437
26438
26439  # Now try to locate executable using which
26440  new_path=`$WHICH "$new_path" 2> /dev/null`
26441
26442  if test "x$new_path" = x; then
26443    # Oops. Which didn't find the executable.
26444    # The splitting of arguments from the executable at a space might have been incorrect,
26445    # since paths with space are more likely in Windows. Give it another try with the whole
26446    # argument.
26447    path="$complete"
26448    arguments="EOL"
26449    new_path="$path"
26450
26451  windows_path="$new_path"
26452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26453    unix_path=`$CYGPATH -u "$windows_path"`
26454    new_path="$unix_path"
26455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26457    new_path="$unix_path"
26458  fi
26459
26460
26461    new_path=`$WHICH "$new_path" 2> /dev/null`
26462
26463    if test "x$new_path" = x; then
26464      # It's still not found. Now this is an unrecoverable error.
26465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26466$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26467      has_space=`$ECHO "$complete" | $GREP " "`
26468      if test "x$has_space" != x; then
26469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26471      fi
26472      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26473    fi
26474  fi
26475
26476  # Now new_path has a complete unix path to the binary
26477  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26478    # Keep paths in /bin as-is, but remove trailing .exe if any
26479    new_path="${new_path/%.exe/}"
26480    # Do not save /bin paths to all_fixpath_prefixes!
26481  else
26482    # Not in mixed or Windows style, start by that.
26483    new_path=`cmd //c echo $new_path`
26484
26485  input_path="$new_path"
26486  # Check if we need to convert this using DOS-style short mode. If the path
26487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26488  # take no chances and rewrite it.
26489  # Note: m4 eats our [], so we need to use [ and ] instead.
26490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26491  if test "x$has_forbidden_chars" != x; then
26492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26494  fi
26495
26496    # Output is in $new_path
26497
26498  windows_path="$new_path"
26499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26500    unix_path=`$CYGPATH -u "$windows_path"`
26501    new_path="$unix_path"
26502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26504    new_path="$unix_path"
26505  fi
26506
26507    # remove trailing .exe if any
26508    new_path="${new_path/%.exe/}"
26509
26510    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26511    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26512  fi
26513
26514  else
26515    # We're on a posix platform. Hooray! :)
26516    # First separate the path from the arguments. This will split at the first
26517    # space.
26518    complete="$STRIP"
26519    path="${complete%% *}"
26520    tmp="$complete EOL"
26521    arguments="${tmp#* }"
26522
26523    # Cannot rely on the command "which" here since it doesn't always work.
26524    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26525    if test -z "$is_absolute_path"; then
26526      # Path to executable is not absolute. Find it.
26527      IFS_save="$IFS"
26528      IFS=:
26529      for p in $PATH; do
26530        if test -f "$p/$path" && test -x "$p/$path"; then
26531          new_path="$p/$path"
26532          break
26533        fi
26534      done
26535      IFS="$IFS_save"
26536    else
26537      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26538$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26539      new_path="$path"
26540    fi
26541
26542    if test "x$new_path" = x; then
26543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26544$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26545      has_space=`$ECHO "$complete" | $GREP " "`
26546      if test "x$has_space" != x; then
26547        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26549      fi
26550      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26551    fi
26552  fi
26553
26554  # Now join together the path and the arguments once again
26555  if test "x$arguments" != xEOL; then
26556    new_complete="$new_path ${arguments% *}"
26557  else
26558    new_complete="$new_path"
26559  fi
26560
26561  if test "x$complete" != "x$new_complete"; then
26562    STRIP="$new_complete"
26563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26564$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26565  fi
26566
26567    # Extract the first word of "mcs", so it can be a program name with args.
26568set dummy mcs; ac_word=$2
26569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26570$as_echo_n "checking for $ac_word... " >&6; }
26571if ${ac_cv_path_MCS+:} false; then :
26572  $as_echo_n "(cached) " >&6
26573else
26574  case $MCS in
26575  [\\/]* | ?:[\\/]*)
26576  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26577  ;;
26578  *)
26579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26580for as_dir in $PATH
26581do
26582  IFS=$as_save_IFS
26583  test -z "$as_dir" && as_dir=.
26584    for ac_exec_ext in '' $ac_executable_extensions; do
26585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26586    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26588    break 2
26589  fi
26590done
26591  done
26592IFS=$as_save_IFS
26593
26594  ;;
26595esac
26596fi
26597MCS=$ac_cv_path_MCS
26598if test -n "$MCS"; then
26599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26600$as_echo "$MCS" >&6; }
26601else
26602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26603$as_echo "no" >&6; }
26604fi
26605
26606
26607
26608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26609
26610  # First separate the path from the arguments. This will split at the first
26611  # space.
26612  complete="$MCS"
26613  path="${complete%% *}"
26614  tmp="$complete EOL"
26615  arguments="${tmp#* }"
26616
26617  # Input might be given as Windows format, start by converting to
26618  # unix format.
26619  new_path=`$CYGPATH -u "$path"`
26620
26621  # Now try to locate executable using which
26622  new_path=`$WHICH "$new_path" 2> /dev/null`
26623  # bat and cmd files are not always considered executable in cygwin causing which
26624  # to not find them
26625  if test "x$new_path" = x \
26626      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26627      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26628    new_path=`$CYGPATH -u "$path"`
26629  fi
26630  if test "x$new_path" = x; then
26631    # Oops. Which didn't find the executable.
26632    # The splitting of arguments from the executable at a space might have been incorrect,
26633    # since paths with space are more likely in Windows. Give it another try with the whole
26634    # argument.
26635    path="$complete"
26636    arguments="EOL"
26637    new_path=`$CYGPATH -u "$path"`
26638    new_path=`$WHICH "$new_path" 2> /dev/null`
26639    # bat and cmd files are not always considered executable in cygwin causing which
26640    # to not find them
26641    if test "x$new_path" = x \
26642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26644      new_path=`$CYGPATH -u "$path"`
26645    fi
26646    if test "x$new_path" = x; then
26647      # It's still not found. Now this is an unrecoverable error.
26648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26649$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26650      has_space=`$ECHO "$complete" | $GREP " "`
26651      if test "x$has_space" != x; then
26652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26654      fi
26655      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26656    fi
26657  fi
26658
26659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26662  # "foo.exe" is OK but "foo" is an error.
26663  #
26664  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26665  # It is also a way to make sure we got the proper file name for the real test later on.
26666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26667  if test "x$test_shortpath" = x; then
26668    # Short path failed, file does not exist as specified.
26669    # Try adding .exe or .cmd
26670    if test -f "${new_path}.exe"; then
26671      input_to_shortpath="${new_path}.exe"
26672    elif test -f "${new_path}.cmd"; then
26673      input_to_shortpath="${new_path}.cmd"
26674    else
26675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26676$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26679      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26680    fi
26681  else
26682    input_to_shortpath="$new_path"
26683  fi
26684
26685  # Call helper function which possibly converts this using DOS-style short mode.
26686  # If so, the updated path is stored in $new_path.
26687  new_path="$input_to_shortpath"
26688
26689  input_path="$input_to_shortpath"
26690  # Check if we need to convert this using DOS-style short mode. If the path
26691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26692  # take no chances and rewrite it.
26693  # Note: m4 eats our [], so we need to use [ and ] instead.
26694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26695  if test "x$has_forbidden_chars" != x; then
26696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26700      # Going to short mode and back again did indeed matter. Since short mode is
26701      # case insensitive, let's make it lowercase to improve readability.
26702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26703      # Now convert it back to Unix-stile (cygpath)
26704      input_path=`$CYGPATH -u "$shortmode_path"`
26705      new_path="$input_path"
26706    fi
26707  fi
26708
26709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26710  if test "x$test_cygdrive_prefix" = x; then
26711    # As a simple fix, exclude /usr/bin since it's not a real path.
26712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26714      # a path prefixed by /cygdrive for fixpath to work.
26715      new_path="$CYGWIN_ROOT_PATH$input_path"
26716    fi
26717  fi
26718
26719  # remove trailing .exe if any
26720  new_path="${new_path/%.exe/}"
26721
26722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26723
26724  # First separate the path from the arguments. This will split at the first
26725  # space.
26726  complete="$MCS"
26727  path="${complete%% *}"
26728  tmp="$complete EOL"
26729  arguments="${tmp#* }"
26730
26731  # Input might be given as Windows format, start by converting to
26732  # unix format.
26733  new_path="$path"
26734
26735  windows_path="$new_path"
26736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26737    unix_path=`$CYGPATH -u "$windows_path"`
26738    new_path="$unix_path"
26739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26741    new_path="$unix_path"
26742  fi
26743
26744
26745  # Now try to locate executable using which
26746  new_path=`$WHICH "$new_path" 2> /dev/null`
26747
26748  if test "x$new_path" = x; then
26749    # Oops. Which didn't find the executable.
26750    # The splitting of arguments from the executable at a space might have been incorrect,
26751    # since paths with space are more likely in Windows. Give it another try with the whole
26752    # argument.
26753    path="$complete"
26754    arguments="EOL"
26755    new_path="$path"
26756
26757  windows_path="$new_path"
26758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26759    unix_path=`$CYGPATH -u "$windows_path"`
26760    new_path="$unix_path"
26761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26763    new_path="$unix_path"
26764  fi
26765
26766
26767    new_path=`$WHICH "$new_path" 2> /dev/null`
26768
26769    if test "x$new_path" = x; then
26770      # It's still not found. Now this is an unrecoverable error.
26771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26772$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26773      has_space=`$ECHO "$complete" | $GREP " "`
26774      if test "x$has_space" != x; then
26775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26777      fi
26778      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26779    fi
26780  fi
26781
26782  # Now new_path has a complete unix path to the binary
26783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26784    # Keep paths in /bin as-is, but remove trailing .exe if any
26785    new_path="${new_path/%.exe/}"
26786    # Do not save /bin paths to all_fixpath_prefixes!
26787  else
26788    # Not in mixed or Windows style, start by that.
26789    new_path=`cmd //c echo $new_path`
26790
26791  input_path="$new_path"
26792  # Check if we need to convert this using DOS-style short mode. If the path
26793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26794  # take no chances and rewrite it.
26795  # Note: m4 eats our [], so we need to use [ and ] instead.
26796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26797  if test "x$has_forbidden_chars" != x; then
26798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26800  fi
26801
26802    # Output is in $new_path
26803
26804  windows_path="$new_path"
26805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26806    unix_path=`$CYGPATH -u "$windows_path"`
26807    new_path="$unix_path"
26808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26810    new_path="$unix_path"
26811  fi
26812
26813    # remove trailing .exe if any
26814    new_path="${new_path/%.exe/}"
26815
26816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26818  fi
26819
26820  else
26821    # We're on a posix platform. Hooray! :)
26822    # First separate the path from the arguments. This will split at the first
26823    # space.
26824    complete="$MCS"
26825    path="${complete%% *}"
26826    tmp="$complete EOL"
26827    arguments="${tmp#* }"
26828
26829    # Cannot rely on the command "which" here since it doesn't always work.
26830    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26831    if test -z "$is_absolute_path"; then
26832      # Path to executable is not absolute. Find it.
26833      IFS_save="$IFS"
26834      IFS=:
26835      for p in $PATH; do
26836        if test -f "$p/$path" && test -x "$p/$path"; then
26837          new_path="$p/$path"
26838          break
26839        fi
26840      done
26841      IFS="$IFS_save"
26842    else
26843      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26844$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26845      new_path="$path"
26846    fi
26847
26848    if test "x$new_path" = x; then
26849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26850$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26851      has_space=`$ECHO "$complete" | $GREP " "`
26852      if test "x$has_space" != x; then
26853        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26855      fi
26856      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26857    fi
26858  fi
26859
26860  # Now join together the path and the arguments once again
26861  if test "x$arguments" != xEOL; then
26862    new_complete="$new_path ${arguments% *}"
26863  else
26864    new_complete="$new_path"
26865  fi
26866
26867  if test "x$complete" != "x$new_complete"; then
26868    MCS="$new_complete"
26869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26870$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26871  fi
26872
26873  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26874    if test -n "$ac_tool_prefix"; then
26875  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26876set dummy ${ac_tool_prefix}nm; ac_word=$2
26877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26878$as_echo_n "checking for $ac_word... " >&6; }
26879if ${ac_cv_prog_NM+:} false; then :
26880  $as_echo_n "(cached) " >&6
26881else
26882  if test -n "$NM"; then
26883  ac_cv_prog_NM="$NM" # Let the user override the test.
26884else
26885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26886for as_dir in $PATH
26887do
26888  IFS=$as_save_IFS
26889  test -z "$as_dir" && as_dir=.
26890    for ac_exec_ext in '' $ac_executable_extensions; do
26891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26892    ac_cv_prog_NM="${ac_tool_prefix}nm"
26893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26894    break 2
26895  fi
26896done
26897  done
26898IFS=$as_save_IFS
26899
26900fi
26901fi
26902NM=$ac_cv_prog_NM
26903if test -n "$NM"; then
26904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26905$as_echo "$NM" >&6; }
26906else
26907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26908$as_echo "no" >&6; }
26909fi
26910
26911
26912fi
26913if test -z "$ac_cv_prog_NM"; then
26914  ac_ct_NM=$NM
26915  # Extract the first word of "nm", so it can be a program name with args.
26916set dummy nm; ac_word=$2
26917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26918$as_echo_n "checking for $ac_word... " >&6; }
26919if ${ac_cv_prog_ac_ct_NM+:} false; then :
26920  $as_echo_n "(cached) " >&6
26921else
26922  if test -n "$ac_ct_NM"; then
26923  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26924else
26925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26926for as_dir in $PATH
26927do
26928  IFS=$as_save_IFS
26929  test -z "$as_dir" && as_dir=.
26930    for ac_exec_ext in '' $ac_executable_extensions; do
26931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26932    ac_cv_prog_ac_ct_NM="nm"
26933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26934    break 2
26935  fi
26936done
26937  done
26938IFS=$as_save_IFS
26939
26940fi
26941fi
26942ac_ct_NM=$ac_cv_prog_ac_ct_NM
26943if test -n "$ac_ct_NM"; then
26944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26945$as_echo "$ac_ct_NM" >&6; }
26946else
26947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26948$as_echo "no" >&6; }
26949fi
26950
26951  if test "x$ac_ct_NM" = x; then
26952    NM=""
26953  else
26954    case $cross_compiling:$ac_tool_warned in
26955yes:)
26956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26958ac_tool_warned=yes ;;
26959esac
26960    NM=$ac_ct_NM
26961  fi
26962else
26963  NM="$ac_cv_prog_NM"
26964fi
26965
26966
26967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26968
26969  # First separate the path from the arguments. This will split at the first
26970  # space.
26971  complete="$NM"
26972  path="${complete%% *}"
26973  tmp="$complete EOL"
26974  arguments="${tmp#* }"
26975
26976  # Input might be given as Windows format, start by converting to
26977  # unix format.
26978  new_path=`$CYGPATH -u "$path"`
26979
26980  # Now try to locate executable using which
26981  new_path=`$WHICH "$new_path" 2> /dev/null`
26982  # bat and cmd files are not always considered executable in cygwin causing which
26983  # to not find them
26984  if test "x$new_path" = x \
26985      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26986      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26987    new_path=`$CYGPATH -u "$path"`
26988  fi
26989  if test "x$new_path" = x; then
26990    # Oops. Which didn't find the executable.
26991    # The splitting of arguments from the executable at a space might have been incorrect,
26992    # since paths with space are more likely in Windows. Give it another try with the whole
26993    # argument.
26994    path="$complete"
26995    arguments="EOL"
26996    new_path=`$CYGPATH -u "$path"`
26997    new_path=`$WHICH "$new_path" 2> /dev/null`
26998    # bat and cmd files are not always considered executable in cygwin causing which
26999    # to not find them
27000    if test "x$new_path" = x \
27001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27003      new_path=`$CYGPATH -u "$path"`
27004    fi
27005    if test "x$new_path" = x; then
27006      # It's still not found. Now this is an unrecoverable error.
27007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27008$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27009      has_space=`$ECHO "$complete" | $GREP " "`
27010      if test "x$has_space" != x; then
27011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27013      fi
27014      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27015    fi
27016  fi
27017
27018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27021  # "foo.exe" is OK but "foo" is an error.
27022  #
27023  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27024  # It is also a way to make sure we got the proper file name for the real test later on.
27025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27026  if test "x$test_shortpath" = x; then
27027    # Short path failed, file does not exist as specified.
27028    # Try adding .exe or .cmd
27029    if test -f "${new_path}.exe"; then
27030      input_to_shortpath="${new_path}.exe"
27031    elif test -f "${new_path}.cmd"; then
27032      input_to_shortpath="${new_path}.cmd"
27033    else
27034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27035$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27038      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27039    fi
27040  else
27041    input_to_shortpath="$new_path"
27042  fi
27043
27044  # Call helper function which possibly converts this using DOS-style short mode.
27045  # If so, the updated path is stored in $new_path.
27046  new_path="$input_to_shortpath"
27047
27048  input_path="$input_to_shortpath"
27049  # Check if we need to convert this using DOS-style short mode. If the path
27050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27051  # take no chances and rewrite it.
27052  # Note: m4 eats our [], so we need to use [ and ] instead.
27053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27054  if test "x$has_forbidden_chars" != x; then
27055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27059      # Going to short mode and back again did indeed matter. Since short mode is
27060      # case insensitive, let's make it lowercase to improve readability.
27061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27062      # Now convert it back to Unix-stile (cygpath)
27063      input_path=`$CYGPATH -u "$shortmode_path"`
27064      new_path="$input_path"
27065    fi
27066  fi
27067
27068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27069  if test "x$test_cygdrive_prefix" = x; then
27070    # As a simple fix, exclude /usr/bin since it's not a real path.
27071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27073      # a path prefixed by /cygdrive for fixpath to work.
27074      new_path="$CYGWIN_ROOT_PATH$input_path"
27075    fi
27076  fi
27077
27078  # remove trailing .exe if any
27079  new_path="${new_path/%.exe/}"
27080
27081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27082
27083  # First separate the path from the arguments. This will split at the first
27084  # space.
27085  complete="$NM"
27086  path="${complete%% *}"
27087  tmp="$complete EOL"
27088  arguments="${tmp#* }"
27089
27090  # Input might be given as Windows format, start by converting to
27091  # unix format.
27092  new_path="$path"
27093
27094  windows_path="$new_path"
27095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27096    unix_path=`$CYGPATH -u "$windows_path"`
27097    new_path="$unix_path"
27098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27100    new_path="$unix_path"
27101  fi
27102
27103
27104  # Now try to locate executable using which
27105  new_path=`$WHICH "$new_path" 2> /dev/null`
27106
27107  if test "x$new_path" = x; then
27108    # Oops. Which didn't find the executable.
27109    # The splitting of arguments from the executable at a space might have been incorrect,
27110    # since paths with space are more likely in Windows. Give it another try with the whole
27111    # argument.
27112    path="$complete"
27113    arguments="EOL"
27114    new_path="$path"
27115
27116  windows_path="$new_path"
27117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27118    unix_path=`$CYGPATH -u "$windows_path"`
27119    new_path="$unix_path"
27120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27122    new_path="$unix_path"
27123  fi
27124
27125
27126    new_path=`$WHICH "$new_path" 2> /dev/null`
27127
27128    if test "x$new_path" = x; then
27129      # It's still not found. Now this is an unrecoverable error.
27130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27131$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27132      has_space=`$ECHO "$complete" | $GREP " "`
27133      if test "x$has_space" != x; then
27134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27136      fi
27137      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27138    fi
27139  fi
27140
27141  # Now new_path has a complete unix path to the binary
27142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27143    # Keep paths in /bin as-is, but remove trailing .exe if any
27144    new_path="${new_path/%.exe/}"
27145    # Do not save /bin paths to all_fixpath_prefixes!
27146  else
27147    # Not in mixed or Windows style, start by that.
27148    new_path=`cmd //c echo $new_path`
27149
27150  input_path="$new_path"
27151  # Check if we need to convert this using DOS-style short mode. If the path
27152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27153  # take no chances and rewrite it.
27154  # Note: m4 eats our [], so we need to use [ and ] instead.
27155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27156  if test "x$has_forbidden_chars" != x; then
27157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27159  fi
27160
27161    # Output is in $new_path
27162
27163  windows_path="$new_path"
27164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27165    unix_path=`$CYGPATH -u "$windows_path"`
27166    new_path="$unix_path"
27167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27169    new_path="$unix_path"
27170  fi
27171
27172    # remove trailing .exe if any
27173    new_path="${new_path/%.exe/}"
27174
27175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27177  fi
27178
27179  else
27180    # We're on a posix platform. Hooray! :)
27181    # First separate the path from the arguments. This will split at the first
27182    # space.
27183    complete="$NM"
27184    path="${complete%% *}"
27185    tmp="$complete EOL"
27186    arguments="${tmp#* }"
27187
27188    # Cannot rely on the command "which" here since it doesn't always work.
27189    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27190    if test -z "$is_absolute_path"; then
27191      # Path to executable is not absolute. Find it.
27192      IFS_save="$IFS"
27193      IFS=:
27194      for p in $PATH; do
27195        if test -f "$p/$path" && test -x "$p/$path"; then
27196          new_path="$p/$path"
27197          break
27198        fi
27199      done
27200      IFS="$IFS_save"
27201    else
27202      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27203$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27204      new_path="$path"
27205    fi
27206
27207    if test "x$new_path" = x; then
27208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27209$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27210      has_space=`$ECHO "$complete" | $GREP " "`
27211      if test "x$has_space" != x; then
27212        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27213$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27214      fi
27215      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27216    fi
27217  fi
27218
27219  # Now join together the path and the arguments once again
27220  if test "x$arguments" != xEOL; then
27221    new_complete="$new_path ${arguments% *}"
27222  else
27223    new_complete="$new_path"
27224  fi
27225
27226  if test "x$complete" != "x$new_complete"; then
27227    NM="$new_complete"
27228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27229$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27230  fi
27231
27232    GNM="$NM"
27233
27234    if test -n "$ac_tool_prefix"; then
27235  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27236set dummy ${ac_tool_prefix}strip; ac_word=$2
27237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27238$as_echo_n "checking for $ac_word... " >&6; }
27239if ${ac_cv_prog_STRIP+:} false; then :
27240  $as_echo_n "(cached) " >&6
27241else
27242  if test -n "$STRIP"; then
27243  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27244else
27245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27246for as_dir in $PATH
27247do
27248  IFS=$as_save_IFS
27249  test -z "$as_dir" && as_dir=.
27250    for ac_exec_ext in '' $ac_executable_extensions; do
27251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27252    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27254    break 2
27255  fi
27256done
27257  done
27258IFS=$as_save_IFS
27259
27260fi
27261fi
27262STRIP=$ac_cv_prog_STRIP
27263if test -n "$STRIP"; then
27264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27265$as_echo "$STRIP" >&6; }
27266else
27267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27268$as_echo "no" >&6; }
27269fi
27270
27271
27272fi
27273if test -z "$ac_cv_prog_STRIP"; then
27274  ac_ct_STRIP=$STRIP
27275  # Extract the first word of "strip", so it can be a program name with args.
27276set dummy strip; ac_word=$2
27277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27278$as_echo_n "checking for $ac_word... " >&6; }
27279if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27280  $as_echo_n "(cached) " >&6
27281else
27282  if test -n "$ac_ct_STRIP"; then
27283  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27284else
27285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27286for as_dir in $PATH
27287do
27288  IFS=$as_save_IFS
27289  test -z "$as_dir" && as_dir=.
27290    for ac_exec_ext in '' $ac_executable_extensions; do
27291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27292    ac_cv_prog_ac_ct_STRIP="strip"
27293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27294    break 2
27295  fi
27296done
27297  done
27298IFS=$as_save_IFS
27299
27300fi
27301fi
27302ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27303if test -n "$ac_ct_STRIP"; then
27304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27305$as_echo "$ac_ct_STRIP" >&6; }
27306else
27307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27308$as_echo "no" >&6; }
27309fi
27310
27311  if test "x$ac_ct_STRIP" = x; then
27312    STRIP=""
27313  else
27314    case $cross_compiling:$ac_tool_warned in
27315yes:)
27316{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27317$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27318ac_tool_warned=yes ;;
27319esac
27320    STRIP=$ac_ct_STRIP
27321  fi
27322else
27323  STRIP="$ac_cv_prog_STRIP"
27324fi
27325
27326
27327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27328
27329  # First separate the path from the arguments. This will split at the first
27330  # space.
27331  complete="$STRIP"
27332  path="${complete%% *}"
27333  tmp="$complete EOL"
27334  arguments="${tmp#* }"
27335
27336  # Input might be given as Windows format, start by converting to
27337  # unix format.
27338  new_path=`$CYGPATH -u "$path"`
27339
27340  # Now try to locate executable using which
27341  new_path=`$WHICH "$new_path" 2> /dev/null`
27342  # bat and cmd files are not always considered executable in cygwin causing which
27343  # to not find them
27344  if test "x$new_path" = x \
27345      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27346      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27347    new_path=`$CYGPATH -u "$path"`
27348  fi
27349  if test "x$new_path" = x; then
27350    # Oops. Which didn't find the executable.
27351    # The splitting of arguments from the executable at a space might have been incorrect,
27352    # since paths with space are more likely in Windows. Give it another try with the whole
27353    # argument.
27354    path="$complete"
27355    arguments="EOL"
27356    new_path=`$CYGPATH -u "$path"`
27357    new_path=`$WHICH "$new_path" 2> /dev/null`
27358    # bat and cmd files are not always considered executable in cygwin causing which
27359    # to not find them
27360    if test "x$new_path" = x \
27361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27363      new_path=`$CYGPATH -u "$path"`
27364    fi
27365    if test "x$new_path" = x; then
27366      # It's still not found. Now this is an unrecoverable error.
27367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27368$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27369      has_space=`$ECHO "$complete" | $GREP " "`
27370      if test "x$has_space" != x; then
27371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27373      fi
27374      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27375    fi
27376  fi
27377
27378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27381  # "foo.exe" is OK but "foo" is an error.
27382  #
27383  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27384  # It is also a way to make sure we got the proper file name for the real test later on.
27385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27386  if test "x$test_shortpath" = x; then
27387    # Short path failed, file does not exist as specified.
27388    # Try adding .exe or .cmd
27389    if test -f "${new_path}.exe"; then
27390      input_to_shortpath="${new_path}.exe"
27391    elif test -f "${new_path}.cmd"; then
27392      input_to_shortpath="${new_path}.cmd"
27393    else
27394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27395$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27398      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27399    fi
27400  else
27401    input_to_shortpath="$new_path"
27402  fi
27403
27404  # Call helper function which possibly converts this using DOS-style short mode.
27405  # If so, the updated path is stored in $new_path.
27406  new_path="$input_to_shortpath"
27407
27408  input_path="$input_to_shortpath"
27409  # Check if we need to convert this using DOS-style short mode. If the path
27410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27411  # take no chances and rewrite it.
27412  # Note: m4 eats our [], so we need to use [ and ] instead.
27413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27414  if test "x$has_forbidden_chars" != x; then
27415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27419      # Going to short mode and back again did indeed matter. Since short mode is
27420      # case insensitive, let's make it lowercase to improve readability.
27421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27422      # Now convert it back to Unix-stile (cygpath)
27423      input_path=`$CYGPATH -u "$shortmode_path"`
27424      new_path="$input_path"
27425    fi
27426  fi
27427
27428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27429  if test "x$test_cygdrive_prefix" = x; then
27430    # As a simple fix, exclude /usr/bin since it's not a real path.
27431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27433      # a path prefixed by /cygdrive for fixpath to work.
27434      new_path="$CYGWIN_ROOT_PATH$input_path"
27435    fi
27436  fi
27437
27438  # remove trailing .exe if any
27439  new_path="${new_path/%.exe/}"
27440
27441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27442
27443  # First separate the path from the arguments. This will split at the first
27444  # space.
27445  complete="$STRIP"
27446  path="${complete%% *}"
27447  tmp="$complete EOL"
27448  arguments="${tmp#* }"
27449
27450  # Input might be given as Windows format, start by converting to
27451  # unix format.
27452  new_path="$path"
27453
27454  windows_path="$new_path"
27455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27456    unix_path=`$CYGPATH -u "$windows_path"`
27457    new_path="$unix_path"
27458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27460    new_path="$unix_path"
27461  fi
27462
27463
27464  # Now try to locate executable using which
27465  new_path=`$WHICH "$new_path" 2> /dev/null`
27466
27467  if test "x$new_path" = x; then
27468    # Oops. Which didn't find the executable.
27469    # The splitting of arguments from the executable at a space might have been incorrect,
27470    # since paths with space are more likely in Windows. Give it another try with the whole
27471    # argument.
27472    path="$complete"
27473    arguments="EOL"
27474    new_path="$path"
27475
27476  windows_path="$new_path"
27477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27478    unix_path=`$CYGPATH -u "$windows_path"`
27479    new_path="$unix_path"
27480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27482    new_path="$unix_path"
27483  fi
27484
27485
27486    new_path=`$WHICH "$new_path" 2> /dev/null`
27487
27488    if test "x$new_path" = x; then
27489      # It's still not found. Now this is an unrecoverable error.
27490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27491$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27492      has_space=`$ECHO "$complete" | $GREP " "`
27493      if test "x$has_space" != x; then
27494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27496      fi
27497      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27498    fi
27499  fi
27500
27501  # Now new_path has a complete unix path to the binary
27502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27503    # Keep paths in /bin as-is, but remove trailing .exe if any
27504    new_path="${new_path/%.exe/}"
27505    # Do not save /bin paths to all_fixpath_prefixes!
27506  else
27507    # Not in mixed or Windows style, start by that.
27508    new_path=`cmd //c echo $new_path`
27509
27510  input_path="$new_path"
27511  # Check if we need to convert this using DOS-style short mode. If the path
27512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27513  # take no chances and rewrite it.
27514  # Note: m4 eats our [], so we need to use [ and ] instead.
27515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27516  if test "x$has_forbidden_chars" != x; then
27517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27519  fi
27520
27521    # Output is in $new_path
27522
27523  windows_path="$new_path"
27524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27525    unix_path=`$CYGPATH -u "$windows_path"`
27526    new_path="$unix_path"
27527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27529    new_path="$unix_path"
27530  fi
27531
27532    # remove trailing .exe if any
27533    new_path="${new_path/%.exe/}"
27534
27535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27537  fi
27538
27539  else
27540    # We're on a posix platform. Hooray! :)
27541    # First separate the path from the arguments. This will split at the first
27542    # space.
27543    complete="$STRIP"
27544    path="${complete%% *}"
27545    tmp="$complete EOL"
27546    arguments="${tmp#* }"
27547
27548    # Cannot rely on the command "which" here since it doesn't always work.
27549    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27550    if test -z "$is_absolute_path"; then
27551      # Path to executable is not absolute. Find it.
27552      IFS_save="$IFS"
27553      IFS=:
27554      for p in $PATH; do
27555        if test -f "$p/$path" && test -x "$p/$path"; then
27556          new_path="$p/$path"
27557          break
27558        fi
27559      done
27560      IFS="$IFS_save"
27561    else
27562      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27563$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27564      new_path="$path"
27565    fi
27566
27567    if test "x$new_path" = x; then
27568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27569$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27570      has_space=`$ECHO "$complete" | $GREP " "`
27571      if test "x$has_space" != x; then
27572        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27574      fi
27575      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27576    fi
27577  fi
27578
27579  # Now join together the path and the arguments once again
27580  if test "x$arguments" != xEOL; then
27581    new_complete="$new_path ${arguments% *}"
27582  else
27583    new_complete="$new_path"
27584  fi
27585
27586  if test "x$complete" != "x$new_complete"; then
27587    STRIP="$new_complete"
27588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27589$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27590  fi
27591
27592  fi
27593
27594  # objcopy is used for moving debug symbols to separate files when
27595  # full debug symbols are enabled.
27596  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27597    if test -n "$ac_tool_prefix"; then
27598  for ac_prog in gobjcopy objcopy
27599  do
27600    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27601set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27603$as_echo_n "checking for $ac_word... " >&6; }
27604if ${ac_cv_prog_OBJCOPY+:} false; then :
27605  $as_echo_n "(cached) " >&6
27606else
27607  if test -n "$OBJCOPY"; then
27608  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27609else
27610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27611for as_dir in $PATH
27612do
27613  IFS=$as_save_IFS
27614  test -z "$as_dir" && as_dir=.
27615    for ac_exec_ext in '' $ac_executable_extensions; do
27616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27617    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27619    break 2
27620  fi
27621done
27622  done
27623IFS=$as_save_IFS
27624
27625fi
27626fi
27627OBJCOPY=$ac_cv_prog_OBJCOPY
27628if test -n "$OBJCOPY"; then
27629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27630$as_echo "$OBJCOPY" >&6; }
27631else
27632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27633$as_echo "no" >&6; }
27634fi
27635
27636
27637    test -n "$OBJCOPY" && break
27638  done
27639fi
27640if test -z "$OBJCOPY"; then
27641  ac_ct_OBJCOPY=$OBJCOPY
27642  for ac_prog in gobjcopy objcopy
27643do
27644  # Extract the first word of "$ac_prog", so it can be a program name with args.
27645set dummy $ac_prog; ac_word=$2
27646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27647$as_echo_n "checking for $ac_word... " >&6; }
27648if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27649  $as_echo_n "(cached) " >&6
27650else
27651  if test -n "$ac_ct_OBJCOPY"; then
27652  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27653else
27654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27655for as_dir in $PATH
27656do
27657  IFS=$as_save_IFS
27658  test -z "$as_dir" && as_dir=.
27659    for ac_exec_ext in '' $ac_executable_extensions; do
27660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27661    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27663    break 2
27664  fi
27665done
27666  done
27667IFS=$as_save_IFS
27668
27669fi
27670fi
27671ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27672if test -n "$ac_ct_OBJCOPY"; then
27673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27674$as_echo "$ac_ct_OBJCOPY" >&6; }
27675else
27676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27677$as_echo "no" >&6; }
27678fi
27679
27680
27681  test -n "$ac_ct_OBJCOPY" && break
27682done
27683
27684  if test "x$ac_ct_OBJCOPY" = x; then
27685    OBJCOPY=""
27686  else
27687    case $cross_compiling:$ac_tool_warned in
27688yes:)
27689{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27691ac_tool_warned=yes ;;
27692esac
27693    OBJCOPY=$ac_ct_OBJCOPY
27694  fi
27695fi
27696
27697    # Only call fixup if objcopy was found.
27698    if test -n "$OBJCOPY"; then
27699
27700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27701
27702  # First separate the path from the arguments. This will split at the first
27703  # space.
27704  complete="$OBJCOPY"
27705  path="${complete%% *}"
27706  tmp="$complete EOL"
27707  arguments="${tmp#* }"
27708
27709  # Input might be given as Windows format, start by converting to
27710  # unix format.
27711  new_path=`$CYGPATH -u "$path"`
27712
27713  # Now try to locate executable using which
27714  new_path=`$WHICH "$new_path" 2> /dev/null`
27715  # bat and cmd files are not always considered executable in cygwin causing which
27716  # to not find them
27717  if test "x$new_path" = x \
27718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27720    new_path=`$CYGPATH -u "$path"`
27721  fi
27722  if test "x$new_path" = x; then
27723    # Oops. Which didn't find the executable.
27724    # The splitting of arguments from the executable at a space might have been incorrect,
27725    # since paths with space are more likely in Windows. Give it another try with the whole
27726    # argument.
27727    path="$complete"
27728    arguments="EOL"
27729    new_path=`$CYGPATH -u "$path"`
27730    new_path=`$WHICH "$new_path" 2> /dev/null`
27731    # bat and cmd files are not always considered executable in cygwin causing which
27732    # to not find them
27733    if test "x$new_path" = x \
27734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27736      new_path=`$CYGPATH -u "$path"`
27737    fi
27738    if test "x$new_path" = x; then
27739      # It's still not found. Now this is an unrecoverable error.
27740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27741$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27742      has_space=`$ECHO "$complete" | $GREP " "`
27743      if test "x$has_space" != x; then
27744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27746      fi
27747      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27748    fi
27749  fi
27750
27751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27754  # "foo.exe" is OK but "foo" is an error.
27755  #
27756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27757  # It is also a way to make sure we got the proper file name for the real test later on.
27758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27759  if test "x$test_shortpath" = x; then
27760    # Short path failed, file does not exist as specified.
27761    # Try adding .exe or .cmd
27762    if test -f "${new_path}.exe"; then
27763      input_to_shortpath="${new_path}.exe"
27764    elif test -f "${new_path}.cmd"; then
27765      input_to_shortpath="${new_path}.cmd"
27766    else
27767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27768$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27771      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27772    fi
27773  else
27774    input_to_shortpath="$new_path"
27775  fi
27776
27777  # Call helper function which possibly converts this using DOS-style short mode.
27778  # If so, the updated path is stored in $new_path.
27779  new_path="$input_to_shortpath"
27780
27781  input_path="$input_to_shortpath"
27782  # Check if we need to convert this using DOS-style short mode. If the path
27783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27784  # take no chances and rewrite it.
27785  # Note: m4 eats our [], so we need to use [ and ] instead.
27786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27787  if test "x$has_forbidden_chars" != x; then
27788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27792      # Going to short mode and back again did indeed matter. Since short mode is
27793      # case insensitive, let's make it lowercase to improve readability.
27794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27795      # Now convert it back to Unix-stile (cygpath)
27796      input_path=`$CYGPATH -u "$shortmode_path"`
27797      new_path="$input_path"
27798    fi
27799  fi
27800
27801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27802  if test "x$test_cygdrive_prefix" = x; then
27803    # As a simple fix, exclude /usr/bin since it's not a real path.
27804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27806      # a path prefixed by /cygdrive for fixpath to work.
27807      new_path="$CYGWIN_ROOT_PATH$input_path"
27808    fi
27809  fi
27810
27811  # remove trailing .exe if any
27812  new_path="${new_path/%.exe/}"
27813
27814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27815
27816  # First separate the path from the arguments. This will split at the first
27817  # space.
27818  complete="$OBJCOPY"
27819  path="${complete%% *}"
27820  tmp="$complete EOL"
27821  arguments="${tmp#* }"
27822
27823  # Input might be given as Windows format, start by converting to
27824  # unix format.
27825  new_path="$path"
27826
27827  windows_path="$new_path"
27828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27829    unix_path=`$CYGPATH -u "$windows_path"`
27830    new_path="$unix_path"
27831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27833    new_path="$unix_path"
27834  fi
27835
27836
27837  # Now try to locate executable using which
27838  new_path=`$WHICH "$new_path" 2> /dev/null`
27839
27840  if test "x$new_path" = x; then
27841    # Oops. Which didn't find the executable.
27842    # The splitting of arguments from the executable at a space might have been incorrect,
27843    # since paths with space are more likely in Windows. Give it another try with the whole
27844    # argument.
27845    path="$complete"
27846    arguments="EOL"
27847    new_path="$path"
27848
27849  windows_path="$new_path"
27850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27851    unix_path=`$CYGPATH -u "$windows_path"`
27852    new_path="$unix_path"
27853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27855    new_path="$unix_path"
27856  fi
27857
27858
27859    new_path=`$WHICH "$new_path" 2> /dev/null`
27860
27861    if test "x$new_path" = x; then
27862      # It's still not found. Now this is an unrecoverable error.
27863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27864$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27865      has_space=`$ECHO "$complete" | $GREP " "`
27866      if test "x$has_space" != x; then
27867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27869      fi
27870      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27871    fi
27872  fi
27873
27874  # Now new_path has a complete unix path to the binary
27875  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27876    # Keep paths in /bin as-is, but remove trailing .exe if any
27877    new_path="${new_path/%.exe/}"
27878    # Do not save /bin paths to all_fixpath_prefixes!
27879  else
27880    # Not in mixed or Windows style, start by that.
27881    new_path=`cmd //c echo $new_path`
27882
27883  input_path="$new_path"
27884  # Check if we need to convert this using DOS-style short mode. If the path
27885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27886  # take no chances and rewrite it.
27887  # Note: m4 eats our [], so we need to use [ and ] instead.
27888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27889  if test "x$has_forbidden_chars" != x; then
27890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27892  fi
27893
27894    # Output is in $new_path
27895
27896  windows_path="$new_path"
27897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27898    unix_path=`$CYGPATH -u "$windows_path"`
27899    new_path="$unix_path"
27900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27902    new_path="$unix_path"
27903  fi
27904
27905    # remove trailing .exe if any
27906    new_path="${new_path/%.exe/}"
27907
27908    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27909    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27910  fi
27911
27912  else
27913    # We're on a posix platform. Hooray! :)
27914    # First separate the path from the arguments. This will split at the first
27915    # space.
27916    complete="$OBJCOPY"
27917    path="${complete%% *}"
27918    tmp="$complete EOL"
27919    arguments="${tmp#* }"
27920
27921    # Cannot rely on the command "which" here since it doesn't always work.
27922    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27923    if test -z "$is_absolute_path"; then
27924      # Path to executable is not absolute. Find it.
27925      IFS_save="$IFS"
27926      IFS=:
27927      for p in $PATH; do
27928        if test -f "$p/$path" && test -x "$p/$path"; then
27929          new_path="$p/$path"
27930          break
27931        fi
27932      done
27933      IFS="$IFS_save"
27934    else
27935      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27936$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27937      new_path="$path"
27938    fi
27939
27940    if test "x$new_path" = x; then
27941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27942$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27943      has_space=`$ECHO "$complete" | $GREP " "`
27944      if test "x$has_space" != x; then
27945        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27947      fi
27948      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27949    fi
27950  fi
27951
27952  # Now join together the path and the arguments once again
27953  if test "x$arguments" != xEOL; then
27954    new_complete="$new_path ${arguments% *}"
27955  else
27956    new_complete="$new_path"
27957  fi
27958
27959  if test "x$complete" != "x$new_complete"; then
27960    OBJCOPY="$new_complete"
27961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27962$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27963  fi
27964
27965    fi
27966  fi
27967
27968  if test -n "$ac_tool_prefix"; then
27969  for ac_prog in gobjdump objdump
27970  do
27971    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27972set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27974$as_echo_n "checking for $ac_word... " >&6; }
27975if ${ac_cv_prog_OBJDUMP+:} false; then :
27976  $as_echo_n "(cached) " >&6
27977else
27978  if test -n "$OBJDUMP"; then
27979  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27980else
27981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27982for as_dir in $PATH
27983do
27984  IFS=$as_save_IFS
27985  test -z "$as_dir" && as_dir=.
27986    for ac_exec_ext in '' $ac_executable_extensions; do
27987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27988    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27990    break 2
27991  fi
27992done
27993  done
27994IFS=$as_save_IFS
27995
27996fi
27997fi
27998OBJDUMP=$ac_cv_prog_OBJDUMP
27999if test -n "$OBJDUMP"; then
28000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28001$as_echo "$OBJDUMP" >&6; }
28002else
28003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28004$as_echo "no" >&6; }
28005fi
28006
28007
28008    test -n "$OBJDUMP" && break
28009  done
28010fi
28011if test -z "$OBJDUMP"; then
28012  ac_ct_OBJDUMP=$OBJDUMP
28013  for ac_prog in gobjdump objdump
28014do
28015  # Extract the first word of "$ac_prog", so it can be a program name with args.
28016set dummy $ac_prog; ac_word=$2
28017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28018$as_echo_n "checking for $ac_word... " >&6; }
28019if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28020  $as_echo_n "(cached) " >&6
28021else
28022  if test -n "$ac_ct_OBJDUMP"; then
28023  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28024else
28025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28026for as_dir in $PATH
28027do
28028  IFS=$as_save_IFS
28029  test -z "$as_dir" && as_dir=.
28030    for ac_exec_ext in '' $ac_executable_extensions; do
28031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28032    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28034    break 2
28035  fi
28036done
28037  done
28038IFS=$as_save_IFS
28039
28040fi
28041fi
28042ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28043if test -n "$ac_ct_OBJDUMP"; then
28044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28045$as_echo "$ac_ct_OBJDUMP" >&6; }
28046else
28047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28048$as_echo "no" >&6; }
28049fi
28050
28051
28052  test -n "$ac_ct_OBJDUMP" && break
28053done
28054
28055  if test "x$ac_ct_OBJDUMP" = x; then
28056    OBJDUMP=""
28057  else
28058    case $cross_compiling:$ac_tool_warned in
28059yes:)
28060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28062ac_tool_warned=yes ;;
28063esac
28064    OBJDUMP=$ac_ct_OBJDUMP
28065  fi
28066fi
28067
28068  if test "x$OBJDUMP" != x; then
28069    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28070
28071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28072
28073  # First separate the path from the arguments. This will split at the first
28074  # space.
28075  complete="$OBJDUMP"
28076  path="${complete%% *}"
28077  tmp="$complete EOL"
28078  arguments="${tmp#* }"
28079
28080  # Input might be given as Windows format, start by converting to
28081  # unix format.
28082  new_path=`$CYGPATH -u "$path"`
28083
28084  # Now try to locate executable using which
28085  new_path=`$WHICH "$new_path" 2> /dev/null`
28086  # bat and cmd files are not always considered executable in cygwin causing which
28087  # to not find them
28088  if test "x$new_path" = x \
28089      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28090      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28091    new_path=`$CYGPATH -u "$path"`
28092  fi
28093  if test "x$new_path" = x; then
28094    # Oops. Which didn't find the executable.
28095    # The splitting of arguments from the executable at a space might have been incorrect,
28096    # since paths with space are more likely in Windows. Give it another try with the whole
28097    # argument.
28098    path="$complete"
28099    arguments="EOL"
28100    new_path=`$CYGPATH -u "$path"`
28101    new_path=`$WHICH "$new_path" 2> /dev/null`
28102    # bat and cmd files are not always considered executable in cygwin causing which
28103    # to not find them
28104    if test "x$new_path" = x \
28105        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28106        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28107      new_path=`$CYGPATH -u "$path"`
28108    fi
28109    if test "x$new_path" = x; then
28110      # It's still not found. Now this is an unrecoverable error.
28111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28112$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28113      has_space=`$ECHO "$complete" | $GREP " "`
28114      if test "x$has_space" != x; then
28115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28117      fi
28118      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28119    fi
28120  fi
28121
28122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28125  # "foo.exe" is OK but "foo" is an error.
28126  #
28127  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28128  # It is also a way to make sure we got the proper file name for the real test later on.
28129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28130  if test "x$test_shortpath" = x; then
28131    # Short path failed, file does not exist as specified.
28132    # Try adding .exe or .cmd
28133    if test -f "${new_path}.exe"; then
28134      input_to_shortpath="${new_path}.exe"
28135    elif test -f "${new_path}.cmd"; then
28136      input_to_shortpath="${new_path}.cmd"
28137    else
28138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28139$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28140      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28141$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28142      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28143    fi
28144  else
28145    input_to_shortpath="$new_path"
28146  fi
28147
28148  # Call helper function which possibly converts this using DOS-style short mode.
28149  # If so, the updated path is stored in $new_path.
28150  new_path="$input_to_shortpath"
28151
28152  input_path="$input_to_shortpath"
28153  # Check if we need to convert this using DOS-style short mode. If the path
28154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28155  # take no chances and rewrite it.
28156  # Note: m4 eats our [], so we need to use [ and ] instead.
28157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28158  if test "x$has_forbidden_chars" != x; then
28159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28163      # Going to short mode and back again did indeed matter. Since short mode is
28164      # case insensitive, let's make it lowercase to improve readability.
28165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28166      # Now convert it back to Unix-stile (cygpath)
28167      input_path=`$CYGPATH -u "$shortmode_path"`
28168      new_path="$input_path"
28169    fi
28170  fi
28171
28172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28173  if test "x$test_cygdrive_prefix" = x; then
28174    # As a simple fix, exclude /usr/bin since it's not a real path.
28175    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28177      # a path prefixed by /cygdrive for fixpath to work.
28178      new_path="$CYGWIN_ROOT_PATH$input_path"
28179    fi
28180  fi
28181
28182  # remove trailing .exe if any
28183  new_path="${new_path/%.exe/}"
28184
28185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28186
28187  # First separate the path from the arguments. This will split at the first
28188  # space.
28189  complete="$OBJDUMP"
28190  path="${complete%% *}"
28191  tmp="$complete EOL"
28192  arguments="${tmp#* }"
28193
28194  # Input might be given as Windows format, start by converting to
28195  # unix format.
28196  new_path="$path"
28197
28198  windows_path="$new_path"
28199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28200    unix_path=`$CYGPATH -u "$windows_path"`
28201    new_path="$unix_path"
28202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28204    new_path="$unix_path"
28205  fi
28206
28207
28208  # Now try to locate executable using which
28209  new_path=`$WHICH "$new_path" 2> /dev/null`
28210
28211  if test "x$new_path" = x; then
28212    # Oops. Which didn't find the executable.
28213    # The splitting of arguments from the executable at a space might have been incorrect,
28214    # since paths with space are more likely in Windows. Give it another try with the whole
28215    # argument.
28216    path="$complete"
28217    arguments="EOL"
28218    new_path="$path"
28219
28220  windows_path="$new_path"
28221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28222    unix_path=`$CYGPATH -u "$windows_path"`
28223    new_path="$unix_path"
28224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28226    new_path="$unix_path"
28227  fi
28228
28229
28230    new_path=`$WHICH "$new_path" 2> /dev/null`
28231
28232    if test "x$new_path" = x; then
28233      # It's still not found. Now this is an unrecoverable error.
28234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28235$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28236      has_space=`$ECHO "$complete" | $GREP " "`
28237      if test "x$has_space" != x; then
28238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28240      fi
28241      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28242    fi
28243  fi
28244
28245  # Now new_path has a complete unix path to the binary
28246  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28247    # Keep paths in /bin as-is, but remove trailing .exe if any
28248    new_path="${new_path/%.exe/}"
28249    # Do not save /bin paths to all_fixpath_prefixes!
28250  else
28251    # Not in mixed or Windows style, start by that.
28252    new_path=`cmd //c echo $new_path`
28253
28254  input_path="$new_path"
28255  # Check if we need to convert this using DOS-style short mode. If the path
28256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28257  # take no chances and rewrite it.
28258  # Note: m4 eats our [], so we need to use [ and ] instead.
28259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28260  if test "x$has_forbidden_chars" != x; then
28261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28263  fi
28264
28265    # Output is in $new_path
28266
28267  windows_path="$new_path"
28268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28269    unix_path=`$CYGPATH -u "$windows_path"`
28270    new_path="$unix_path"
28271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28273    new_path="$unix_path"
28274  fi
28275
28276    # remove trailing .exe if any
28277    new_path="${new_path/%.exe/}"
28278
28279    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28280    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28281  fi
28282
28283  else
28284    # We're on a posix platform. Hooray! :)
28285    # First separate the path from the arguments. This will split at the first
28286    # space.
28287    complete="$OBJDUMP"
28288    path="${complete%% *}"
28289    tmp="$complete EOL"
28290    arguments="${tmp#* }"
28291
28292    # Cannot rely on the command "which" here since it doesn't always work.
28293    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28294    if test -z "$is_absolute_path"; then
28295      # Path to executable is not absolute. Find it.
28296      IFS_save="$IFS"
28297      IFS=:
28298      for p in $PATH; do
28299        if test -f "$p/$path" && test -x "$p/$path"; then
28300          new_path="$p/$path"
28301          break
28302        fi
28303      done
28304      IFS="$IFS_save"
28305    else
28306      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28307$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28308      new_path="$path"
28309    fi
28310
28311    if test "x$new_path" = x; then
28312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28313$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28314      has_space=`$ECHO "$complete" | $GREP " "`
28315      if test "x$has_space" != x; then
28316        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28317$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28318      fi
28319      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28320    fi
28321  fi
28322
28323  # Now join together the path and the arguments once again
28324  if test "x$arguments" != xEOL; then
28325    new_complete="$new_path ${arguments% *}"
28326  else
28327    new_complete="$new_path"
28328  fi
28329
28330  if test "x$complete" != "x$new_complete"; then
28331    OBJDUMP="$new_complete"
28332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28333$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28334  fi
28335
28336  fi
28337
28338  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28339    # Extract the first word of "lipo", so it can be a program name with args.
28340set dummy lipo; ac_word=$2
28341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28342$as_echo_n "checking for $ac_word... " >&6; }
28343if ${ac_cv_path_LIPO+:} false; then :
28344  $as_echo_n "(cached) " >&6
28345else
28346  case $LIPO in
28347  [\\/]* | ?:[\\/]*)
28348  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28349  ;;
28350  *)
28351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28352for as_dir in $PATH
28353do
28354  IFS=$as_save_IFS
28355  test -z "$as_dir" && as_dir=.
28356    for ac_exec_ext in '' $ac_executable_extensions; do
28357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28358    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28360    break 2
28361  fi
28362done
28363  done
28364IFS=$as_save_IFS
28365
28366  ;;
28367esac
28368fi
28369LIPO=$ac_cv_path_LIPO
28370if test -n "$LIPO"; then
28371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28372$as_echo "$LIPO" >&6; }
28373else
28374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28375$as_echo "no" >&6; }
28376fi
28377
28378
28379
28380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28381
28382  # First separate the path from the arguments. This will split at the first
28383  # space.
28384  complete="$LIPO"
28385  path="${complete%% *}"
28386  tmp="$complete EOL"
28387  arguments="${tmp#* }"
28388
28389  # Input might be given as Windows format, start by converting to
28390  # unix format.
28391  new_path=`$CYGPATH -u "$path"`
28392
28393  # Now try to locate executable using which
28394  new_path=`$WHICH "$new_path" 2> /dev/null`
28395  # bat and cmd files are not always considered executable in cygwin causing which
28396  # to not find them
28397  if test "x$new_path" = x \
28398      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28399      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28400    new_path=`$CYGPATH -u "$path"`
28401  fi
28402  if test "x$new_path" = x; then
28403    # Oops. Which didn't find the executable.
28404    # The splitting of arguments from the executable at a space might have been incorrect,
28405    # since paths with space are more likely in Windows. Give it another try with the whole
28406    # argument.
28407    path="$complete"
28408    arguments="EOL"
28409    new_path=`$CYGPATH -u "$path"`
28410    new_path=`$WHICH "$new_path" 2> /dev/null`
28411    # bat and cmd files are not always considered executable in cygwin causing which
28412    # to not find them
28413    if test "x$new_path" = x \
28414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28416      new_path=`$CYGPATH -u "$path"`
28417    fi
28418    if test "x$new_path" = x; then
28419      # It's still not found. Now this is an unrecoverable error.
28420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28421$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28422      has_space=`$ECHO "$complete" | $GREP " "`
28423      if test "x$has_space" != x; then
28424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28426      fi
28427      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28428    fi
28429  fi
28430
28431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28434  # "foo.exe" is OK but "foo" is an error.
28435  #
28436  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28437  # It is also a way to make sure we got the proper file name for the real test later on.
28438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28439  if test "x$test_shortpath" = x; then
28440    # Short path failed, file does not exist as specified.
28441    # Try adding .exe or .cmd
28442    if test -f "${new_path}.exe"; then
28443      input_to_shortpath="${new_path}.exe"
28444    elif test -f "${new_path}.cmd"; then
28445      input_to_shortpath="${new_path}.cmd"
28446    else
28447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28448$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28449      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28450$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28451      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28452    fi
28453  else
28454    input_to_shortpath="$new_path"
28455  fi
28456
28457  # Call helper function which possibly converts this using DOS-style short mode.
28458  # If so, the updated path is stored in $new_path.
28459  new_path="$input_to_shortpath"
28460
28461  input_path="$input_to_shortpath"
28462  # Check if we need to convert this using DOS-style short mode. If the path
28463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28464  # take no chances and rewrite it.
28465  # Note: m4 eats our [], so we need to use [ and ] instead.
28466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28467  if test "x$has_forbidden_chars" != x; then
28468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28472      # Going to short mode and back again did indeed matter. Since short mode is
28473      # case insensitive, let's make it lowercase to improve readability.
28474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28475      # Now convert it back to Unix-stile (cygpath)
28476      input_path=`$CYGPATH -u "$shortmode_path"`
28477      new_path="$input_path"
28478    fi
28479  fi
28480
28481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28482  if test "x$test_cygdrive_prefix" = x; then
28483    # As a simple fix, exclude /usr/bin since it's not a real path.
28484    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28486      # a path prefixed by /cygdrive for fixpath to work.
28487      new_path="$CYGWIN_ROOT_PATH$input_path"
28488    fi
28489  fi
28490
28491  # remove trailing .exe if any
28492  new_path="${new_path/%.exe/}"
28493
28494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28495
28496  # First separate the path from the arguments. This will split at the first
28497  # space.
28498  complete="$LIPO"
28499  path="${complete%% *}"
28500  tmp="$complete EOL"
28501  arguments="${tmp#* }"
28502
28503  # Input might be given as Windows format, start by converting to
28504  # unix format.
28505  new_path="$path"
28506
28507  windows_path="$new_path"
28508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28509    unix_path=`$CYGPATH -u "$windows_path"`
28510    new_path="$unix_path"
28511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28513    new_path="$unix_path"
28514  fi
28515
28516
28517  # Now try to locate executable using which
28518  new_path=`$WHICH "$new_path" 2> /dev/null`
28519
28520  if test "x$new_path" = x; then
28521    # Oops. Which didn't find the executable.
28522    # The splitting of arguments from the executable at a space might have been incorrect,
28523    # since paths with space are more likely in Windows. Give it another try with the whole
28524    # argument.
28525    path="$complete"
28526    arguments="EOL"
28527    new_path="$path"
28528
28529  windows_path="$new_path"
28530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28531    unix_path=`$CYGPATH -u "$windows_path"`
28532    new_path="$unix_path"
28533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28535    new_path="$unix_path"
28536  fi
28537
28538
28539    new_path=`$WHICH "$new_path" 2> /dev/null`
28540
28541    if test "x$new_path" = x; then
28542      # It's still not found. Now this is an unrecoverable error.
28543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28544$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28545      has_space=`$ECHO "$complete" | $GREP " "`
28546      if test "x$has_space" != x; then
28547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28549      fi
28550      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28551    fi
28552  fi
28553
28554  # Now new_path has a complete unix path to the binary
28555  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28556    # Keep paths in /bin as-is, but remove trailing .exe if any
28557    new_path="${new_path/%.exe/}"
28558    # Do not save /bin paths to all_fixpath_prefixes!
28559  else
28560    # Not in mixed or Windows style, start by that.
28561    new_path=`cmd //c echo $new_path`
28562
28563  input_path="$new_path"
28564  # Check if we need to convert this using DOS-style short mode. If the path
28565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28566  # take no chances and rewrite it.
28567  # Note: m4 eats our [], so we need to use [ and ] instead.
28568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28569  if test "x$has_forbidden_chars" != x; then
28570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28572  fi
28573
28574    # Output is in $new_path
28575
28576  windows_path="$new_path"
28577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28578    unix_path=`$CYGPATH -u "$windows_path"`
28579    new_path="$unix_path"
28580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28582    new_path="$unix_path"
28583  fi
28584
28585    # remove trailing .exe if any
28586    new_path="${new_path/%.exe/}"
28587
28588    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28589    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28590  fi
28591
28592  else
28593    # We're on a posix platform. Hooray! :)
28594    # First separate the path from the arguments. This will split at the first
28595    # space.
28596    complete="$LIPO"
28597    path="${complete%% *}"
28598    tmp="$complete EOL"
28599    arguments="${tmp#* }"
28600
28601    # Cannot rely on the command "which" here since it doesn't always work.
28602    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28603    if test -z "$is_absolute_path"; then
28604      # Path to executable is not absolute. Find it.
28605      IFS_save="$IFS"
28606      IFS=:
28607      for p in $PATH; do
28608        if test -f "$p/$path" && test -x "$p/$path"; then
28609          new_path="$p/$path"
28610          break
28611        fi
28612      done
28613      IFS="$IFS_save"
28614    else
28615      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28616$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28617      new_path="$path"
28618    fi
28619
28620    if test "x$new_path" = x; then
28621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28622$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28623      has_space=`$ECHO "$complete" | $GREP " "`
28624      if test "x$has_space" != x; then
28625        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28626$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28627      fi
28628      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28629    fi
28630  fi
28631
28632  # Now join together the path and the arguments once again
28633  if test "x$arguments" != xEOL; then
28634    new_complete="$new_path ${arguments% *}"
28635  else
28636    new_complete="$new_path"
28637  fi
28638
28639  if test "x$complete" != "x$new_complete"; then
28640    LIPO="$new_complete"
28641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28642$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28643  fi
28644
28645  fi
28646
28647
28648
28649  # Restore old path without tools dir
28650  PATH="$OLD_PATH"
28651
28652
28653# FIXME: Currently we must test this after paths but before flags. Fix!
28654
28655# And we can test some aspects on the target using configure macros.
28656
28657
28658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28659$as_echo_n "checking for ANSI C header files... " >&6; }
28660if ${ac_cv_header_stdc+:} false; then :
28661  $as_echo_n "(cached) " >&6
28662else
28663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28664/* end confdefs.h.  */
28665#include <stdlib.h>
28666#include <stdarg.h>
28667#include <string.h>
28668#include <float.h>
28669
28670int
28671main ()
28672{
28673
28674  ;
28675  return 0;
28676}
28677_ACEOF
28678if ac_fn_cxx_try_compile "$LINENO"; then :
28679  ac_cv_header_stdc=yes
28680else
28681  ac_cv_header_stdc=no
28682fi
28683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28684
28685if test $ac_cv_header_stdc = yes; then
28686  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28688/* end confdefs.h.  */
28689#include <string.h>
28690
28691_ACEOF
28692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28693  $EGREP "memchr" >/dev/null 2>&1; then :
28694
28695else
28696  ac_cv_header_stdc=no
28697fi
28698rm -f conftest*
28699
28700fi
28701
28702if test $ac_cv_header_stdc = yes; then
28703  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28704  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28705/* end confdefs.h.  */
28706#include <stdlib.h>
28707
28708_ACEOF
28709if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28710  $EGREP "free" >/dev/null 2>&1; then :
28711
28712else
28713  ac_cv_header_stdc=no
28714fi
28715rm -f conftest*
28716
28717fi
28718
28719if test $ac_cv_header_stdc = yes; then
28720  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28721  if test "$cross_compiling" = yes; then :
28722  :
28723else
28724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28725/* end confdefs.h.  */
28726#include <ctype.h>
28727#include <stdlib.h>
28728#if ((' ' & 0x0FF) == 0x020)
28729# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28730# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28731#else
28732# define ISLOWER(c) \
28733		   (('a' <= (c) && (c) <= 'i') \
28734		     || ('j' <= (c) && (c) <= 'r') \
28735		     || ('s' <= (c) && (c) <= 'z'))
28736# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28737#endif
28738
28739#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28740int
28741main ()
28742{
28743  int i;
28744  for (i = 0; i < 256; i++)
28745    if (XOR (islower (i), ISLOWER (i))
28746	|| toupper (i) != TOUPPER (i))
28747      return 2;
28748  return 0;
28749}
28750_ACEOF
28751if ac_fn_cxx_try_run "$LINENO"; then :
28752
28753else
28754  ac_cv_header_stdc=no
28755fi
28756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28757  conftest.$ac_objext conftest.beam conftest.$ac_ext
28758fi
28759
28760fi
28761fi
28762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28763$as_echo "$ac_cv_header_stdc" >&6; }
28764if test $ac_cv_header_stdc = yes; then
28765
28766$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28767
28768fi
28769
28770# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28771for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28772		  inttypes.h stdint.h unistd.h
28773do :
28774  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28775ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28776"
28777if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28778  cat >>confdefs.h <<_ACEOF
28779#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28780_ACEOF
28781
28782fi
28783
28784done
28785
28786
28787
28788  ###############################################################################
28789  #
28790  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28791  # (The JVM can use 32 or 64 bit Java pointers but that decision
28792  # is made at runtime.)
28793  #
28794
28795  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28796    # Always specify -m flags on Solaris
28797
28798  # When we add flags to the "official" CFLAGS etc, we need to
28799  # keep track of these additions in ADDED_CFLAGS etc. These
28800  # will later be checked to make sure only controlled additions
28801  # have been made to CFLAGS etc.
28802  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28803  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28804  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28805
28806  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28807  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28808  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28809
28810  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28811  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28812  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28813
28814  elif test "x$COMPILE_TYPE" = xreduced; then
28815    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28816      # Specify -m if running reduced on other Posix platforms
28817
28818  # When we add flags to the "official" CFLAGS etc, we need to
28819  # keep track of these additions in ADDED_CFLAGS etc. These
28820  # will later be checked to make sure only controlled additions
28821  # have been made to CFLAGS etc.
28822  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28823  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28824  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28825
28826  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28827  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28828  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28829
28830  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28831  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28832  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28833
28834    fi
28835  fi
28836
28837  # Make compilation sanity check
28838  for ac_header in stdio.h
28839do :
28840  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28841if test "x$ac_cv_header_stdio_h" = xyes; then :
28842  cat >>confdefs.h <<_ACEOF
28843#define HAVE_STDIO_H 1
28844_ACEOF
28845
28846else
28847
28848    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28849$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28850    if test "x$COMPILE_TYPE" = xreduced; then
28851      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28852$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28853    elif test "x$COMPILE_TYPE" = xcross; then
28854      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28855$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28856    fi
28857    as_fn_error $? "Cannot continue." "$LINENO" 5
28858
28859fi
28860
28861done
28862
28863
28864  # The cast to long int works around a bug in the HP C Compiler
28865# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28866# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28867# This bug is HP SR number 8606223364.
28868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28869$as_echo_n "checking size of int *... " >&6; }
28870if ${ac_cv_sizeof_int_p+:} false; then :
28871  $as_echo_n "(cached) " >&6
28872else
28873  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28874
28875else
28876  if test "$ac_cv_type_int_p" = yes; then
28877     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28879as_fn_error 77 "cannot compute sizeof (int *)
28880See \`config.log' for more details" "$LINENO" 5; }
28881   else
28882     ac_cv_sizeof_int_p=0
28883   fi
28884fi
28885
28886fi
28887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28888$as_echo "$ac_cv_sizeof_int_p" >&6; }
28889
28890
28891
28892cat >>confdefs.h <<_ACEOF
28893#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28894_ACEOF
28895
28896
28897
28898  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28899    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28900    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28901  fi
28902
28903  if test "x$SIZEOF_INT_P" = x; then
28904    # The test failed, lets stick to the assumed value.
28905    { $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
28906$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28907  else
28908    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28909
28910    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28911      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
28912    fi
28913  fi
28914
28915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28916$as_echo_n "checking for target address size... " >&6; }
28917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28918$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28919
28920
28921  ###############################################################################
28922  #
28923  # Is the target little of big endian?
28924  #
28925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28926$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28927if ${ac_cv_c_bigendian+:} false; then :
28928  $as_echo_n "(cached) " >&6
28929else
28930  ac_cv_c_bigendian=unknown
28931    # See if we're dealing with a universal compiler.
28932    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28933/* end confdefs.h.  */
28934#ifndef __APPLE_CC__
28935	       not a universal capable compiler
28936	     #endif
28937	     typedef int dummy;
28938
28939_ACEOF
28940if ac_fn_cxx_try_compile "$LINENO"; then :
28941
28942	# Check for potential -arch flags.  It is not universal unless
28943	# there are at least two -arch flags with different values.
28944	ac_arch=
28945	ac_prev=
28946	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28947	 if test -n "$ac_prev"; then
28948	   case $ac_word in
28949	     i?86 | x86_64 | ppc | ppc64)
28950	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28951		 ac_arch=$ac_word
28952	       else
28953		 ac_cv_c_bigendian=universal
28954		 break
28955	       fi
28956	       ;;
28957	   esac
28958	   ac_prev=
28959	 elif test "x$ac_word" = "x-arch"; then
28960	   ac_prev=arch
28961	 fi
28962       done
28963fi
28964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28965    if test $ac_cv_c_bigendian = unknown; then
28966      # See if sys/param.h defines the BYTE_ORDER macro.
28967      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28968/* end confdefs.h.  */
28969#include <sys/types.h>
28970	     #include <sys/param.h>
28971
28972int
28973main ()
28974{
28975#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28976		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28977		     && LITTLE_ENDIAN)
28978	      bogus endian macros
28979	     #endif
28980
28981  ;
28982  return 0;
28983}
28984_ACEOF
28985if ac_fn_cxx_try_compile "$LINENO"; then :
28986  # It does; now see whether it defined to BIG_ENDIAN or not.
28987	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28988/* end confdefs.h.  */
28989#include <sys/types.h>
28990		#include <sys/param.h>
28991
28992int
28993main ()
28994{
28995#if BYTE_ORDER != BIG_ENDIAN
28996		 not big endian
28997		#endif
28998
28999  ;
29000  return 0;
29001}
29002_ACEOF
29003if ac_fn_cxx_try_compile "$LINENO"; then :
29004  ac_cv_c_bigendian=yes
29005else
29006  ac_cv_c_bigendian=no
29007fi
29008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29009fi
29010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29011    fi
29012    if test $ac_cv_c_bigendian = unknown; then
29013      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29014      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29015/* end confdefs.h.  */
29016#include <limits.h>
29017
29018int
29019main ()
29020{
29021#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29022	      bogus endian macros
29023	     #endif
29024
29025  ;
29026  return 0;
29027}
29028_ACEOF
29029if ac_fn_cxx_try_compile "$LINENO"; then :
29030  # It does; now see whether it defined to _BIG_ENDIAN or not.
29031	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29032/* end confdefs.h.  */
29033#include <limits.h>
29034
29035int
29036main ()
29037{
29038#ifndef _BIG_ENDIAN
29039		 not big endian
29040		#endif
29041
29042  ;
29043  return 0;
29044}
29045_ACEOF
29046if ac_fn_cxx_try_compile "$LINENO"; then :
29047  ac_cv_c_bigendian=yes
29048else
29049  ac_cv_c_bigendian=no
29050fi
29051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29052fi
29053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29054    fi
29055    if test $ac_cv_c_bigendian = unknown; then
29056      # Compile a test program.
29057      if test "$cross_compiling" = yes; then :
29058  # Try to guess by grepping values from an object file.
29059	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29060/* end confdefs.h.  */
29061short int ascii_mm[] =
29062		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29063		short int ascii_ii[] =
29064		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29065		int use_ascii (int i) {
29066		  return ascii_mm[i] + ascii_ii[i];
29067		}
29068		short int ebcdic_ii[] =
29069		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29070		short int ebcdic_mm[] =
29071		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29072		int use_ebcdic (int i) {
29073		  return ebcdic_mm[i] + ebcdic_ii[i];
29074		}
29075		extern int foo;
29076
29077int
29078main ()
29079{
29080return use_ascii (foo) == use_ebcdic (foo);
29081  ;
29082  return 0;
29083}
29084_ACEOF
29085if ac_fn_cxx_try_compile "$LINENO"; then :
29086  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29087	      ac_cv_c_bigendian=yes
29088	    fi
29089	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29090	      if test "$ac_cv_c_bigendian" = unknown; then
29091		ac_cv_c_bigendian=no
29092	      else
29093		# finding both strings is unlikely to happen, but who knows?
29094		ac_cv_c_bigendian=unknown
29095	      fi
29096	    fi
29097fi
29098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29099else
29100  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29101/* end confdefs.h.  */
29102$ac_includes_default
29103int
29104main ()
29105{
29106
29107	     /* Are we little or big endian?  From Harbison&Steele.  */
29108	     union
29109	     {
29110	       long int l;
29111	       char c[sizeof (long int)];
29112	     } u;
29113	     u.l = 1;
29114	     return u.c[sizeof (long int) - 1] == 1;
29115
29116  ;
29117  return 0;
29118}
29119_ACEOF
29120if ac_fn_cxx_try_run "$LINENO"; then :
29121  ac_cv_c_bigendian=no
29122else
29123  ac_cv_c_bigendian=yes
29124fi
29125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29126  conftest.$ac_objext conftest.beam conftest.$ac_ext
29127fi
29128
29129    fi
29130fi
29131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29132$as_echo "$ac_cv_c_bigendian" >&6; }
29133 case $ac_cv_c_bigendian in #(
29134   yes)
29135     ENDIAN="big";; #(
29136   no)
29137     ENDIAN="little" ;; #(
29138   universal)
29139     ENDIAN="universal_endianness"
29140     ;; #(
29141   *)
29142     ENDIAN="unknown" ;;
29143 esac
29144
29145
29146  if test "x$ENDIAN" = xuniversal_endianness; then
29147    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29148  fi
29149  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29150    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
29151  fi
29152
29153
29154# Configure flags for the tools
29155
29156
29157  ###############################################################################
29158  #
29159  # How to compile shared libraries.
29160  #
29161
29162  if test "x$GCC" = xyes; then
29163    COMPILER_NAME=gcc
29164    PICFLAG="-fPIC"
29165    LIBRARY_PREFIX=lib
29166    SHARED_LIBRARY='lib$1.so'
29167    STATIC_LIBRARY='lib$1.a'
29168    SHARED_LIBRARY_FLAGS="-shared"
29169    SHARED_LIBRARY_SUFFIX='.so'
29170    STATIC_LIBRARY_SUFFIX='.a'
29171    OBJ_SUFFIX='.o'
29172    EXE_SUFFIX=''
29173    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29174    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29175    C_FLAG_REORDER=''
29176    CXX_FLAG_REORDER=''
29177    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29178    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29179    LD="$CC"
29180    LDEXE="$CC"
29181    LDCXX="$CXX"
29182    LDEXECXX="$CXX"
29183    POST_STRIP_CMD="$STRIP -g"
29184
29185    # Linking is different on MacOSX
29186    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29187      # Might change in the future to clang.
29188      COMPILER_NAME=gcc
29189      SHARED_LIBRARY='lib$1.dylib'
29190      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29191      SHARED_LIBRARY_SUFFIX='.dylib'
29192      EXE_SUFFIX=''
29193      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29194      SET_SHARED_LIBRARY_MAPFILE=''
29195      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29196      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29197      POST_STRIP_CMD="$STRIP -S"
29198    fi
29199  else
29200    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29201      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29202      COMPILER_NAME=ossc
29203      PICFLAG="-KPIC"
29204      LIBRARY_PREFIX=lib
29205      SHARED_LIBRARY='lib$1.so'
29206      STATIC_LIBRARY='lib$1.a'
29207      SHARED_LIBRARY_FLAGS="-G"
29208      SHARED_LIBRARY_SUFFIX='.so'
29209      STATIC_LIBRARY_SUFFIX='.a'
29210      OBJ_SUFFIX='.o'
29211      EXE_SUFFIX=''
29212      SET_SHARED_LIBRARY_NAME=''
29213      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29214      C_FLAG_REORDER='-xF'
29215      CXX_FLAG_REORDER='-xF'
29216      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29217      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29218      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29219      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29220      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29221      POST_STRIP_CMD="$STRIP -x"
29222      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29223    fi
29224    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29225      # If it is not gcc, then assume it is the MS Visual Studio compiler
29226      COMPILER_NAME=cl
29227      PICFLAG=""
29228      LIBRARY_PREFIX=
29229      SHARED_LIBRARY='$1.dll'
29230      STATIC_LIBRARY='$1.lib'
29231      SHARED_LIBRARY_FLAGS="-LD"
29232      SHARED_LIBRARY_SUFFIX='.dll'
29233      STATIC_LIBRARY_SUFFIX='.lib'
29234      OBJ_SUFFIX='.obj'
29235      EXE_SUFFIX='.exe'
29236      SET_SHARED_LIBRARY_NAME=''
29237      SET_SHARED_LIBRARY_MAPFILE=''
29238      SET_SHARED_LIBRARY_ORIGIN=''
29239      SET_EXECUTABLE_ORIGIN=''
29240    fi
29241  fi
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261  # The (cross) compiler is now configured, we can now test capabilities
29262  # of the target platform.
29263
29264
29265
29266  ###############################################################################
29267  #
29268  # Setup the opt flags for different compilers
29269  # and different operating systems.
29270  #
29271
29272  #
29273  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29274  #
29275  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29276    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29277    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29278    CFLAGS="$CFLAGS -mstackrealign"
29279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29280$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29281    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29282/* end confdefs.h.  */
29283int main() { return 0; }
29284_ACEOF
29285if ac_fn_cxx_try_link "$LINENO"; then :
29286
29287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29288$as_echo "yes" >&6; }
29289
29290else
29291
29292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29293$as_echo "no" >&6; }
29294          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29295
29296
29297fi
29298rm -f core conftest.err conftest.$ac_objext \
29299    conftest$ac_exeext conftest.$ac_ext
29300  fi
29301
29302  C_FLAG_DEPS="-MMD -MF"
29303  CXX_FLAG_DEPS="-MMD -MF"
29304
29305  case $COMPILER_TYPE in
29306    CC )
29307      case $COMPILER_NAME in
29308        gcc )
29309          case $OPENJDK_TARGET_OS in
29310            macosx )
29311              # On MacOSX we optimize for size, something
29312              # we should do for all platforms?
29313              C_O_FLAG_HI="-Os"
29314              C_O_FLAG_NORM="-Os"
29315              C_O_FLAG_NONE=""
29316              ;;
29317            *)
29318              C_O_FLAG_HI="-O3"
29319              C_O_FLAG_NORM="-O2"
29320              C_O_FLAG_NONE="-O0"
29321              ;;
29322          esac
29323          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29324          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29325          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29326          CFLAGS_DEBUG_SYMBOLS="-g"
29327          CXXFLAGS_DEBUG_SYMBOLS="-g"
29328          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29329            CFLAGS_DEBUG_SYMBOLS="-g1"
29330            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29331          fi
29332          ;;
29333        ossc )
29334          #
29335          # Forte has different names for this with their C++ compiler...
29336          #
29337          C_FLAG_DEPS="-xMMD -xMF"
29338          CXX_FLAG_DEPS="-xMMD -xMF"
29339
29340          # Extra options used with HIGHEST
29341          #
29342          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29343          #          done with care, there are some assumptions below that need to
29344          #          be understood about the use of pointers, and IEEE behavior.
29345          #
29346          # Use non-standard floating point mode (not IEEE 754)
29347          CC_HIGHEST="$CC_HIGHEST -fns"
29348          # Do some simplification of floating point arithmetic (not IEEE 754)
29349          CC_HIGHEST="$CC_HIGHEST -fsimple"
29350          # Use single precision floating point with 'float'
29351          CC_HIGHEST="$CC_HIGHEST -fsingle"
29352          # Assume memory references via basic pointer types do not alias
29353          #   (Source with excessing pointer casting and data access with mixed
29354          #    pointer types are not recommended)
29355          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29356          # Use intrinsic or inline versions for math/std functions
29357          #   (If you expect perfect errno behavior, do not use this)
29358          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29359          # Loop data dependency optimizations (need -xO3 or higher)
29360          CC_HIGHEST="$CC_HIGHEST -xdepend"
29361          # Pointer parameters to functions do not overlap
29362          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29363          #    If you pass in multiple pointers to the same data, do not use this)
29364          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29365          # Inline some library routines
29366          #   (If you expect perfect errno behavior, do not use this)
29367          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29368          # Use optimized math routines
29369          #   (If you expect perfect errno behavior, do not use this)
29370          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29371          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29372
29373          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29374            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29375            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29376          fi
29377
29378          case $OPENJDK_TARGET_CPU_ARCH in
29379            x86)
29380              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29381              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29382              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29383              C_O_FLAG_NONE="-xregs=no%frameptr"
29384              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29385              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29386              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29387              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29388              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29389                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29390                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29391              fi
29392              ;;
29393            sparc)
29394              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29395              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29396              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29397              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29398              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29399              C_O_FLAG_NONE=""
29400              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29401              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29402              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29403              CXX_O_FLAG_NONE=""
29404              ;;
29405          esac
29406
29407          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29408          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29409      esac
29410      ;;
29411    CL )
29412      C_O_FLAG_HIGHEST="-O2"
29413      C_O_FLAG_HI="-O1"
29414      C_O_FLAG_NORM="-O1"
29415      C_O_FLAG_NONE="-Od"
29416      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29417      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29418      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29419      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29420      ;;
29421  esac
29422
29423  if test -z "$C_O_FLAG_HIGHEST"; then
29424    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29425  fi
29426
29427  if test -z "$CXX_O_FLAG_HIGHEST"; then
29428    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29429  fi
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29446$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29447  fi
29448
29449  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29450    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29451$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29452  fi
29453
29454  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29456$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29457  fi
29458
29459
29460# Check whether --with-extra-cflags was given.
29461if test "${with_extra_cflags+set}" = set; then :
29462  withval=$with_extra_cflags;
29463fi
29464
29465
29466
29467# Check whether --with-extra-cxxflags was given.
29468if test "${with_extra_cxxflags+set}" = set; then :
29469  withval=$with_extra_cxxflags;
29470fi
29471
29472
29473
29474# Check whether --with-extra-ldflags was given.
29475if test "${with_extra_ldflags+set}" = set; then :
29476  withval=$with_extra_ldflags;
29477fi
29478
29479
29480  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29481  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29482  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29483
29484  # Hotspot needs these set in their legacy form
29485  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29486  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29487  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29488
29489
29490
29491
29492
29493  ###############################################################################
29494  #
29495  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29496  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29497  #
29498  case $COMPILER_NAME in
29499    gcc )
29500      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29501      -pipe \
29502      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29503      case $OPENJDK_TARGET_CPU_ARCH in
29504        arm )
29505          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29506          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29507          ;;
29508        ppc )
29509          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29510          ;;
29511        * )
29512          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29513          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29514          ;;
29515      esac
29516      ;;
29517    ossc )
29518      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29519      case $OPENJDK_TARGET_CPU_ARCH in
29520        x86 )
29521          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29522          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29523          ;;
29524      esac
29525
29526      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29527      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29528
29529      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29530      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29531      ;;
29532    cl )
29533      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29534      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29535      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29536      -DWIN32 -DIAL"
29537      case $OPENJDK_TARGET_CPU in
29538        x86 )
29539          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29540          ;;
29541        x86_64 )
29542          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29543          ;;
29544      esac
29545      ;;
29546  esac
29547
29548  ###############################################################################
29549
29550  # Adjust flags according to debug level.
29551  case $DEBUG_LEVEL in
29552    fastdebug )
29553      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29554      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29555      C_O_FLAG_HI="$C_O_FLAG_NORM"
29556      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29557      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29558      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29559      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29560      ;;
29561    slowdebug )
29562      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29563      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29564      C_O_FLAG_HI="$C_O_FLAG_NONE"
29565      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29566      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29567      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29568      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29569      ;;
29570  esac
29571
29572  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29573
29574  # The package path is used only on macosx?
29575  PACKAGE_PATH=/opt/local
29576
29577
29578  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29579    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29580    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29581    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29582    #   Note: -Dmacro         is the same as    #define macro 1
29583    #         -Dmacro=        is the same as    #define macro
29584    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29585      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29586    else
29587      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29588    fi
29589  else
29590    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29591  fi
29592  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29593    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29594  fi
29595  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29596    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29597  fi
29598  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29599    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29600  fi
29601  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29602    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29603    # Setting these parameters makes it an error to link to macosx APIs that are
29604    # newer than the given OS version and makes the linked binaries compatible even
29605    # if built on a newer version of the OS.
29606    # The expected format is X.Y.Z
29607    MACOSX_VERSION_MIN=10.7.0
29608
29609    # The macro takes the version with no dots, ex: 1070
29610    # Let the flags variables get resolved in make for easier override on make
29611    # command line.
29612    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29613    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29614  fi
29615  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29616    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29617  fi
29618  if test "x$DEBUG_LEVEL" = xrelease; then
29619    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29620  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29621    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29622  fi
29623  else
29624    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29625  fi
29626
29627  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29628  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29629
29630  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29631      -I${JDK_OUTPUTDIR}/include \
29632      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29633      -I${JDK_TOPDIR}/src/share/javavm/export \
29634      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29635      -I${JDK_TOPDIR}/src/share/native/common \
29636      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29637
29638  # The shared libraries are compiled using the picflag.
29639  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29640  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29641
29642  # Executable flags
29643  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29644  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29645
29646  # Now this is odd. The JDK native libraries have to link against libjvm.so
29647  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29648  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29649  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29650  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29651  # libraries will link to whatever is in memory. Yuck.
29652  #
29653  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29654  if test "x$COMPILER_NAME" = xcl; then
29655    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29656    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29657      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29658    fi
29659    # TODO: make -debug optional "--disable-full-debug-symbols"
29660    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29661    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29662    LDFLAGS_JDKLIB_SUFFIX=""
29663    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29664      LDFLAGS_STACK_SIZE=1048576
29665    else
29666      LDFLAGS_STACK_SIZE=327680
29667    fi
29668    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29669  else
29670    if test "x$COMPILER_NAME" = xgcc; then
29671      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29672      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29673      if test -n "$HAS_GNU_HASH"; then
29674        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29675      fi
29676      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29677        # And since we now know that the linker is gnu, then add -z defs, to forbid
29678        # undefined symbols in object files.
29679        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29680        if test "x$DEBUG_LEVEL" = "xrelease"; then
29681          # When building release libraries, tell the linker optimize them.
29682          # Should this be supplied to the OSS linker as well?
29683          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29684        fi
29685      fi
29686    fi
29687    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29688        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29689
29690    # On some platforms (mac) the linker warns about non existing -L dirs.
29691    # Add server first if available. Linking aginst client does not always produce the same results.
29692    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29693    # Default to server for other variants.
29694    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29695      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29696    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29697      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29698    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29699      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29700    else
29701      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29702    fi
29703
29704    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29705    if test "x$COMPILER_NAME" = xossc; then
29706      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29707    fi
29708
29709    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29710    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29711      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29712    fi
29713  fi
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729  # Some Zero and Shark settings.
29730  # ZERO_ARCHFLAG tells the compiler which mode to build for
29731  case "${OPENJDK_TARGET_CPU}" in
29732    s390)
29733      ZERO_ARCHFLAG="-m31"
29734      ;;
29735    *)
29736      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29737  esac
29738
29739  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29740$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29741  supports=yes
29742
29743  saved_cflags="$CFLAGS"
29744  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29745  ac_ext=c
29746ac_cpp='$CPP $CPPFLAGS'
29747ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29748ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29749ac_compiler_gnu=$ac_cv_c_compiler_gnu
29750
29751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29752/* end confdefs.h.  */
29753int i;
29754_ACEOF
29755if ac_fn_c_try_compile "$LINENO"; then :
29756
29757else
29758  supports=no
29759fi
29760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29761  ac_ext=cpp
29762ac_cpp='$CXXCPP $CPPFLAGS'
29763ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29764ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29765ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29766
29767  CFLAGS="$saved_cflags"
29768
29769  saved_cxxflags="$CXXFLAGS"
29770  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29771  ac_ext=cpp
29772ac_cpp='$CXXCPP $CPPFLAGS'
29773ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29774ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29775ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29776
29777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29778/* end confdefs.h.  */
29779int i;
29780_ACEOF
29781if ac_fn_cxx_try_compile "$LINENO"; then :
29782
29783else
29784  supports=no
29785fi
29786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29787  ac_ext=cpp
29788ac_cpp='$CXXCPP $CPPFLAGS'
29789ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29790ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29791ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29792
29793  CXXFLAGS="$saved_cxxflags"
29794
29795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29796$as_echo "$supports" >&6; }
29797  if test "x$supports" = "xyes" ; then
29798    :
29799  else
29800    ZERO_ARCHFLAG=""
29801  fi
29802
29803
29804
29805  # Check that the compiler supports -mX flags
29806  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29807
29808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29809$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29810  supports=yes
29811
29812  saved_cflags="$CFLAGS"
29813  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29814  ac_ext=c
29815ac_cpp='$CPP $CPPFLAGS'
29816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29818ac_compiler_gnu=$ac_cv_c_compiler_gnu
29819
29820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29821/* end confdefs.h.  */
29822int i;
29823_ACEOF
29824if ac_fn_c_try_compile "$LINENO"; then :
29825
29826else
29827  supports=no
29828fi
29829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29830  ac_ext=cpp
29831ac_cpp='$CXXCPP $CPPFLAGS'
29832ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29833ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29834ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29835
29836  CFLAGS="$saved_cflags"
29837
29838  saved_cxxflags="$CXXFLAGS"
29839  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29840  ac_ext=cpp
29841ac_cpp='$CXXCPP $CPPFLAGS'
29842ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29843ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29844ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29845
29846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29847/* end confdefs.h.  */
29848int i;
29849_ACEOF
29850if ac_fn_cxx_try_compile "$LINENO"; then :
29851
29852else
29853  supports=no
29854fi
29855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29856  ac_ext=cpp
29857ac_cpp='$CXXCPP $CPPFLAGS'
29858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29861
29862  CXXFLAGS="$saved_cxxflags"
29863
29864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29865$as_echo "$supports" >&6; }
29866  if test "x$supports" = "xyes" ; then
29867    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29868  else
29869    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29870  fi
29871
29872
29873
29874
29875# Setup debug symbols (need objcopy from the toolchain for that)
29876
29877  #
29878  # ENABLE_DEBUG_SYMBOLS
29879  # This must be done after the toolchain is setup, since we're looking at objcopy.
29880  #
29881  # Check whether --enable-debug-symbols was given.
29882if test "${enable_debug_symbols+set}" = set; then :
29883  enableval=$enable_debug_symbols;
29884fi
29885
29886
29887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29888$as_echo_n "checking if we should generate debug symbols... " >&6; }
29889
29890  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29891    # explicit enabling of enable-debug-symbols and can't find objcopy
29892    #   this is an error
29893    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29894  fi
29895
29896  if test "x$enable_debug_symbols" = "xyes"; then
29897    ENABLE_DEBUG_SYMBOLS=true
29898  elif test "x$enable_debug_symbols" = "xno"; then
29899    ENABLE_DEBUG_SYMBOLS=false
29900  else
29901    # Default is on if objcopy is found
29902    if test "x$OBJCOPY" != x; then
29903      ENABLE_DEBUG_SYMBOLS=true
29904    # MacOS X and Windows don't use objcopy but default is on for those OSes
29905    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
29906      ENABLE_DEBUG_SYMBOLS=true
29907    else
29908      ENABLE_DEBUG_SYMBOLS=false
29909    fi
29910  fi
29911
29912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29913$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29914
29915  #
29916  # ZIP_DEBUGINFO_FILES
29917  #
29918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29919$as_echo_n "checking if we should zip debug-info files... " >&6; }
29920  # Check whether --enable-zip-debug-info was given.
29921if test "${enable_zip_debug_info+set}" = set; then :
29922  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29923else
29924  enable_zip_debug_info="yes"
29925fi
29926
29927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29928$as_echo "${enable_zip_debug_info}" >&6; }
29929
29930  if test "x${enable_zip_debug_info}" = "xno"; then
29931    ZIP_DEBUGINFO_FILES=false
29932  else
29933    ZIP_DEBUGINFO_FILES=true
29934  fi
29935
29936
29937
29938
29939
29940
29941
29942###############################################################################
29943#
29944# Check dependencies for external and internal libraries.
29945#
29946###############################################################################
29947
29948# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
29949
29950  # When using cygwin or msys, we need a wrapper binary that renames
29951  # /cygdrive/c/ arguments into c:/ arguments and peeks into
29952  # @files and rewrites these too! This wrapper binary is
29953  # called fixpath.
29954  FIXPATH=
29955  if test "x$OPENJDK_BUILD_OS" = xwindows; then
29956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
29957$as_echo_n "checking if fixpath can be created... " >&6; }
29958    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
29959    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
29960    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
29961      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
29962      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
29963      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
29964      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
29965    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
29966      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
29967      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
29968
29969      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
29970      # @ was chosen as separator to minimize risk of other tools messing around with it
29971      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
29972      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
29973
29974      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
29975    fi
29976    rm -f $OUTPUT_ROOT/fixpath*
29977    cd $OUTPUT_ROOT
29978    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
29979    cd $CURDIR
29980
29981    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
29982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29983$as_echo "no" >&6; }
29984      cat $OUTPUT_ROOT/fixpath1.log
29985      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
29986    fi
29987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29988$as_echo "yes" >&6; }
29989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
29990$as_echo_n "checking if fixpath.exe works... " >&6; }
29991    cd $OUTPUT_ROOT
29992    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
29993    cd $CURDIR
29994    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
29995      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29996$as_echo "no" >&6; }
29997      cat $OUTPUT_ROOT/fixpath2.log
29998      as_fn_error $? "fixpath did not work!" "$LINENO" 5
29999    fi
30000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30001$as_echo "yes" >&6; }
30002    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30003  fi
30004
30005
30006
30007
30008
30009
30010  ###############################################################################
30011  #
30012  # OS specific settings that we never will need to probe.
30013  #
30014  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30016$as_echo_n "checking what is not needed on Linux?... " >&6; }
30017    PULSE_NOT_NEEDED=yes
30018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30019$as_echo "pulse" >&6; }
30020  fi
30021
30022  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30024$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30025    ALSA_NOT_NEEDED=yes
30026    PULSE_NOT_NEEDED=yes
30027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30028$as_echo "alsa pulse" >&6; }
30029  fi
30030
30031  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30033$as_echo_n "checking what is not needed on Windows?... " >&6; }
30034    CUPS_NOT_NEEDED=yes
30035    ALSA_NOT_NEEDED=yes
30036    PULSE_NOT_NEEDED=yes
30037    X11_NOT_NEEDED=yes
30038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30039$as_echo "alsa cups pulse x11" >&6; }
30040  fi
30041
30042  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30044$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30045    ALSA_NOT_NEEDED=yes
30046    PULSE_NOT_NEEDED=yes
30047    X11_NOT_NEEDED=yes
30048    # If the java runtime framework is disabled, then we need X11.
30049    # This will be adjusted below.
30050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30051$as_echo "alsa pulse x11" >&6; }
30052  fi
30053
30054  if test "x$OPENJDK_TARGET_OS" = xbsd; then
30055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30056$as_echo_n "checking what is not needed on bsd?... " >&6; }
30057    ALSA_NOT_NEEDED=yes
30058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30059$as_echo "alsa" >&6; }
30060  fi
30061
30062  if test "x$OPENJDK" = "xfalse"; then
30063    FREETYPE_NOT_NEEDED=yes
30064  fi
30065
30066  if test "x$SUPPORT_HEADFUL" = xno; then
30067    X11_NOT_NEEDED=yes
30068  fi
30069
30070  ###############################################################################
30071  #
30072  # Check for MacOSX support for OpenJDK.
30073  #
30074
30075
30076  # Check whether --enable-macosx-runtime-support was given.
30077if test "${enable_macosx_runtime_support+set}" = set; then :
30078  enableval=$enable_macosx_runtime_support;
30079fi
30080
30081  if test "x$enable_macosx_runtime_support" != x; then
30082    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30083$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30084  fi
30085
30086
30087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30088$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30089  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30091$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30092  else
30093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30094$as_echo "no" >&6; }
30095  fi
30096
30097
30098
30099  ###############################################################################
30100  #
30101  # Check for X Windows
30102  #
30103
30104  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30105  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30106  # --x-libraries for the sysroot, if that seems to be correct.
30107  if test "x$SYS_ROOT" != "x/"; then
30108    if test "x$x_includes" = xNONE; then
30109      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30110        x_includes="$SYS_ROOT/usr/X11R6/include"
30111      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30112        x_includes="$SYS_ROOT/usr/include"
30113      fi
30114    fi
30115    if test "x$x_libraries" = xNONE; then
30116      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30117        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30118      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30119        x_libraries="$SYS_ROOT/usr/lib64"
30120      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30121        x_libraries="$SYS_ROOT/usr/lib"
30122      fi
30123    fi
30124  fi
30125
30126  # Now let autoconf do it's magic
30127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30128$as_echo_n "checking for X... " >&6; }
30129
30130
30131# Check whether --with-x was given.
30132if test "${with_x+set}" = set; then :
30133  withval=$with_x;
30134fi
30135
30136# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30137if test "x$with_x" = xno; then
30138  # The user explicitly disabled X.
30139  have_x=disabled
30140else
30141  case $x_includes,$x_libraries in #(
30142    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30143    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30144  $as_echo_n "(cached) " >&6
30145else
30146  # One or both of the vars are not set, and there is no cached value.
30147ac_x_includes=no ac_x_libraries=no
30148rm -f -r conftest.dir
30149if mkdir conftest.dir; then
30150  cd conftest.dir
30151  cat >Imakefile <<'_ACEOF'
30152incroot:
30153	@echo incroot='${INCROOT}'
30154usrlibdir:
30155	@echo usrlibdir='${USRLIBDIR}'
30156libdir:
30157	@echo libdir='${LIBDIR}'
30158_ACEOF
30159  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30160    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30161    for ac_var in incroot usrlibdir libdir; do
30162      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30163    done
30164    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30165    for ac_extension in a so sl dylib la dll; do
30166      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30167	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30168	ac_im_usrlibdir=$ac_im_libdir; break
30169      fi
30170    done
30171    # Screen out bogus values from the imake configuration.  They are
30172    # bogus both because they are the default anyway, and because
30173    # using them would break gcc on systems where it needs fixed includes.
30174    case $ac_im_incroot in
30175	/usr/include) ac_x_includes= ;;
30176	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30177    esac
30178    case $ac_im_usrlibdir in
30179	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30180	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30181    esac
30182  fi
30183  cd ..
30184  rm -f -r conftest.dir
30185fi
30186
30187# Standard set of common directories for X headers.
30188# Check X11 before X11Rn because it is often a symlink to the current release.
30189ac_x_header_dirs='
30190/usr/X11/include
30191/usr/X11R7/include
30192/usr/X11R6/include
30193/usr/X11R5/include
30194/usr/X11R4/include
30195
30196/usr/include/X11
30197/usr/include/X11R7
30198/usr/include/X11R6
30199/usr/include/X11R5
30200/usr/include/X11R4
30201
30202/usr/local/X11/include
30203/usr/local/X11R7/include
30204/usr/local/X11R6/include
30205/usr/local/X11R5/include
30206/usr/local/X11R4/include
30207
30208/usr/local/include/X11
30209/usr/local/include/X11R7
30210/usr/local/include/X11R6
30211/usr/local/include/X11R5
30212/usr/local/include/X11R4
30213
30214/usr/X386/include
30215/usr/x386/include
30216/usr/XFree86/include/X11
30217
30218/usr/include
30219/usr/local/include
30220/usr/unsupported/include
30221/usr/athena/include
30222/usr/local/x11r5/include
30223/usr/lpp/Xamples/include
30224
30225/usr/openwin/include
30226/usr/openwin/share/include'
30227
30228if test "$ac_x_includes" = no; then
30229  # Guess where to find include files, by looking for Xlib.h.
30230  # First, try using that file with no special directory specified.
30231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30232/* end confdefs.h.  */
30233#include <X11/Xlib.h>
30234_ACEOF
30235if ac_fn_cxx_try_cpp "$LINENO"; then :
30236  # We can compile using X headers with no special include directory.
30237ac_x_includes=
30238else
30239  for ac_dir in $ac_x_header_dirs; do
30240  if test -r "$ac_dir/X11/Xlib.h"; then
30241    ac_x_includes=$ac_dir
30242    break
30243  fi
30244done
30245fi
30246rm -f conftest.err conftest.i conftest.$ac_ext
30247fi # $ac_x_includes = no
30248
30249if test "$ac_x_libraries" = no; then
30250  # Check for the libraries.
30251  # See if we find them without any special options.
30252  # Don't add to $LIBS permanently.
30253  ac_save_LIBS=$LIBS
30254  LIBS="-lX11 $LIBS"
30255  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30256/* end confdefs.h.  */
30257#include <X11/Xlib.h>
30258int
30259main ()
30260{
30261XrmInitialize ()
30262  ;
30263  return 0;
30264}
30265_ACEOF
30266if ac_fn_cxx_try_link "$LINENO"; then :
30267  LIBS=$ac_save_LIBS
30268# We can link X programs with no special library path.
30269ac_x_libraries=
30270else
30271  LIBS=$ac_save_LIBS
30272for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30273do
30274  # Don't even attempt the hair of trying to link an X program!
30275  for ac_extension in a so sl dylib la dll; do
30276    if test -r "$ac_dir/libX11.$ac_extension"; then
30277      ac_x_libraries=$ac_dir
30278      break 2
30279    fi
30280  done
30281done
30282fi
30283rm -f core conftest.err conftest.$ac_objext \
30284    conftest$ac_exeext conftest.$ac_ext
30285fi # $ac_x_libraries = no
30286
30287case $ac_x_includes,$ac_x_libraries in #(
30288  no,* | *,no | *\'*)
30289    # Didn't find X, or a directory has "'" in its name.
30290    ac_cv_have_x="have_x=no";; #(
30291  *)
30292    # Record where we found X for the cache.
30293    ac_cv_have_x="have_x=yes\
30294	ac_x_includes='$ac_x_includes'\
30295	ac_x_libraries='$ac_x_libraries'"
30296esac
30297fi
30298;; #(
30299    *) have_x=yes;;
30300  esac
30301  eval "$ac_cv_have_x"
30302fi # $with_x != no
30303
30304if test "$have_x" != yes; then
30305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30306$as_echo "$have_x" >&6; }
30307  no_x=yes
30308else
30309  # If each of the values was on the command line, it overrides each guess.
30310  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30311  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30312  # Update the cache value to reflect the command line values.
30313  ac_cv_have_x="have_x=yes\
30314	ac_x_includes='$x_includes'\
30315	ac_x_libraries='$x_libraries'"
30316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30317$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30318fi
30319
30320  if test "$no_x" = yes; then
30321  # Not all programs may use this symbol, but it does not hurt to define it.
30322
30323$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30324
30325  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30326else
30327  if test -n "$x_includes"; then
30328    X_CFLAGS="$X_CFLAGS -I$x_includes"
30329  fi
30330
30331  # It would also be nice to do this for all -L options, not just this one.
30332  if test -n "$x_libraries"; then
30333    X_LIBS="$X_LIBS -L$x_libraries"
30334    # For Solaris; some versions of Sun CC require a space after -R and
30335    # others require no space.  Words are not sufficient . . . .
30336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30337$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30338    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30339    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30340    ac_cxx_werror_flag=yes
30341    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30342/* end confdefs.h.  */
30343
30344int
30345main ()
30346{
30347
30348  ;
30349  return 0;
30350}
30351_ACEOF
30352if ac_fn_cxx_try_link "$LINENO"; then :
30353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30354$as_echo "no" >&6; }
30355       X_LIBS="$X_LIBS -R$x_libraries"
30356else
30357  LIBS="$ac_xsave_LIBS -R $x_libraries"
30358       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30359/* end confdefs.h.  */
30360
30361int
30362main ()
30363{
30364
30365  ;
30366  return 0;
30367}
30368_ACEOF
30369if ac_fn_cxx_try_link "$LINENO"; then :
30370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30371$as_echo "yes" >&6; }
30372	  X_LIBS="$X_LIBS -R $x_libraries"
30373else
30374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30375$as_echo "neither works" >&6; }
30376fi
30377rm -f core conftest.err conftest.$ac_objext \
30378    conftest$ac_exeext conftest.$ac_ext
30379fi
30380rm -f core conftest.err conftest.$ac_objext \
30381    conftest$ac_exeext conftest.$ac_ext
30382    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30383    LIBS=$ac_xsave_LIBS
30384  fi
30385
30386  # Check for system-dependent libraries X programs must link with.
30387  # Do this before checking for the system-independent R6 libraries
30388  # (-lICE), since we may need -lsocket or whatever for X linking.
30389
30390  if test "$ISC" = yes; then
30391    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30392  else
30393    # Martyn Johnson says this is needed for Ultrix, if the X
30394    # libraries were built with DECnet support.  And Karl Berry says
30395    # the Alpha needs dnet_stub (dnet does not exist).
30396    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30397    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30398/* end confdefs.h.  */
30399
30400/* Override any GCC internal prototype to avoid an error.
30401   Use char because int might match the return type of a GCC
30402   builtin and then its argument prototype would still apply.  */
30403#ifdef __cplusplus
30404extern "C"
30405#endif
30406char XOpenDisplay ();
30407int
30408main ()
30409{
30410return XOpenDisplay ();
30411  ;
30412  return 0;
30413}
30414_ACEOF
30415if ac_fn_cxx_try_link "$LINENO"; then :
30416
30417else
30418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30419$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30420if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30421  $as_echo_n "(cached) " >&6
30422else
30423  ac_check_lib_save_LIBS=$LIBS
30424LIBS="-ldnet  $LIBS"
30425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30426/* end confdefs.h.  */
30427
30428/* Override any GCC internal prototype to avoid an error.
30429   Use char because int might match the return type of a GCC
30430   builtin and then its argument prototype would still apply.  */
30431#ifdef __cplusplus
30432extern "C"
30433#endif
30434char dnet_ntoa ();
30435int
30436main ()
30437{
30438return dnet_ntoa ();
30439  ;
30440  return 0;
30441}
30442_ACEOF
30443if ac_fn_cxx_try_link "$LINENO"; then :
30444  ac_cv_lib_dnet_dnet_ntoa=yes
30445else
30446  ac_cv_lib_dnet_dnet_ntoa=no
30447fi
30448rm -f core conftest.err conftest.$ac_objext \
30449    conftest$ac_exeext conftest.$ac_ext
30450LIBS=$ac_check_lib_save_LIBS
30451fi
30452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30453$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30454if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30455  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30456fi
30457
30458    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30460$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30461if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30462  $as_echo_n "(cached) " >&6
30463else
30464  ac_check_lib_save_LIBS=$LIBS
30465LIBS="-ldnet_stub  $LIBS"
30466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30467/* end confdefs.h.  */
30468
30469/* Override any GCC internal prototype to avoid an error.
30470   Use char because int might match the return type of a GCC
30471   builtin and then its argument prototype would still apply.  */
30472#ifdef __cplusplus
30473extern "C"
30474#endif
30475char dnet_ntoa ();
30476int
30477main ()
30478{
30479return dnet_ntoa ();
30480  ;
30481  return 0;
30482}
30483_ACEOF
30484if ac_fn_cxx_try_link "$LINENO"; then :
30485  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30486else
30487  ac_cv_lib_dnet_stub_dnet_ntoa=no
30488fi
30489rm -f core conftest.err conftest.$ac_objext \
30490    conftest$ac_exeext conftest.$ac_ext
30491LIBS=$ac_check_lib_save_LIBS
30492fi
30493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30494$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30495if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30496  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30497fi
30498
30499    fi
30500fi
30501rm -f core conftest.err conftest.$ac_objext \
30502    conftest$ac_exeext conftest.$ac_ext
30503    LIBS="$ac_xsave_LIBS"
30504
30505    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30506    # to get the SysV transport functions.
30507    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30508    # needs -lnsl.
30509    # The nsl library prevents programs from opening the X display
30510    # on Irix 5.2, according to T.E. Dickey.
30511    # The functions gethostbyname, getservbyname, and inet_addr are
30512    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30513    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30514if test "x$ac_cv_func_gethostbyname" = xyes; then :
30515
30516fi
30517
30518    if test $ac_cv_func_gethostbyname = no; then
30519      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30520$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30521if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30522  $as_echo_n "(cached) " >&6
30523else
30524  ac_check_lib_save_LIBS=$LIBS
30525LIBS="-lnsl  $LIBS"
30526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30527/* end confdefs.h.  */
30528
30529/* Override any GCC internal prototype to avoid an error.
30530   Use char because int might match the return type of a GCC
30531   builtin and then its argument prototype would still apply.  */
30532#ifdef __cplusplus
30533extern "C"
30534#endif
30535char gethostbyname ();
30536int
30537main ()
30538{
30539return gethostbyname ();
30540  ;
30541  return 0;
30542}
30543_ACEOF
30544if ac_fn_cxx_try_link "$LINENO"; then :
30545  ac_cv_lib_nsl_gethostbyname=yes
30546else
30547  ac_cv_lib_nsl_gethostbyname=no
30548fi
30549rm -f core conftest.err conftest.$ac_objext \
30550    conftest$ac_exeext conftest.$ac_ext
30551LIBS=$ac_check_lib_save_LIBS
30552fi
30553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30554$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30555if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30556  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30557fi
30558
30559      if test $ac_cv_lib_nsl_gethostbyname = no; then
30560	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30561$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30562if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30563  $as_echo_n "(cached) " >&6
30564else
30565  ac_check_lib_save_LIBS=$LIBS
30566LIBS="-lbsd  $LIBS"
30567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30568/* end confdefs.h.  */
30569
30570/* Override any GCC internal prototype to avoid an error.
30571   Use char because int might match the return type of a GCC
30572   builtin and then its argument prototype would still apply.  */
30573#ifdef __cplusplus
30574extern "C"
30575#endif
30576char gethostbyname ();
30577int
30578main ()
30579{
30580return gethostbyname ();
30581  ;
30582  return 0;
30583}
30584_ACEOF
30585if ac_fn_cxx_try_link "$LINENO"; then :
30586  ac_cv_lib_bsd_gethostbyname=yes
30587else
30588  ac_cv_lib_bsd_gethostbyname=no
30589fi
30590rm -f core conftest.err conftest.$ac_objext \
30591    conftest$ac_exeext conftest.$ac_ext
30592LIBS=$ac_check_lib_save_LIBS
30593fi
30594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30595$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30596if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30597  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30598fi
30599
30600      fi
30601    fi
30602
30603    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30604    # socket/setsockopt and other routines are undefined under SCO ODT
30605    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30606    # on later versions), says Simon Leinen: it contains gethostby*
30607    # variants that don't use the name server (or something).  -lsocket
30608    # must be given before -lnsl if both are needed.  We assume that
30609    # if connect needs -lnsl, so does gethostbyname.
30610    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30611if test "x$ac_cv_func_connect" = xyes; then :
30612
30613fi
30614
30615    if test $ac_cv_func_connect = no; then
30616      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30617$as_echo_n "checking for connect in -lsocket... " >&6; }
30618if ${ac_cv_lib_socket_connect+:} false; then :
30619  $as_echo_n "(cached) " >&6
30620else
30621  ac_check_lib_save_LIBS=$LIBS
30622LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30624/* end confdefs.h.  */
30625
30626/* Override any GCC internal prototype to avoid an error.
30627   Use char because int might match the return type of a GCC
30628   builtin and then its argument prototype would still apply.  */
30629#ifdef __cplusplus
30630extern "C"
30631#endif
30632char connect ();
30633int
30634main ()
30635{
30636return connect ();
30637  ;
30638  return 0;
30639}
30640_ACEOF
30641if ac_fn_cxx_try_link "$LINENO"; then :
30642  ac_cv_lib_socket_connect=yes
30643else
30644  ac_cv_lib_socket_connect=no
30645fi
30646rm -f core conftest.err conftest.$ac_objext \
30647    conftest$ac_exeext conftest.$ac_ext
30648LIBS=$ac_check_lib_save_LIBS
30649fi
30650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30651$as_echo "$ac_cv_lib_socket_connect" >&6; }
30652if test "x$ac_cv_lib_socket_connect" = xyes; then :
30653  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30654fi
30655
30656    fi
30657
30658    # Guillermo Gomez says -lposix is necessary on A/UX.
30659    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30660if test "x$ac_cv_func_remove" = xyes; then :
30661
30662fi
30663
30664    if test $ac_cv_func_remove = no; then
30665      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30666$as_echo_n "checking for remove in -lposix... " >&6; }
30667if ${ac_cv_lib_posix_remove+:} false; then :
30668  $as_echo_n "(cached) " >&6
30669else
30670  ac_check_lib_save_LIBS=$LIBS
30671LIBS="-lposix  $LIBS"
30672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30673/* end confdefs.h.  */
30674
30675/* Override any GCC internal prototype to avoid an error.
30676   Use char because int might match the return type of a GCC
30677   builtin and then its argument prototype would still apply.  */
30678#ifdef __cplusplus
30679extern "C"
30680#endif
30681char remove ();
30682int
30683main ()
30684{
30685return remove ();
30686  ;
30687  return 0;
30688}
30689_ACEOF
30690if ac_fn_cxx_try_link "$LINENO"; then :
30691  ac_cv_lib_posix_remove=yes
30692else
30693  ac_cv_lib_posix_remove=no
30694fi
30695rm -f core conftest.err conftest.$ac_objext \
30696    conftest$ac_exeext conftest.$ac_ext
30697LIBS=$ac_check_lib_save_LIBS
30698fi
30699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30700$as_echo "$ac_cv_lib_posix_remove" >&6; }
30701if test "x$ac_cv_lib_posix_remove" = xyes; then :
30702  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30703fi
30704
30705    fi
30706
30707    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30708    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30709if test "x$ac_cv_func_shmat" = xyes; then :
30710
30711fi
30712
30713    if test $ac_cv_func_shmat = no; then
30714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30715$as_echo_n "checking for shmat in -lipc... " >&6; }
30716if ${ac_cv_lib_ipc_shmat+:} false; then :
30717  $as_echo_n "(cached) " >&6
30718else
30719  ac_check_lib_save_LIBS=$LIBS
30720LIBS="-lipc  $LIBS"
30721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30722/* end confdefs.h.  */
30723
30724/* Override any GCC internal prototype to avoid an error.
30725   Use char because int might match the return type of a GCC
30726   builtin and then its argument prototype would still apply.  */
30727#ifdef __cplusplus
30728extern "C"
30729#endif
30730char shmat ();
30731int
30732main ()
30733{
30734return shmat ();
30735  ;
30736  return 0;
30737}
30738_ACEOF
30739if ac_fn_cxx_try_link "$LINENO"; then :
30740  ac_cv_lib_ipc_shmat=yes
30741else
30742  ac_cv_lib_ipc_shmat=no
30743fi
30744rm -f core conftest.err conftest.$ac_objext \
30745    conftest$ac_exeext conftest.$ac_ext
30746LIBS=$ac_check_lib_save_LIBS
30747fi
30748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30749$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30750if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30751  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30752fi
30753
30754    fi
30755  fi
30756
30757  # Check for libraries that X11R6 Xt/Xaw programs need.
30758  ac_save_LDFLAGS=$LDFLAGS
30759  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30760  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30761  # check for ICE first), but we must link in the order -lSM -lICE or
30762  # we get undefined symbols.  So assume we have SM if we have ICE.
30763  # These have to be linked with before -lX11, unlike the other
30764  # libraries we check for below, so use a different variable.
30765  # John Interrante, Karl Berry
30766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30767$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30768if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30769  $as_echo_n "(cached) " >&6
30770else
30771  ac_check_lib_save_LIBS=$LIBS
30772LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30774/* end confdefs.h.  */
30775
30776/* Override any GCC internal prototype to avoid an error.
30777   Use char because int might match the return type of a GCC
30778   builtin and then its argument prototype would still apply.  */
30779#ifdef __cplusplus
30780extern "C"
30781#endif
30782char IceConnectionNumber ();
30783int
30784main ()
30785{
30786return IceConnectionNumber ();
30787  ;
30788  return 0;
30789}
30790_ACEOF
30791if ac_fn_cxx_try_link "$LINENO"; then :
30792  ac_cv_lib_ICE_IceConnectionNumber=yes
30793else
30794  ac_cv_lib_ICE_IceConnectionNumber=no
30795fi
30796rm -f core conftest.err conftest.$ac_objext \
30797    conftest$ac_exeext conftest.$ac_ext
30798LIBS=$ac_check_lib_save_LIBS
30799fi
30800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30801$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30802if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30803  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30804fi
30805
30806  LDFLAGS=$ac_save_LDFLAGS
30807
30808fi
30809
30810
30811  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30812  # this doesn't make sense so we remove it.
30813  if test "x$COMPILE_TYPE" = xcross; then
30814    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30815  fi
30816
30817  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30818
30819  # Print a helpful message on how to acquire the necessary build dependency.
30820  # x11 is the help tag: freetype, cups, pulse, alsa etc
30821  MISSING_DEPENDENCY=x11
30822
30823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30824    cygwin_help $MISSING_DEPENDENCY
30825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30826    msys_help $MISSING_DEPENDENCY
30827  else
30828    PKGHANDLER_COMMAND=
30829
30830    case $PKGHANDLER in
30831      apt-get)
30832        apt_help     $MISSING_DEPENDENCY ;;
30833      yum)
30834        yum_help     $MISSING_DEPENDENCY ;;
30835      port)
30836        port_help    $MISSING_DEPENDENCY ;;
30837      pkgutil)
30838        pkgutil_help $MISSING_DEPENDENCY ;;
30839      pkgadd)
30840        pkgadd_help  $MISSING_DEPENDENCY ;;
30841      * )
30842        break ;;
30843    esac
30844
30845    if test "x$PKGHANDLER_COMMAND" != x; then
30846      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30847    fi
30848  fi
30849
30850    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30851  fi
30852
30853  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30854    OPENWIN_HOME="/usr/openwin"
30855  fi
30856
30857
30858
30859  #
30860  # Weird Sol10 something check...TODO change to try compile
30861  #
30862  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30863    if test "`uname -r`" = "5.10"; then
30864      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30865        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30866      fi
30867    fi
30868  fi
30869
30870  ac_ext=c
30871ac_cpp='$CPP $CPPFLAGS'
30872ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30873ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30874ac_compiler_gnu=$ac_cv_c_compiler_gnu
30875
30876  OLD_CFLAGS="$CFLAGS"
30877  CFLAGS="$CFLAGS $X_CFLAGS"
30878
30879  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30880  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30881do :
30882  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30883ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30884        # include <X11/Xlib.h>
30885        # include <X11/Xutil.h>
30886
30887
30888"
30889if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30890  cat >>confdefs.h <<_ACEOF
30891#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30892_ACEOF
30893 X11_A_OK=yes
30894else
30895  X11_A_OK=no; break
30896fi
30897
30898done
30899
30900
30901  CFLAGS="$OLD_CFLAGS"
30902  ac_ext=cpp
30903ac_cpp='$CXXCPP $CPPFLAGS'
30904ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30905ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30906ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30907
30908
30909  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30910
30911  # Print a helpful message on how to acquire the necessary build dependency.
30912  # x11 is the help tag: freetype, cups, pulse, alsa etc
30913  MISSING_DEPENDENCY=x11
30914
30915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30916    cygwin_help $MISSING_DEPENDENCY
30917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30918    msys_help $MISSING_DEPENDENCY
30919  else
30920    PKGHANDLER_COMMAND=
30921
30922    case $PKGHANDLER in
30923      apt-get)
30924        apt_help     $MISSING_DEPENDENCY ;;
30925      yum)
30926        yum_help     $MISSING_DEPENDENCY ;;
30927      port)
30928        port_help    $MISSING_DEPENDENCY ;;
30929      pkgutil)
30930        pkgutil_help $MISSING_DEPENDENCY ;;
30931      pkgadd)
30932        pkgadd_help  $MISSING_DEPENDENCY ;;
30933      * )
30934        break ;;
30935    esac
30936
30937    if test "x$PKGHANDLER_COMMAND" != x; then
30938      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30939    fi
30940  fi
30941
30942    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30943  fi
30944
30945
30946
30947
30948
30949
30950  ###############################################################################
30951  #
30952  # The common unix printing system cups is used to print from java.
30953  #
30954
30955# Check whether --with-cups was given.
30956if test "${with_cups+set}" = set; then :
30957  withval=$with_cups;
30958fi
30959
30960
30961# Check whether --with-cups-include was given.
30962if test "${with_cups_include+set}" = set; then :
30963  withval=$with_cups_include;
30964fi
30965
30966
30967  if test "x$CUPS_NOT_NEEDED" = xyes; then
30968    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30969      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30970$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30971    fi
30972    CUPS_CFLAGS=
30973  else
30974    CUPS_FOUND=no
30975
30976    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30977      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30978    fi
30979
30980    if test "x${with_cups}" != x; then
30981      CUPS_CFLAGS="-I${with_cups}/include"
30982      CUPS_FOUND=yes
30983    fi
30984    if test "x${with_cups_include}" != x; then
30985      CUPS_CFLAGS="-I${with_cups_include}"
30986      CUPS_FOUND=yes
30987    fi
30988    if test "x$CUPS_FOUND" = xno; then
30989
30990
30991  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30992    # Source the builddeps file again, to make sure it uses the latest variables!
30993    . $builddepsfile
30994    # Look for a target and build machine specific resource!
30995    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30996    if test "x$resource" = x; then
30997      # Ok, lets instead look for a target specific resource
30998      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30999    fi
31000    if test "x$resource" = x; then
31001      # Ok, lets instead look for a build specific resource
31002      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31003    fi
31004    if test "x$resource" = x; then
31005      # Ok, lets instead look for a generic resource
31006      # (The cups comes from M4 and not the shell, thus no need for eval here.)
31007      resource=${builddep_cups}
31008    fi
31009    if test "x$resource" != x; then
31010      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31011$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31012      # If the resource in the builddeps.conf file is an existing directory,
31013      # for example /java/linux/cups
31014      if test -d ${resource}; then
31015        depdir=${resource}
31016      else
31017
31018  # cups is for example mymodule
31019  # $resource is for example libs/general/libmymod_1_2_3.zip
31020  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31021  # $with_builddeps_dir is for example /localhome/builddeps
31022  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31023  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31024  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31025  filename=`basename $resource`
31026  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31027  filebase=${filename%%.*}
31028  extension=${filename#*.}
31029  installdir=$with_builddeps_dir/$filebase
31030  if test ! -f $installdir/$filename.unpacked; then
31031    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31032$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31033    if test ! -d $installdir; then
31034      mkdir -p $installdir
31035    fi
31036    if test ! -d $installdir; then
31037      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31038    fi
31039    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31040    touch $tmpfile
31041    if test ! -f $tmpfile; then
31042      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31043    fi
31044
31045  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31046  # $tmpfile is the local file name for the downloaded file.
31047  VALID_TOOL=no
31048  if test "x$BDEPS_FTP" = xwget; then
31049    VALID_TOOL=yes
31050    wget -O $tmpfile $with_builddeps_server/$resource
31051  fi
31052  if test "x$BDEPS_FTP" = xlftp; then
31053    VALID_TOOL=yes
31054    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31055  fi
31056  if test "x$BDEPS_FTP" = xftp; then
31057    VALID_TOOL=yes
31058    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31059    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31060    FTPUSERPWD=${FTPSERVER%%@*}
31061    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31062      FTPUSER=${userpwd%%:*}
31063      FTPPWD=${userpwd#*@}
31064      FTPSERVER=${FTPSERVER#*@}
31065    else
31066      FTPUSER=ftp
31067      FTPPWD=ftp
31068    fi
31069    # the "pass" command does not work on some
31070    # ftp clients (read ftp.exe) but if it works,
31071    # passive mode is better!
31072    ( \
31073        echo "user $FTPUSER $FTPPWD"        ; \
31074        echo "pass"                         ; \
31075        echo "bin"                          ; \
31076        echo "get $FTPPATH $tmpfile"              ; \
31077    ) | ftp -in $FTPSERVER
31078  fi
31079  if test "x$VALID_TOOL" != xyes; then
31080    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31081  fi
31082
31083    mv $tmpfile $installdir/$filename
31084    if test ! -s $installdir/$filename; then
31085      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31086    fi
31087    case "$extension" in
31088      zip)  echo "Unzipping $installdir/$filename..."
31089        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31090        ;;
31091      tar.gz) echo "Untaring $installdir/$filename..."
31092        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31093        ;;
31094      tgz) echo "Untaring $installdir/$filename..."
31095        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31096        ;;
31097      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31098        ;;
31099    esac
31100  fi
31101  if test -f $installdir/$filename.unpacked; then
31102    depdir=$installdir
31103  fi
31104
31105      fi
31106      # Source the builddeps file again, because in the previous command, the depdir
31107      # was updated to point at the current build dependency install directory.
31108      . $builddepsfile
31109      # Now extract variables from the builddeps.conf files.
31110      theroot=${builddep_cups_ROOT}
31111      thecflags=${builddep_cups_CFLAGS}
31112      thelibs=${builddep_cups_LIBS}
31113      if test "x$depdir" = x; then
31114        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31115      fi
31116      CUPS=$depdir
31117      if test "x$theroot" != x; then
31118        CUPS="$theroot"
31119      fi
31120      if test "x$thecflags" != x; then
31121        CUPS_CFLAGS="$thecflags"
31122      fi
31123      if test "x$thelibs" != x; then
31124        CUPS_LIBS="$thelibs"
31125      fi
31126      CUPS_FOUND=yes
31127
31128    fi
31129
31130  fi
31131
31132    fi
31133    if test "x$CUPS_FOUND" = xno; then
31134      # Are the cups headers installed in the default /usr/include location?
31135      for ac_header in cups/cups.h cups/ppd.h
31136do :
31137  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31138ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31139if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31140  cat >>confdefs.h <<_ACEOF
31141#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31142_ACEOF
31143
31144            CUPS_FOUND=yes
31145            CUPS_CFLAGS=
31146            DEFAULT_CUPS=yes
31147
31148
31149fi
31150
31151done
31152
31153    fi
31154    if test "x$CUPS_FOUND" = xno; then
31155      # Getting nervous now? Lets poke around for standard Solaris third-party
31156      # package installation locations.
31157      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31158$as_echo_n "checking for cups headers... " >&6; }
31159      if test -s /opt/sfw/cups/include/cups/cups.h; then
31160        # An SFW package seems to be installed!
31161        CUPS_FOUND=yes
31162        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31163      elif test -s /opt/csw/include/cups/cups.h; then
31164        # A CSW package seems to be installed!
31165        CUPS_FOUND=yes
31166        CUPS_CFLAGS="-I/opt/csw/include"
31167      fi
31168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31169$as_echo "$CUPS_FOUND" >&6; }
31170    fi
31171    if test "x$CUPS_FOUND" = xno; then
31172
31173  # Print a helpful message on how to acquire the necessary build dependency.
31174  # cups is the help tag: freetype, cups, pulse, alsa etc
31175  MISSING_DEPENDENCY=cups
31176
31177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31178    cygwin_help $MISSING_DEPENDENCY
31179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31180    msys_help $MISSING_DEPENDENCY
31181  else
31182    PKGHANDLER_COMMAND=
31183
31184    case $PKGHANDLER in
31185      apt-get)
31186        apt_help     $MISSING_DEPENDENCY ;;
31187      yum)
31188        yum_help     $MISSING_DEPENDENCY ;;
31189      port)
31190        port_help    $MISSING_DEPENDENCY ;;
31191      pkgutil)
31192        pkgutil_help $MISSING_DEPENDENCY ;;
31193      pkgadd)
31194        pkgadd_help  $MISSING_DEPENDENCY ;;
31195      * )
31196        break ;;
31197    esac
31198
31199    if test "x$PKGHANDLER_COMMAND" != x; then
31200      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31201    fi
31202  fi
31203
31204      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31205    fi
31206  fi
31207
31208
31209
31210
31211
31212
31213  ###############################################################################
31214  #
31215  # The ubiquitous freetype library is used to render fonts.
31216  #
31217
31218# Check whether --with-freetype was given.
31219if test "${with_freetype+set}" = set; then :
31220  withval=$with_freetype;
31221fi
31222
31223
31224# Check whether --with-freetype-include was given.
31225if test "${with_freetype_include+set}" = set; then :
31226  withval=$with_freetype_include;
31227fi
31228
31229
31230# Check whether --with-freetype-lib was given.
31231if test "${with_freetype_lib+set}" = set; then :
31232  withval=$with_freetype_lib;
31233fi
31234
31235  # Check whether --enable-freetype-bundling was given.
31236if test "${enable_freetype_bundling+set}" = set; then :
31237  enableval=$enable_freetype_bundling;
31238fi
31239
31240
31241  FREETYPE_CFLAGS=
31242  FREETYPE_LIBS=
31243  FREETYPE_BUNDLE_LIB_PATH=
31244
31245  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31246    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31247      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31248$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31249    fi
31250    if test "x$enable_freetype_bundling" != x; then
31251      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31252$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31253    fi
31254  else
31255    # freetype is needed to build; go get it!
31256
31257    BUNDLE_FREETYPE="$enable_freetype_bundling"
31258
31259    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31260      # User has specified settings
31261
31262      if test "x$BUNDLE_FREETYPE" = x; then
31263        # If not specified, default is to bundle freetype
31264        BUNDLE_FREETYPE=yes
31265      fi
31266
31267      if test "x$with_freetype" != x; then
31268        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31269        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31270      fi
31271
31272      # Allow --with-freetype-lib and --with-freetype-include to override
31273      if test "x$with_freetype_include" != x; then
31274        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31275      fi
31276      if test "x$with_freetype_lib" != x; then
31277        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31278      fi
31279
31280      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31281        # Okay, we got it. Check that it works.
31282
31283  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31284  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31285  METHOD="--with-freetype"
31286
31287  # First check if the files exists.
31288  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31289    # We found an arbitrary include file. That's a good sign.
31290    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31291$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31292    FOUND_FREETYPE=yes
31293
31294    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31295    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31296      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31297$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31298      FOUND_FREETYPE=no
31299    else
31300      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31301        # On Windows, we will need both .lib and .dll file.
31302        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31303          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31304$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31305          FOUND_FREETYPE=no
31306        fi
31307      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
31308        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31309        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31310      fi
31311    fi
31312  fi
31313
31314  if test "x$FOUND_FREETYPE" = xyes; then
31315
31316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31317
31318  # Input might be given as Windows format, start by converting to
31319  # unix format.
31320  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31321  new_path=`$CYGPATH -u "$path"`
31322
31323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31326  # "foo.exe" is OK but "foo" is an error.
31327  #
31328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31329  # It is also a way to make sure we got the proper file name for the real test later on.
31330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31331  if test "x$test_shortpath" = x; then
31332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31334    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31335  fi
31336
31337  # Call helper function which possibly converts this using DOS-style short mode.
31338  # If so, the updated path is stored in $new_path.
31339
31340  input_path="$new_path"
31341  # Check if we need to convert this using DOS-style short mode. If the path
31342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31343  # take no chances and rewrite it.
31344  # Note: m4 eats our [], so we need to use [ and ] instead.
31345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31346  if test "x$has_forbidden_chars" != x; then
31347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31351      # Going to short mode and back again did indeed matter. Since short mode is
31352      # case insensitive, let's make it lowercase to improve readability.
31353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31354      # Now convert it back to Unix-stile (cygpath)
31355      input_path=`$CYGPATH -u "$shortmode_path"`
31356      new_path="$input_path"
31357    fi
31358  fi
31359
31360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31361  if test "x$test_cygdrive_prefix" = x; then
31362    # As a simple fix, exclude /usr/bin since it's not a real path.
31363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31365      # a path prefixed by /cygdrive for fixpath to work.
31366      new_path="$CYGWIN_ROOT_PATH$input_path"
31367    fi
31368  fi
31369
31370
31371  if test "x$path" != "x$new_path"; then
31372    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31374$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31375  fi
31376
31377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31378
31379  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31380  has_colon=`$ECHO $path | $GREP ^.:`
31381  new_path="$path"
31382  if test "x$has_colon" = x; then
31383    # Not in mixed or Windows style, start by that.
31384    new_path=`cmd //c echo $path`
31385  fi
31386
31387
31388  input_path="$new_path"
31389  # Check if we need to convert this using DOS-style short mode. If the path
31390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31391  # take no chances and rewrite it.
31392  # Note: m4 eats our [], so we need to use [ and ] instead.
31393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31394  if test "x$has_forbidden_chars" != x; then
31395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31397  fi
31398
31399
31400  windows_path="$new_path"
31401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31402    unix_path=`$CYGPATH -u "$windows_path"`
31403    new_path="$unix_path"
31404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31406    new_path="$unix_path"
31407  fi
31408
31409  if test "x$path" != "x$new_path"; then
31410    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31413  fi
31414
31415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31417
31418  else
31419    # We're on a posix platform. Hooray! :)
31420    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31421    has_space=`$ECHO "$path" | $GREP " "`
31422    if test "x$has_space" != x; then
31423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31425      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31426    fi
31427
31428    # Use eval to expand a potential ~
31429    eval path="$path"
31430    if test ! -f "$path" && test ! -d "$path"; then
31431      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31432    fi
31433
31434    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31435  fi
31436
31437
31438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31439
31440  # Input might be given as Windows format, start by converting to
31441  # unix format.
31442  path="$POTENTIAL_FREETYPE_LIB_PATH"
31443  new_path=`$CYGPATH -u "$path"`
31444
31445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31448  # "foo.exe" is OK but "foo" is an error.
31449  #
31450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31451  # It is also a way to make sure we got the proper file name for the real test later on.
31452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31453  if test "x$test_shortpath" = x; then
31454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31455$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31456    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31457  fi
31458
31459  # Call helper function which possibly converts this using DOS-style short mode.
31460  # If so, the updated path is stored in $new_path.
31461
31462  input_path="$new_path"
31463  # Check if we need to convert this using DOS-style short mode. If the path
31464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31465  # take no chances and rewrite it.
31466  # Note: m4 eats our [], so we need to use [ and ] instead.
31467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31468  if test "x$has_forbidden_chars" != x; then
31469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31473      # Going to short mode and back again did indeed matter. Since short mode is
31474      # case insensitive, let's make it lowercase to improve readability.
31475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31476      # Now convert it back to Unix-stile (cygpath)
31477      input_path=`$CYGPATH -u "$shortmode_path"`
31478      new_path="$input_path"
31479    fi
31480  fi
31481
31482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31483  if test "x$test_cygdrive_prefix" = x; then
31484    # As a simple fix, exclude /usr/bin since it's not a real path.
31485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31487      # a path prefixed by /cygdrive for fixpath to work.
31488      new_path="$CYGWIN_ROOT_PATH$input_path"
31489    fi
31490  fi
31491
31492
31493  if test "x$path" != "x$new_path"; then
31494    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31496$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31497  fi
31498
31499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31500
31501  path="$POTENTIAL_FREETYPE_LIB_PATH"
31502  has_colon=`$ECHO $path | $GREP ^.:`
31503  new_path="$path"
31504  if test "x$has_colon" = x; then
31505    # Not in mixed or Windows style, start by that.
31506    new_path=`cmd //c echo $path`
31507  fi
31508
31509
31510  input_path="$new_path"
31511  # Check if we need to convert this using DOS-style short mode. If the path
31512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31513  # take no chances and rewrite it.
31514  # Note: m4 eats our [], so we need to use [ and ] instead.
31515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31516  if test "x$has_forbidden_chars" != x; then
31517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31519  fi
31520
31521
31522  windows_path="$new_path"
31523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31524    unix_path=`$CYGPATH -u "$windows_path"`
31525    new_path="$unix_path"
31526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31528    new_path="$unix_path"
31529  fi
31530
31531  if test "x$path" != "x$new_path"; then
31532    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31534$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31535  fi
31536
31537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31539
31540  else
31541    # We're on a posix platform. Hooray! :)
31542    path="$POTENTIAL_FREETYPE_LIB_PATH"
31543    has_space=`$ECHO "$path" | $GREP " "`
31544    if test "x$has_space" != x; then
31545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31546$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31547      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31548    fi
31549
31550    # Use eval to expand a potential ~
31551    eval path="$path"
31552    if test ! -f "$path" && test ! -d "$path"; then
31553      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31554    fi
31555
31556    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31557  fi
31558
31559
31560    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31562$as_echo_n "checking for freetype includes... " >&6; }
31563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31564$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31565    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31567$as_echo_n "checking for freetype libraries... " >&6; }
31568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31569$as_echo "$FREETYPE_LIB_PATH" >&6; }
31570  fi
31571
31572        if test "x$FOUND_FREETYPE" != xyes; then
31573          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31574        fi
31575      else
31576        # User specified only one of lib or include. This is an error.
31577        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31578          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31579$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31580          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31581        else
31582          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31583$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31584          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31585        fi
31586      fi
31587    else
31588      # User did not specify settings, but we need freetype. Try to locate it.
31589
31590      if test "x$BUNDLE_FREETYPE" = x; then
31591        # If not specified, default is to bundle freetype only on windows
31592        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31593          BUNDLE_FREETYPE=yes
31594        else
31595          BUNDLE_FREETYPE=no
31596        fi
31597      fi
31598
31599      if test "x$FOUND_FREETYPE" != xyes; then
31600        # Check builddeps
31601
31602
31603  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31604    # Source the builddeps file again, to make sure it uses the latest variables!
31605    . $builddepsfile
31606    # Look for a target and build machine specific resource!
31607    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31608    if test "x$resource" = x; then
31609      # Ok, lets instead look for a target specific resource
31610      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31611    fi
31612    if test "x$resource" = x; then
31613      # Ok, lets instead look for a build specific resource
31614      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31615    fi
31616    if test "x$resource" = x; then
31617      # Ok, lets instead look for a generic resource
31618      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31619      resource=${builddep_freetype2}
31620    fi
31621    if test "x$resource" != x; then
31622      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31623$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31624      # If the resource in the builddeps.conf file is an existing directory,
31625      # for example /java/linux/cups
31626      if test -d ${resource}; then
31627        depdir=${resource}
31628      else
31629
31630  # freetype2 is for example mymodule
31631  # $resource is for example libs/general/libmymod_1_2_3.zip
31632  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31633  # $with_builddeps_dir is for example /localhome/builddeps
31634  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31635  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31636  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31637  filename=`basename $resource`
31638  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31639  filebase=${filename%%.*}
31640  extension=${filename#*.}
31641  installdir=$with_builddeps_dir/$filebase
31642  if test ! -f $installdir/$filename.unpacked; then
31643    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31644$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31645    if test ! -d $installdir; then
31646      mkdir -p $installdir
31647    fi
31648    if test ! -d $installdir; then
31649      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31650    fi
31651    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31652    touch $tmpfile
31653    if test ! -f $tmpfile; then
31654      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31655    fi
31656
31657  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31658  # $tmpfile is the local file name for the downloaded file.
31659  VALID_TOOL=no
31660  if test "x$BDEPS_FTP" = xwget; then
31661    VALID_TOOL=yes
31662    wget -O $tmpfile $with_builddeps_server/$resource
31663  fi
31664  if test "x$BDEPS_FTP" = xlftp; then
31665    VALID_TOOL=yes
31666    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31667  fi
31668  if test "x$BDEPS_FTP" = xftp; then
31669    VALID_TOOL=yes
31670    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31671    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31672    FTPUSERPWD=${FTPSERVER%%@*}
31673    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31674      FTPUSER=${userpwd%%:*}
31675      FTPPWD=${userpwd#*@}
31676      FTPSERVER=${FTPSERVER#*@}
31677    else
31678      FTPUSER=ftp
31679      FTPPWD=ftp
31680    fi
31681    # the "pass" command does not work on some
31682    # ftp clients (read ftp.exe) but if it works,
31683    # passive mode is better!
31684    ( \
31685        echo "user $FTPUSER $FTPPWD"        ; \
31686        echo "pass"                         ; \
31687        echo "bin"                          ; \
31688        echo "get $FTPPATH $tmpfile"              ; \
31689    ) | ftp -in $FTPSERVER
31690  fi
31691  if test "x$VALID_TOOL" != xyes; then
31692    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31693  fi
31694
31695    mv $tmpfile $installdir/$filename
31696    if test ! -s $installdir/$filename; then
31697      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31698    fi
31699    case "$extension" in
31700      zip)  echo "Unzipping $installdir/$filename..."
31701        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31702        ;;
31703      tar.gz) echo "Untaring $installdir/$filename..."
31704        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31705        ;;
31706      tgz) echo "Untaring $installdir/$filename..."
31707        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31708        ;;
31709      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31710        ;;
31711    esac
31712  fi
31713  if test -f $installdir/$filename.unpacked; then
31714    depdir=$installdir
31715  fi
31716
31717      fi
31718      # Source the builddeps file again, because in the previous command, the depdir
31719      # was updated to point at the current build dependency install directory.
31720      . $builddepsfile
31721      # Now extract variables from the builddeps.conf files.
31722      theroot=${builddep_freetype2_ROOT}
31723      thecflags=${builddep_freetype2_CFLAGS}
31724      thelibs=${builddep_freetype2_LIBS}
31725      if test "x$depdir" = x; then
31726        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31727      fi
31728      FREETYPE=$depdir
31729      if test "x$theroot" != x; then
31730        FREETYPE="$theroot"
31731      fi
31732      if test "x$thecflags" != x; then
31733        FREETYPE_CFLAGS="$thecflags"
31734      fi
31735      if test "x$thelibs" != x; then
31736        FREETYPE_LIBS="$thelibs"
31737      fi
31738      FOUND_FREETYPE=yes
31739      else FOUND_FREETYPE=no
31740
31741    fi
31742    else FOUND_FREETYPE=no
31743
31744  fi
31745
31746        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31747        if test "x$FOUND_FREETYPE" = xyes; then
31748          if test "x$BUNDLE_FREETYPE" = xyes; then
31749            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31750$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31751            FOUND_FREETYPE=no
31752          else
31753            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31754$as_echo_n "checking for freetype... " >&6; }
31755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31756$as_echo "yes (using builddeps)" >&6; }
31757          fi
31758        fi
31759      fi
31760
31761      if test "x$FOUND_FREETYPE" != xyes; then
31762        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31763        if test "x$PKG_CONFIG" != x; then
31764
31765pkg_failed=no
31766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31767$as_echo_n "checking for FREETYPE... " >&6; }
31768
31769if test -n "$FREETYPE_CFLAGS"; then
31770    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
31771 elif test -n "$PKG_CONFIG"; then
31772    if test -n "$PKG_CONFIG" && \
31773    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31774  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31775  ac_status=$?
31776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31777  test $ac_status = 0; }; then
31778  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31779else
31780  pkg_failed=yes
31781fi
31782 else
31783    pkg_failed=untried
31784fi
31785if test -n "$FREETYPE_LIBS"; then
31786    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
31787 elif test -n "$PKG_CONFIG"; then
31788    if test -n "$PKG_CONFIG" && \
31789    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31790  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31791  ac_status=$?
31792  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31793  test $ac_status = 0; }; then
31794  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31795else
31796  pkg_failed=yes
31797fi
31798 else
31799    pkg_failed=untried
31800fi
31801
31802
31803
31804if test $pkg_failed = yes; then
31805
31806if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31807        _pkg_short_errors_supported=yes
31808else
31809        _pkg_short_errors_supported=no
31810fi
31811        if test $_pkg_short_errors_supported = yes; then
31812	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31813        else
31814	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31815        fi
31816	# Put the nasty error message in config.log where it belongs
31817	echo "$FREETYPE_PKG_ERRORS" >&5
31818
31819	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31820$as_echo "no" >&6; }
31821                FOUND_FREETYPE=no
31822elif test $pkg_failed = untried; then
31823	FOUND_FREETYPE=no
31824else
31825	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
31826	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
31827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31828$as_echo "yes" >&6; }
31829	FOUND_FREETYPE=yes
31830fi
31831          if test "x$FOUND_FREETYPE" = xyes; then
31832            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31833            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
31834            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31835            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31836              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
31837            fi
31838            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31839            if test "x$BUNDLE_FREETYPE" = xyes; then
31840              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
31841$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
31842              FOUND_FREETYPE=no
31843            else
31844              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31845$as_echo_n "checking for freetype... " >&6; }
31846              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
31847$as_echo "yes (using pkg-config)" >&6; }
31848            fi
31849          fi
31850        fi
31851      fi
31852
31853      if test "x$FOUND_FREETYPE" != xyes; then
31854        # Check in well-known locations
31855        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31856          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
31857
31858  windows_path="$FREETYPE_BASE_DIR"
31859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31860    unix_path=`$CYGPATH -u "$windows_path"`
31861    FREETYPE_BASE_DIR="$unix_path"
31862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31864    FREETYPE_BASE_DIR="$unix_path"
31865  fi
31866
31867
31868  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
31869  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
31870  METHOD="well-known location"
31871
31872  # First check if the files exists.
31873  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31874    # We found an arbitrary include file. That's a good sign.
31875    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31876$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31877    FOUND_FREETYPE=yes
31878
31879    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31880    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31881      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31882$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31883      FOUND_FREETYPE=no
31884    else
31885      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31886        # On Windows, we will need both .lib and .dll file.
31887        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31888          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31889$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31890          FOUND_FREETYPE=no
31891        fi
31892      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
31893        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31894        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31895      fi
31896    fi
31897  fi
31898
31899  if test "x$FOUND_FREETYPE" = xyes; then
31900
31901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31902
31903  # Input might be given as Windows format, start by converting to
31904  # unix format.
31905  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31906  new_path=`$CYGPATH -u "$path"`
31907
31908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31911  # "foo.exe" is OK but "foo" is an error.
31912  #
31913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31914  # It is also a way to make sure we got the proper file name for the real test later on.
31915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31916  if test "x$test_shortpath" = x; then
31917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31918$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31919    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31920  fi
31921
31922  # Call helper function which possibly converts this using DOS-style short mode.
31923  # If so, the updated path is stored in $new_path.
31924
31925  input_path="$new_path"
31926  # Check if we need to convert this using DOS-style short mode. If the path
31927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31928  # take no chances and rewrite it.
31929  # Note: m4 eats our [], so we need to use [ and ] instead.
31930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31931  if test "x$has_forbidden_chars" != x; then
31932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31936      # Going to short mode and back again did indeed matter. Since short mode is
31937      # case insensitive, let's make it lowercase to improve readability.
31938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31939      # Now convert it back to Unix-stile (cygpath)
31940      input_path=`$CYGPATH -u "$shortmode_path"`
31941      new_path="$input_path"
31942    fi
31943  fi
31944
31945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31946  if test "x$test_cygdrive_prefix" = x; then
31947    # As a simple fix, exclude /usr/bin since it's not a real path.
31948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31950      # a path prefixed by /cygdrive for fixpath to work.
31951      new_path="$CYGWIN_ROOT_PATH$input_path"
31952    fi
31953  fi
31954
31955
31956  if test "x$path" != "x$new_path"; then
31957    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31959$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31960  fi
31961
31962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31963
31964  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31965  has_colon=`$ECHO $path | $GREP ^.:`
31966  new_path="$path"
31967  if test "x$has_colon" = x; then
31968    # Not in mixed or Windows style, start by that.
31969    new_path=`cmd //c echo $path`
31970  fi
31971
31972
31973  input_path="$new_path"
31974  # Check if we need to convert this using DOS-style short mode. If the path
31975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31976  # take no chances and rewrite it.
31977  # Note: m4 eats our [], so we need to use [ and ] instead.
31978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31979  if test "x$has_forbidden_chars" != x; then
31980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31982  fi
31983
31984
31985  windows_path="$new_path"
31986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31987    unix_path=`$CYGPATH -u "$windows_path"`
31988    new_path="$unix_path"
31989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31991    new_path="$unix_path"
31992  fi
31993
31994  if test "x$path" != "x$new_path"; then
31995    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31997$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31998  fi
31999
32000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32002
32003  else
32004    # We're on a posix platform. Hooray! :)
32005    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32006    has_space=`$ECHO "$path" | $GREP " "`
32007    if test "x$has_space" != x; then
32008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32009$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32010      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32011    fi
32012
32013    # Use eval to expand a potential ~
32014    eval path="$path"
32015    if test ! -f "$path" && test ! -d "$path"; then
32016      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32017    fi
32018
32019    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32020  fi
32021
32022
32023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32024
32025  # Input might be given as Windows format, start by converting to
32026  # unix format.
32027  path="$POTENTIAL_FREETYPE_LIB_PATH"
32028  new_path=`$CYGPATH -u "$path"`
32029
32030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32033  # "foo.exe" is OK but "foo" is an error.
32034  #
32035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32036  # It is also a way to make sure we got the proper file name for the real test later on.
32037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32038  if test "x$test_shortpath" = x; then
32039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32041    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32042  fi
32043
32044  # Call helper function which possibly converts this using DOS-style short mode.
32045  # If so, the updated path is stored in $new_path.
32046
32047  input_path="$new_path"
32048  # Check if we need to convert this using DOS-style short mode. If the path
32049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32050  # take no chances and rewrite it.
32051  # Note: m4 eats our [], so we need to use [ and ] instead.
32052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32053  if test "x$has_forbidden_chars" != x; then
32054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32058      # Going to short mode and back again did indeed matter. Since short mode is
32059      # case insensitive, let's make it lowercase to improve readability.
32060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32061      # Now convert it back to Unix-stile (cygpath)
32062      input_path=`$CYGPATH -u "$shortmode_path"`
32063      new_path="$input_path"
32064    fi
32065  fi
32066
32067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32068  if test "x$test_cygdrive_prefix" = x; then
32069    # As a simple fix, exclude /usr/bin since it's not a real path.
32070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32072      # a path prefixed by /cygdrive for fixpath to work.
32073      new_path="$CYGWIN_ROOT_PATH$input_path"
32074    fi
32075  fi
32076
32077
32078  if test "x$path" != "x$new_path"; then
32079    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32081$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32082  fi
32083
32084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32085
32086  path="$POTENTIAL_FREETYPE_LIB_PATH"
32087  has_colon=`$ECHO $path | $GREP ^.:`
32088  new_path="$path"
32089  if test "x$has_colon" = x; then
32090    # Not in mixed or Windows style, start by that.
32091    new_path=`cmd //c echo $path`
32092  fi
32093
32094
32095  input_path="$new_path"
32096  # Check if we need to convert this using DOS-style short mode. If the path
32097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32098  # take no chances and rewrite it.
32099  # Note: m4 eats our [], so we need to use [ and ] instead.
32100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32101  if test "x$has_forbidden_chars" != x; then
32102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32104  fi
32105
32106
32107  windows_path="$new_path"
32108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32109    unix_path=`$CYGPATH -u "$windows_path"`
32110    new_path="$unix_path"
32111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32113    new_path="$unix_path"
32114  fi
32115
32116  if test "x$path" != "x$new_path"; then
32117    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32119$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32120  fi
32121
32122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32124
32125  else
32126    # We're on a posix platform. Hooray! :)
32127    path="$POTENTIAL_FREETYPE_LIB_PATH"
32128    has_space=`$ECHO "$path" | $GREP " "`
32129    if test "x$has_space" != x; then
32130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32132      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32133    fi
32134
32135    # Use eval to expand a potential ~
32136    eval path="$path"
32137    if test ! -f "$path" && test ! -d "$path"; then
32138      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32139    fi
32140
32141    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32142  fi
32143
32144
32145    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32147$as_echo_n "checking for freetype includes... " >&6; }
32148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32149$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32150    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32152$as_echo_n "checking for freetype libraries... " >&6; }
32153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32154$as_echo "$FREETYPE_LIB_PATH" >&6; }
32155  fi
32156
32157          if test "x$FOUND_FREETYPE" != xyes; then
32158            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32159
32160  windows_path="$FREETYPE_BASE_DIR"
32161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32162    unix_path=`$CYGPATH -u "$windows_path"`
32163    FREETYPE_BASE_DIR="$unix_path"
32164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32166    FREETYPE_BASE_DIR="$unix_path"
32167  fi
32168
32169
32170  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32171  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32172  METHOD="well-known location"
32173
32174  # First check if the files exists.
32175  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32176    # We found an arbitrary include file. That's a good sign.
32177    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32178$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32179    FOUND_FREETYPE=yes
32180
32181    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32182    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32183      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32184$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32185      FOUND_FREETYPE=no
32186    else
32187      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32188        # On Windows, we will need both .lib and .dll file.
32189        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32190          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32191$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32192          FOUND_FREETYPE=no
32193        fi
32194      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
32195        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32196        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32197      fi
32198    fi
32199  fi
32200
32201  if test "x$FOUND_FREETYPE" = xyes; then
32202
32203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32204
32205  # Input might be given as Windows format, start by converting to
32206  # unix format.
32207  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32208  new_path=`$CYGPATH -u "$path"`
32209
32210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32213  # "foo.exe" is OK but "foo" is an error.
32214  #
32215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32216  # It is also a way to make sure we got the proper file name for the real test later on.
32217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32218  if test "x$test_shortpath" = x; then
32219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32220$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32221    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32222  fi
32223
32224  # Call helper function which possibly converts this using DOS-style short mode.
32225  # If so, the updated path is stored in $new_path.
32226
32227  input_path="$new_path"
32228  # Check if we need to convert this using DOS-style short mode. If the path
32229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32230  # take no chances and rewrite it.
32231  # Note: m4 eats our [], so we need to use [ and ] instead.
32232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32233  if test "x$has_forbidden_chars" != x; then
32234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32238      # Going to short mode and back again did indeed matter. Since short mode is
32239      # case insensitive, let's make it lowercase to improve readability.
32240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32241      # Now convert it back to Unix-stile (cygpath)
32242      input_path=`$CYGPATH -u "$shortmode_path"`
32243      new_path="$input_path"
32244    fi
32245  fi
32246
32247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32248  if test "x$test_cygdrive_prefix" = x; then
32249    # As a simple fix, exclude /usr/bin since it's not a real path.
32250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32252      # a path prefixed by /cygdrive for fixpath to work.
32253      new_path="$CYGWIN_ROOT_PATH$input_path"
32254    fi
32255  fi
32256
32257
32258  if test "x$path" != "x$new_path"; then
32259    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32261$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32262  fi
32263
32264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32265
32266  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32267  has_colon=`$ECHO $path | $GREP ^.:`
32268  new_path="$path"
32269  if test "x$has_colon" = x; then
32270    # Not in mixed or Windows style, start by that.
32271    new_path=`cmd //c echo $path`
32272  fi
32273
32274
32275  input_path="$new_path"
32276  # Check if we need to convert this using DOS-style short mode. If the path
32277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32278  # take no chances and rewrite it.
32279  # Note: m4 eats our [], so we need to use [ and ] instead.
32280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32281  if test "x$has_forbidden_chars" != x; then
32282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32284  fi
32285
32286
32287  windows_path="$new_path"
32288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32289    unix_path=`$CYGPATH -u "$windows_path"`
32290    new_path="$unix_path"
32291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32293    new_path="$unix_path"
32294  fi
32295
32296  if test "x$path" != "x$new_path"; then
32297    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32299$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32300  fi
32301
32302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32304
32305  else
32306    # We're on a posix platform. Hooray! :)
32307    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32308    has_space=`$ECHO "$path" | $GREP " "`
32309    if test "x$has_space" != x; then
32310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32311$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32313    fi
32314
32315    # Use eval to expand a potential ~
32316    eval path="$path"
32317    if test ! -f "$path" && test ! -d "$path"; then
32318      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32319    fi
32320
32321    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32322  fi
32323
32324
32325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32326
32327  # Input might be given as Windows format, start by converting to
32328  # unix format.
32329  path="$POTENTIAL_FREETYPE_LIB_PATH"
32330  new_path=`$CYGPATH -u "$path"`
32331
32332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32335  # "foo.exe" is OK but "foo" is an error.
32336  #
32337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32338  # It is also a way to make sure we got the proper file name for the real test later on.
32339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32340  if test "x$test_shortpath" = x; then
32341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32343    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32344  fi
32345
32346  # Call helper function which possibly converts this using DOS-style short mode.
32347  # If so, the updated path is stored in $new_path.
32348
32349  input_path="$new_path"
32350  # Check if we need to convert this using DOS-style short mode. If the path
32351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32352  # take no chances and rewrite it.
32353  # Note: m4 eats our [], so we need to use [ and ] instead.
32354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32355  if test "x$has_forbidden_chars" != x; then
32356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32360      # Going to short mode and back again did indeed matter. Since short mode is
32361      # case insensitive, let's make it lowercase to improve readability.
32362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32363      # Now convert it back to Unix-stile (cygpath)
32364      input_path=`$CYGPATH -u "$shortmode_path"`
32365      new_path="$input_path"
32366    fi
32367  fi
32368
32369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32370  if test "x$test_cygdrive_prefix" = x; then
32371    # As a simple fix, exclude /usr/bin since it's not a real path.
32372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32374      # a path prefixed by /cygdrive for fixpath to work.
32375      new_path="$CYGWIN_ROOT_PATH$input_path"
32376    fi
32377  fi
32378
32379
32380  if test "x$path" != "x$new_path"; then
32381    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32383$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32384  fi
32385
32386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32387
32388  path="$POTENTIAL_FREETYPE_LIB_PATH"
32389  has_colon=`$ECHO $path | $GREP ^.:`
32390  new_path="$path"
32391  if test "x$has_colon" = x; then
32392    # Not in mixed or Windows style, start by that.
32393    new_path=`cmd //c echo $path`
32394  fi
32395
32396
32397  input_path="$new_path"
32398  # Check if we need to convert this using DOS-style short mode. If the path
32399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32400  # take no chances and rewrite it.
32401  # Note: m4 eats our [], so we need to use [ and ] instead.
32402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32403  if test "x$has_forbidden_chars" != x; then
32404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32406  fi
32407
32408
32409  windows_path="$new_path"
32410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32411    unix_path=`$CYGPATH -u "$windows_path"`
32412    new_path="$unix_path"
32413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32415    new_path="$unix_path"
32416  fi
32417
32418  if test "x$path" != "x$new_path"; then
32419    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32421$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32422  fi
32423
32424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32426
32427  else
32428    # We're on a posix platform. Hooray! :)
32429    path="$POTENTIAL_FREETYPE_LIB_PATH"
32430    has_space=`$ECHO "$path" | $GREP " "`
32431    if test "x$has_space" != x; then
32432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32434      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32435    fi
32436
32437    # Use eval to expand a potential ~
32438    eval path="$path"
32439    if test ! -f "$path" && test ! -d "$path"; then
32440      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32441    fi
32442
32443    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32444  fi
32445
32446
32447    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32449$as_echo_n "checking for freetype includes... " >&6; }
32450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32451$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32452    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32454$as_echo_n "checking for freetype libraries... " >&6; }
32455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32456$as_echo "$FREETYPE_LIB_PATH" >&6; }
32457  fi
32458
32459          fi
32460        else
32461          if test "x$SYS_ROOT" = "x/"; then
32462            FREETYPE_ROOT=
32463          else
32464            FREETYPE_ROOT="$SYS_ROOT"
32465          fi
32466          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32467
32468  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32469  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32470  METHOD="well-known location"
32471
32472  # First check if the files exists.
32473  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32474    # We found an arbitrary include file. That's a good sign.
32475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32476$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32477    FOUND_FREETYPE=yes
32478
32479    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32480    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32481      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32482$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32483      FOUND_FREETYPE=no
32484    else
32485      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32486        # On Windows, we will need both .lib and .dll file.
32487        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32488          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32489$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32490          FOUND_FREETYPE=no
32491        fi
32492      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
32493        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32494        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32495      fi
32496    fi
32497  fi
32498
32499  if test "x$FOUND_FREETYPE" = xyes; then
32500
32501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32502
32503  # Input might be given as Windows format, start by converting to
32504  # unix format.
32505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32506  new_path=`$CYGPATH -u "$path"`
32507
32508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32511  # "foo.exe" is OK but "foo" is an error.
32512  #
32513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32514  # It is also a way to make sure we got the proper file name for the real test later on.
32515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32516  if test "x$test_shortpath" = x; then
32517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32519    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32520  fi
32521
32522  # Call helper function which possibly converts this using DOS-style short mode.
32523  # If so, the updated path is stored in $new_path.
32524
32525  input_path="$new_path"
32526  # Check if we need to convert this using DOS-style short mode. If the path
32527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32528  # take no chances and rewrite it.
32529  # Note: m4 eats our [], so we need to use [ and ] instead.
32530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32531  if test "x$has_forbidden_chars" != x; then
32532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32536      # Going to short mode and back again did indeed matter. Since short mode is
32537      # case insensitive, let's make it lowercase to improve readability.
32538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32539      # Now convert it back to Unix-stile (cygpath)
32540      input_path=`$CYGPATH -u "$shortmode_path"`
32541      new_path="$input_path"
32542    fi
32543  fi
32544
32545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32546  if test "x$test_cygdrive_prefix" = x; then
32547    # As a simple fix, exclude /usr/bin since it's not a real path.
32548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32550      # a path prefixed by /cygdrive for fixpath to work.
32551      new_path="$CYGWIN_ROOT_PATH$input_path"
32552    fi
32553  fi
32554
32555
32556  if test "x$path" != "x$new_path"; then
32557    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32559$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32560  fi
32561
32562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32563
32564  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32565  has_colon=`$ECHO $path | $GREP ^.:`
32566  new_path="$path"
32567  if test "x$has_colon" = x; then
32568    # Not in mixed or Windows style, start by that.
32569    new_path=`cmd //c echo $path`
32570  fi
32571
32572
32573  input_path="$new_path"
32574  # Check if we need to convert this using DOS-style short mode. If the path
32575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32576  # take no chances and rewrite it.
32577  # Note: m4 eats our [], so we need to use [ and ] instead.
32578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32579  if test "x$has_forbidden_chars" != x; then
32580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32582  fi
32583
32584
32585  windows_path="$new_path"
32586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32587    unix_path=`$CYGPATH -u "$windows_path"`
32588    new_path="$unix_path"
32589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32591    new_path="$unix_path"
32592  fi
32593
32594  if test "x$path" != "x$new_path"; then
32595    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32598  fi
32599
32600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32602
32603  else
32604    # We're on a posix platform. Hooray! :)
32605    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32606    has_space=`$ECHO "$path" | $GREP " "`
32607    if test "x$has_space" != x; then
32608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32609$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32610      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32611    fi
32612
32613    # Use eval to expand a potential ~
32614    eval path="$path"
32615    if test ! -f "$path" && test ! -d "$path"; then
32616      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32617    fi
32618
32619    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32620  fi
32621
32622
32623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32624
32625  # Input might be given as Windows format, start by converting to
32626  # unix format.
32627  path="$POTENTIAL_FREETYPE_LIB_PATH"
32628  new_path=`$CYGPATH -u "$path"`
32629
32630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32633  # "foo.exe" is OK but "foo" is an error.
32634  #
32635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32636  # It is also a way to make sure we got the proper file name for the real test later on.
32637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32638  if test "x$test_shortpath" = x; then
32639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32642  fi
32643
32644  # Call helper function which possibly converts this using DOS-style short mode.
32645  # If so, the updated path is stored in $new_path.
32646
32647  input_path="$new_path"
32648  # Check if we need to convert this using DOS-style short mode. If the path
32649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32650  # take no chances and rewrite it.
32651  # Note: m4 eats our [], so we need to use [ and ] instead.
32652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32653  if test "x$has_forbidden_chars" != x; then
32654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32658      # Going to short mode and back again did indeed matter. Since short mode is
32659      # case insensitive, let's make it lowercase to improve readability.
32660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32661      # Now convert it back to Unix-stile (cygpath)
32662      input_path=`$CYGPATH -u "$shortmode_path"`
32663      new_path="$input_path"
32664    fi
32665  fi
32666
32667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32668  if test "x$test_cygdrive_prefix" = x; then
32669    # As a simple fix, exclude /usr/bin since it's not a real path.
32670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32672      # a path prefixed by /cygdrive for fixpath to work.
32673      new_path="$CYGWIN_ROOT_PATH$input_path"
32674    fi
32675  fi
32676
32677
32678  if test "x$path" != "x$new_path"; then
32679    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32682  fi
32683
32684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32685
32686  path="$POTENTIAL_FREETYPE_LIB_PATH"
32687  has_colon=`$ECHO $path | $GREP ^.:`
32688  new_path="$path"
32689  if test "x$has_colon" = x; then
32690    # Not in mixed or Windows style, start by that.
32691    new_path=`cmd //c echo $path`
32692  fi
32693
32694
32695  input_path="$new_path"
32696  # Check if we need to convert this using DOS-style short mode. If the path
32697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32698  # take no chances and rewrite it.
32699  # Note: m4 eats our [], so we need to use [ and ] instead.
32700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32701  if test "x$has_forbidden_chars" != x; then
32702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32704  fi
32705
32706
32707  windows_path="$new_path"
32708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32709    unix_path=`$CYGPATH -u "$windows_path"`
32710    new_path="$unix_path"
32711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32713    new_path="$unix_path"
32714  fi
32715
32716  if test "x$path" != "x$new_path"; then
32717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32720  fi
32721
32722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32724
32725  else
32726    # We're on a posix platform. Hooray! :)
32727    path="$POTENTIAL_FREETYPE_LIB_PATH"
32728    has_space=`$ECHO "$path" | $GREP " "`
32729    if test "x$has_space" != x; then
32730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32732      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32733    fi
32734
32735    # Use eval to expand a potential ~
32736    eval path="$path"
32737    if test ! -f "$path" && test ! -d "$path"; then
32738      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32739    fi
32740
32741    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32742  fi
32743
32744
32745    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32747$as_echo_n "checking for freetype includes... " >&6; }
32748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32749$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32750    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32752$as_echo_n "checking for freetype libraries... " >&6; }
32753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32754$as_echo "$FREETYPE_LIB_PATH" >&6; }
32755  fi
32756
32757
32758          if test "x$FOUND_FREETYPE" != xyes; then
32759            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32760
32761  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32762  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32763  METHOD="well-known location"
32764
32765  # First check if the files exists.
32766  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32767    # We found an arbitrary include file. That's a good sign.
32768    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32769$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32770    FOUND_FREETYPE=yes
32771
32772    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32773    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32774      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32775$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32776      FOUND_FREETYPE=no
32777    else
32778      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32779        # On Windows, we will need both .lib and .dll file.
32780        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32781          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32782$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32783          FOUND_FREETYPE=no
32784        fi
32785      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
32786        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32787        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32788      fi
32789    fi
32790  fi
32791
32792  if test "x$FOUND_FREETYPE" = xyes; then
32793
32794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32795
32796  # Input might be given as Windows format, start by converting to
32797  # unix format.
32798  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32799  new_path=`$CYGPATH -u "$path"`
32800
32801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32804  # "foo.exe" is OK but "foo" is an error.
32805  #
32806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32807  # It is also a way to make sure we got the proper file name for the real test later on.
32808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32809  if test "x$test_shortpath" = x; then
32810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32812    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32813  fi
32814
32815  # Call helper function which possibly converts this using DOS-style short mode.
32816  # If so, the updated path is stored in $new_path.
32817
32818  input_path="$new_path"
32819  # Check if we need to convert this using DOS-style short mode. If the path
32820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32821  # take no chances and rewrite it.
32822  # Note: m4 eats our [], so we need to use [ and ] instead.
32823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32824  if test "x$has_forbidden_chars" != x; then
32825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32829      # Going to short mode and back again did indeed matter. Since short mode is
32830      # case insensitive, let's make it lowercase to improve readability.
32831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32832      # Now convert it back to Unix-stile (cygpath)
32833      input_path=`$CYGPATH -u "$shortmode_path"`
32834      new_path="$input_path"
32835    fi
32836  fi
32837
32838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32839  if test "x$test_cygdrive_prefix" = x; then
32840    # As a simple fix, exclude /usr/bin since it's not a real path.
32841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32843      # a path prefixed by /cygdrive for fixpath to work.
32844      new_path="$CYGWIN_ROOT_PATH$input_path"
32845    fi
32846  fi
32847
32848
32849  if test "x$path" != "x$new_path"; then
32850    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32852$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32853  fi
32854
32855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32856
32857  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32858  has_colon=`$ECHO $path | $GREP ^.:`
32859  new_path="$path"
32860  if test "x$has_colon" = x; then
32861    # Not in mixed or Windows style, start by that.
32862    new_path=`cmd //c echo $path`
32863  fi
32864
32865
32866  input_path="$new_path"
32867  # Check if we need to convert this using DOS-style short mode. If the path
32868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32869  # take no chances and rewrite it.
32870  # Note: m4 eats our [], so we need to use [ and ] instead.
32871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32872  if test "x$has_forbidden_chars" != x; then
32873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32875  fi
32876
32877
32878  windows_path="$new_path"
32879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32880    unix_path=`$CYGPATH -u "$windows_path"`
32881    new_path="$unix_path"
32882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32884    new_path="$unix_path"
32885  fi
32886
32887  if test "x$path" != "x$new_path"; then
32888    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32891  fi
32892
32893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32895
32896  else
32897    # We're on a posix platform. Hooray! :)
32898    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32899    has_space=`$ECHO "$path" | $GREP " "`
32900    if test "x$has_space" != x; then
32901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32903      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32904    fi
32905
32906    # Use eval to expand a potential ~
32907    eval path="$path"
32908    if test ! -f "$path" && test ! -d "$path"; then
32909      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32910    fi
32911
32912    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32913  fi
32914
32915
32916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32917
32918  # Input might be given as Windows format, start by converting to
32919  # unix format.
32920  path="$POTENTIAL_FREETYPE_LIB_PATH"
32921  new_path=`$CYGPATH -u "$path"`
32922
32923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32926  # "foo.exe" is OK but "foo" is an error.
32927  #
32928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32929  # It is also a way to make sure we got the proper file name for the real test later on.
32930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32931  if test "x$test_shortpath" = x; then
32932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32934    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32935  fi
32936
32937  # Call helper function which possibly converts this using DOS-style short mode.
32938  # If so, the updated path is stored in $new_path.
32939
32940  input_path="$new_path"
32941  # Check if we need to convert this using DOS-style short mode. If the path
32942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32943  # take no chances and rewrite it.
32944  # Note: m4 eats our [], so we need to use [ and ] instead.
32945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32946  if test "x$has_forbidden_chars" != x; then
32947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32951      # Going to short mode and back again did indeed matter. Since short mode is
32952      # case insensitive, let's make it lowercase to improve readability.
32953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32954      # Now convert it back to Unix-stile (cygpath)
32955      input_path=`$CYGPATH -u "$shortmode_path"`
32956      new_path="$input_path"
32957    fi
32958  fi
32959
32960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32961  if test "x$test_cygdrive_prefix" = x; then
32962    # As a simple fix, exclude /usr/bin since it's not a real path.
32963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32965      # a path prefixed by /cygdrive for fixpath to work.
32966      new_path="$CYGWIN_ROOT_PATH$input_path"
32967    fi
32968  fi
32969
32970
32971  if test "x$path" != "x$new_path"; then
32972    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32975  fi
32976
32977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32978
32979  path="$POTENTIAL_FREETYPE_LIB_PATH"
32980  has_colon=`$ECHO $path | $GREP ^.:`
32981  new_path="$path"
32982  if test "x$has_colon" = x; then
32983    # Not in mixed or Windows style, start by that.
32984    new_path=`cmd //c echo $path`
32985  fi
32986
32987
32988  input_path="$new_path"
32989  # Check if we need to convert this using DOS-style short mode. If the path
32990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32991  # take no chances and rewrite it.
32992  # Note: m4 eats our [], so we need to use [ and ] instead.
32993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32994  if test "x$has_forbidden_chars" != x; then
32995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32997  fi
32998
32999
33000  windows_path="$new_path"
33001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33002    unix_path=`$CYGPATH -u "$windows_path"`
33003    new_path="$unix_path"
33004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33006    new_path="$unix_path"
33007  fi
33008
33009  if test "x$path" != "x$new_path"; then
33010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33013  fi
33014
33015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33017
33018  else
33019    # We're on a posix platform. Hooray! :)
33020    path="$POTENTIAL_FREETYPE_LIB_PATH"
33021    has_space=`$ECHO "$path" | $GREP " "`
33022    if test "x$has_space" != x; then
33023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33025      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33026    fi
33027
33028    # Use eval to expand a potential ~
33029    eval path="$path"
33030    if test ! -f "$path" && test ! -d "$path"; then
33031      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33032    fi
33033
33034    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33035  fi
33036
33037
33038    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33040$as_echo_n "checking for freetype includes... " >&6; }
33041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33042$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33043    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33045$as_echo_n "checking for freetype libraries... " >&6; }
33046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33047$as_echo "$FREETYPE_LIB_PATH" >&6; }
33048  fi
33049
33050          fi
33051
33052          if test "x$FOUND_FREETYPE" != xyes; then
33053            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33054            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33055
33056  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33057  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33058  METHOD="well-known location"
33059
33060  # First check if the files exists.
33061  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33062    # We found an arbitrary include file. That's a good sign.
33063    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33064$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33065    FOUND_FREETYPE=yes
33066
33067    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33068    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33069      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33070$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33071      FOUND_FREETYPE=no
33072    else
33073      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33074        # On Windows, we will need both .lib and .dll file.
33075        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33076          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33077$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33078          FOUND_FREETYPE=no
33079        fi
33080      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
33081        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33082        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33083      fi
33084    fi
33085  fi
33086
33087  if test "x$FOUND_FREETYPE" = xyes; then
33088
33089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33090
33091  # Input might be given as Windows format, start by converting to
33092  # unix format.
33093  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33094  new_path=`$CYGPATH -u "$path"`
33095
33096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33099  # "foo.exe" is OK but "foo" is an error.
33100  #
33101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33102  # It is also a way to make sure we got the proper file name for the real test later on.
33103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33104  if test "x$test_shortpath" = x; then
33105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33106$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33107    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33108  fi
33109
33110  # Call helper function which possibly converts this using DOS-style short mode.
33111  # If so, the updated path is stored in $new_path.
33112
33113  input_path="$new_path"
33114  # Check if we need to convert this using DOS-style short mode. If the path
33115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33116  # take no chances and rewrite it.
33117  # Note: m4 eats our [], so we need to use [ and ] instead.
33118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33119  if test "x$has_forbidden_chars" != x; then
33120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33124      # Going to short mode and back again did indeed matter. Since short mode is
33125      # case insensitive, let's make it lowercase to improve readability.
33126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33127      # Now convert it back to Unix-stile (cygpath)
33128      input_path=`$CYGPATH -u "$shortmode_path"`
33129      new_path="$input_path"
33130    fi
33131  fi
33132
33133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33134  if test "x$test_cygdrive_prefix" = x; then
33135    # As a simple fix, exclude /usr/bin since it's not a real path.
33136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33138      # a path prefixed by /cygdrive for fixpath to work.
33139      new_path="$CYGWIN_ROOT_PATH$input_path"
33140    fi
33141  fi
33142
33143
33144  if test "x$path" != "x$new_path"; then
33145    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33147$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33148  fi
33149
33150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33151
33152  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33153  has_colon=`$ECHO $path | $GREP ^.:`
33154  new_path="$path"
33155  if test "x$has_colon" = x; then
33156    # Not in mixed or Windows style, start by that.
33157    new_path=`cmd //c echo $path`
33158  fi
33159
33160
33161  input_path="$new_path"
33162  # Check if we need to convert this using DOS-style short mode. If the path
33163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33164  # take no chances and rewrite it.
33165  # Note: m4 eats our [], so we need to use [ and ] instead.
33166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33167  if test "x$has_forbidden_chars" != x; then
33168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33170  fi
33171
33172
33173  windows_path="$new_path"
33174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33175    unix_path=`$CYGPATH -u "$windows_path"`
33176    new_path="$unix_path"
33177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33179    new_path="$unix_path"
33180  fi
33181
33182  if test "x$path" != "x$new_path"; then
33183    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33185$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33186  fi
33187
33188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33190
33191  else
33192    # We're on a posix platform. Hooray! :)
33193    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33194    has_space=`$ECHO "$path" | $GREP " "`
33195    if test "x$has_space" != x; then
33196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33197$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33198      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33199    fi
33200
33201    # Use eval to expand a potential ~
33202    eval path="$path"
33203    if test ! -f "$path" && test ! -d "$path"; then
33204      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33205    fi
33206
33207    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33208  fi
33209
33210
33211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33212
33213  # Input might be given as Windows format, start by converting to
33214  # unix format.
33215  path="$POTENTIAL_FREETYPE_LIB_PATH"
33216  new_path=`$CYGPATH -u "$path"`
33217
33218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33221  # "foo.exe" is OK but "foo" is an error.
33222  #
33223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33224  # It is also a way to make sure we got the proper file name for the real test later on.
33225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33226  if test "x$test_shortpath" = x; then
33227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33229    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33230  fi
33231
33232  # Call helper function which possibly converts this using DOS-style short mode.
33233  # If so, the updated path is stored in $new_path.
33234
33235  input_path="$new_path"
33236  # Check if we need to convert this using DOS-style short mode. If the path
33237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33238  # take no chances and rewrite it.
33239  # Note: m4 eats our [], so we need to use [ and ] instead.
33240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33241  if test "x$has_forbidden_chars" != x; then
33242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33246      # Going to short mode and back again did indeed matter. Since short mode is
33247      # case insensitive, let's make it lowercase to improve readability.
33248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33249      # Now convert it back to Unix-stile (cygpath)
33250      input_path=`$CYGPATH -u "$shortmode_path"`
33251      new_path="$input_path"
33252    fi
33253  fi
33254
33255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33256  if test "x$test_cygdrive_prefix" = x; then
33257    # As a simple fix, exclude /usr/bin since it's not a real path.
33258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33260      # a path prefixed by /cygdrive for fixpath to work.
33261      new_path="$CYGWIN_ROOT_PATH$input_path"
33262    fi
33263  fi
33264
33265
33266  if test "x$path" != "x$new_path"; then
33267    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33270  fi
33271
33272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33273
33274  path="$POTENTIAL_FREETYPE_LIB_PATH"
33275  has_colon=`$ECHO $path | $GREP ^.:`
33276  new_path="$path"
33277  if test "x$has_colon" = x; then
33278    # Not in mixed or Windows style, start by that.
33279    new_path=`cmd //c echo $path`
33280  fi
33281
33282
33283  input_path="$new_path"
33284  # Check if we need to convert this using DOS-style short mode. If the path
33285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33286  # take no chances and rewrite it.
33287  # Note: m4 eats our [], so we need to use [ and ] instead.
33288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33289  if test "x$has_forbidden_chars" != x; then
33290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33292  fi
33293
33294
33295  windows_path="$new_path"
33296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33297    unix_path=`$CYGPATH -u "$windows_path"`
33298    new_path="$unix_path"
33299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33301    new_path="$unix_path"
33302  fi
33303
33304  if test "x$path" != "x$new_path"; then
33305    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33307$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33308  fi
33309
33310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33312
33313  else
33314    # We're on a posix platform. Hooray! :)
33315    path="$POTENTIAL_FREETYPE_LIB_PATH"
33316    has_space=`$ECHO "$path" | $GREP " "`
33317    if test "x$has_space" != x; then
33318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33320      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33321    fi
33322
33323    # Use eval to expand a potential ~
33324    eval path="$path"
33325    if test ! -f "$path" && test ! -d "$path"; then
33326      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33327    fi
33328
33329    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33330  fi
33331
33332
33333    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33335$as_echo_n "checking for freetype includes... " >&6; }
33336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33337$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33338    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33340$as_echo_n "checking for freetype libraries... " >&6; }
33341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33342$as_echo "$FREETYPE_LIB_PATH" >&6; }
33343  fi
33344
33345            else
33346
33347  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33348  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33349  METHOD="well-known location"
33350
33351  # First check if the files exists.
33352  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33353    # We found an arbitrary include file. That's a good sign.
33354    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33355$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33356    FOUND_FREETYPE=yes
33357
33358    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33359    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33360      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33361$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33362      FOUND_FREETYPE=no
33363    else
33364      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33365        # On Windows, we will need both .lib and .dll file.
33366        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33367          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33368$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33369          FOUND_FREETYPE=no
33370        fi
33371      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
33372        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33373        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33374      fi
33375    fi
33376  fi
33377
33378  if test "x$FOUND_FREETYPE" = xyes; then
33379
33380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33381
33382  # Input might be given as Windows format, start by converting to
33383  # unix format.
33384  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33385  new_path=`$CYGPATH -u "$path"`
33386
33387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33390  # "foo.exe" is OK but "foo" is an error.
33391  #
33392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33393  # It is also a way to make sure we got the proper file name for the real test later on.
33394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33395  if test "x$test_shortpath" = x; then
33396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33398    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33399  fi
33400
33401  # Call helper function which possibly converts this using DOS-style short mode.
33402  # If so, the updated path is stored in $new_path.
33403
33404  input_path="$new_path"
33405  # Check if we need to convert this using DOS-style short mode. If the path
33406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33407  # take no chances and rewrite it.
33408  # Note: m4 eats our [], so we need to use [ and ] instead.
33409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33410  if test "x$has_forbidden_chars" != x; then
33411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33415      # Going to short mode and back again did indeed matter. Since short mode is
33416      # case insensitive, let's make it lowercase to improve readability.
33417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33418      # Now convert it back to Unix-stile (cygpath)
33419      input_path=`$CYGPATH -u "$shortmode_path"`
33420      new_path="$input_path"
33421    fi
33422  fi
33423
33424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33425  if test "x$test_cygdrive_prefix" = x; then
33426    # As a simple fix, exclude /usr/bin since it's not a real path.
33427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33429      # a path prefixed by /cygdrive for fixpath to work.
33430      new_path="$CYGWIN_ROOT_PATH$input_path"
33431    fi
33432  fi
33433
33434
33435  if test "x$path" != "x$new_path"; then
33436    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33438$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33439  fi
33440
33441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33442
33443  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33444  has_colon=`$ECHO $path | $GREP ^.:`
33445  new_path="$path"
33446  if test "x$has_colon" = x; then
33447    # Not in mixed or Windows style, start by that.
33448    new_path=`cmd //c echo $path`
33449  fi
33450
33451
33452  input_path="$new_path"
33453  # Check if we need to convert this using DOS-style short mode. If the path
33454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33455  # take no chances and rewrite it.
33456  # Note: m4 eats our [], so we need to use [ and ] instead.
33457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33458  if test "x$has_forbidden_chars" != x; then
33459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33461  fi
33462
33463
33464  windows_path="$new_path"
33465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33466    unix_path=`$CYGPATH -u "$windows_path"`
33467    new_path="$unix_path"
33468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33470    new_path="$unix_path"
33471  fi
33472
33473  if test "x$path" != "x$new_path"; then
33474    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33476$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33477  fi
33478
33479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33481
33482  else
33483    # We're on a posix platform. Hooray! :)
33484    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33485    has_space=`$ECHO "$path" | $GREP " "`
33486    if test "x$has_space" != x; then
33487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33488$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33489      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33490    fi
33491
33492    # Use eval to expand a potential ~
33493    eval path="$path"
33494    if test ! -f "$path" && test ! -d "$path"; then
33495      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33496    fi
33497
33498    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33499  fi
33500
33501
33502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33503
33504  # Input might be given as Windows format, start by converting to
33505  # unix format.
33506  path="$POTENTIAL_FREETYPE_LIB_PATH"
33507  new_path=`$CYGPATH -u "$path"`
33508
33509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33512  # "foo.exe" is OK but "foo" is an error.
33513  #
33514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33515  # It is also a way to make sure we got the proper file name for the real test later on.
33516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33517  if test "x$test_shortpath" = x; then
33518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33519$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33520    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33521  fi
33522
33523  # Call helper function which possibly converts this using DOS-style short mode.
33524  # If so, the updated path is stored in $new_path.
33525
33526  input_path="$new_path"
33527  # Check if we need to convert this using DOS-style short mode. If the path
33528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33529  # take no chances and rewrite it.
33530  # Note: m4 eats our [], so we need to use [ and ] instead.
33531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33532  if test "x$has_forbidden_chars" != x; then
33533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33537      # Going to short mode and back again did indeed matter. Since short mode is
33538      # case insensitive, let's make it lowercase to improve readability.
33539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33540      # Now convert it back to Unix-stile (cygpath)
33541      input_path=`$CYGPATH -u "$shortmode_path"`
33542      new_path="$input_path"
33543    fi
33544  fi
33545
33546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33547  if test "x$test_cygdrive_prefix" = x; then
33548    # As a simple fix, exclude /usr/bin since it's not a real path.
33549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33551      # a path prefixed by /cygdrive for fixpath to work.
33552      new_path="$CYGWIN_ROOT_PATH$input_path"
33553    fi
33554  fi
33555
33556
33557  if test "x$path" != "x$new_path"; then
33558    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33560$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33561  fi
33562
33563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33564
33565  path="$POTENTIAL_FREETYPE_LIB_PATH"
33566  has_colon=`$ECHO $path | $GREP ^.:`
33567  new_path="$path"
33568  if test "x$has_colon" = x; then
33569    # Not in mixed or Windows style, start by that.
33570    new_path=`cmd //c echo $path`
33571  fi
33572
33573
33574  input_path="$new_path"
33575  # Check if we need to convert this using DOS-style short mode. If the path
33576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33577  # take no chances and rewrite it.
33578  # Note: m4 eats our [], so we need to use [ and ] instead.
33579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33580  if test "x$has_forbidden_chars" != x; then
33581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33583  fi
33584
33585
33586  windows_path="$new_path"
33587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33588    unix_path=`$CYGPATH -u "$windows_path"`
33589    new_path="$unix_path"
33590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33592    new_path="$unix_path"
33593  fi
33594
33595  if test "x$path" != "x$new_path"; then
33596    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33598$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33599  fi
33600
33601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33603
33604  else
33605    # We're on a posix platform. Hooray! :)
33606    path="$POTENTIAL_FREETYPE_LIB_PATH"
33607    has_space=`$ECHO "$path" | $GREP " "`
33608    if test "x$has_space" != x; then
33609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33610$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33611      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33612    fi
33613
33614    # Use eval to expand a potential ~
33615    eval path="$path"
33616    if test ! -f "$path" && test ! -d "$path"; then
33617      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33618    fi
33619
33620    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33621  fi
33622
33623
33624    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33626$as_echo_n "checking for freetype includes... " >&6; }
33627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33628$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33629    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33631$as_echo_n "checking for freetype libraries... " >&6; }
33632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33633$as_echo "$FREETYPE_LIB_PATH" >&6; }
33634  fi
33635
33636              if test "x$FOUND_FREETYPE" != xyes; then
33637
33638  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33639  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33640  METHOD="well-known location"
33641
33642  # First check if the files exists.
33643  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33644    # We found an arbitrary include file. That's a good sign.
33645    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33646$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33647    FOUND_FREETYPE=yes
33648
33649    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33650    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33651      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33652$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33653      FOUND_FREETYPE=no
33654    else
33655      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33656        # On Windows, we will need both .lib and .dll file.
33657        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33658          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33659$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33660          FOUND_FREETYPE=no
33661        fi
33662      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
33663        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33664        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33665      fi
33666    fi
33667  fi
33668
33669  if test "x$FOUND_FREETYPE" = xyes; then
33670
33671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33672
33673  # Input might be given as Windows format, start by converting to
33674  # unix format.
33675  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33676  new_path=`$CYGPATH -u "$path"`
33677
33678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33681  # "foo.exe" is OK but "foo" is an error.
33682  #
33683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33684  # It is also a way to make sure we got the proper file name for the real test later on.
33685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33686  if test "x$test_shortpath" = x; then
33687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33689    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33690  fi
33691
33692  # Call helper function which possibly converts this using DOS-style short mode.
33693  # If so, the updated path is stored in $new_path.
33694
33695  input_path="$new_path"
33696  # Check if we need to convert this using DOS-style short mode. If the path
33697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33698  # take no chances and rewrite it.
33699  # Note: m4 eats our [], so we need to use [ and ] instead.
33700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33701  if test "x$has_forbidden_chars" != x; then
33702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33706      # Going to short mode and back again did indeed matter. Since short mode is
33707      # case insensitive, let's make it lowercase to improve readability.
33708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33709      # Now convert it back to Unix-stile (cygpath)
33710      input_path=`$CYGPATH -u "$shortmode_path"`
33711      new_path="$input_path"
33712    fi
33713  fi
33714
33715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33716  if test "x$test_cygdrive_prefix" = x; then
33717    # As a simple fix, exclude /usr/bin since it's not a real path.
33718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33720      # a path prefixed by /cygdrive for fixpath to work.
33721      new_path="$CYGWIN_ROOT_PATH$input_path"
33722    fi
33723  fi
33724
33725
33726  if test "x$path" != "x$new_path"; then
33727    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33730  fi
33731
33732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33733
33734  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33735  has_colon=`$ECHO $path | $GREP ^.:`
33736  new_path="$path"
33737  if test "x$has_colon" = x; then
33738    # Not in mixed or Windows style, start by that.
33739    new_path=`cmd //c echo $path`
33740  fi
33741
33742
33743  input_path="$new_path"
33744  # Check if we need to convert this using DOS-style short mode. If the path
33745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33746  # take no chances and rewrite it.
33747  # Note: m4 eats our [], so we need to use [ and ] instead.
33748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33749  if test "x$has_forbidden_chars" != x; then
33750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33752  fi
33753
33754
33755  windows_path="$new_path"
33756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33757    unix_path=`$CYGPATH -u "$windows_path"`
33758    new_path="$unix_path"
33759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33761    new_path="$unix_path"
33762  fi
33763
33764  if test "x$path" != "x$new_path"; then
33765    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33768  fi
33769
33770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33772
33773  else
33774    # We're on a posix platform. Hooray! :)
33775    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33776    has_space=`$ECHO "$path" | $GREP " "`
33777    if test "x$has_space" != x; then
33778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33779$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33780      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33781    fi
33782
33783    # Use eval to expand a potential ~
33784    eval path="$path"
33785    if test ! -f "$path" && test ! -d "$path"; then
33786      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33787    fi
33788
33789    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33790  fi
33791
33792
33793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33794
33795  # Input might be given as Windows format, start by converting to
33796  # unix format.
33797  path="$POTENTIAL_FREETYPE_LIB_PATH"
33798  new_path=`$CYGPATH -u "$path"`
33799
33800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33803  # "foo.exe" is OK but "foo" is an error.
33804  #
33805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33806  # It is also a way to make sure we got the proper file name for the real test later on.
33807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33808  if test "x$test_shortpath" = x; then
33809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33811    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33812  fi
33813
33814  # Call helper function which possibly converts this using DOS-style short mode.
33815  # If so, the updated path is stored in $new_path.
33816
33817  input_path="$new_path"
33818  # Check if we need to convert this using DOS-style short mode. If the path
33819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33820  # take no chances and rewrite it.
33821  # Note: m4 eats our [], so we need to use [ and ] instead.
33822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33823  if test "x$has_forbidden_chars" != x; then
33824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33828      # Going to short mode and back again did indeed matter. Since short mode is
33829      # case insensitive, let's make it lowercase to improve readability.
33830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33831      # Now convert it back to Unix-stile (cygpath)
33832      input_path=`$CYGPATH -u "$shortmode_path"`
33833      new_path="$input_path"
33834    fi
33835  fi
33836
33837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33838  if test "x$test_cygdrive_prefix" = x; then
33839    # As a simple fix, exclude /usr/bin since it's not a real path.
33840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33842      # a path prefixed by /cygdrive for fixpath to work.
33843      new_path="$CYGWIN_ROOT_PATH$input_path"
33844    fi
33845  fi
33846
33847
33848  if test "x$path" != "x$new_path"; then
33849    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33852  fi
33853
33854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33855
33856  path="$POTENTIAL_FREETYPE_LIB_PATH"
33857  has_colon=`$ECHO $path | $GREP ^.:`
33858  new_path="$path"
33859  if test "x$has_colon" = x; then
33860    # Not in mixed or Windows style, start by that.
33861    new_path=`cmd //c echo $path`
33862  fi
33863
33864
33865  input_path="$new_path"
33866  # Check if we need to convert this using DOS-style short mode. If the path
33867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33868  # take no chances and rewrite it.
33869  # Note: m4 eats our [], so we need to use [ and ] instead.
33870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33871  if test "x$has_forbidden_chars" != x; then
33872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33874  fi
33875
33876
33877  windows_path="$new_path"
33878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33879    unix_path=`$CYGPATH -u "$windows_path"`
33880    new_path="$unix_path"
33881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33883    new_path="$unix_path"
33884  fi
33885
33886  if test "x$path" != "x$new_path"; then
33887    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33890  fi
33891
33892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33894
33895  else
33896    # We're on a posix platform. Hooray! :)
33897    path="$POTENTIAL_FREETYPE_LIB_PATH"
33898    has_space=`$ECHO "$path" | $GREP " "`
33899    if test "x$has_space" != x; then
33900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33902      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33903    fi
33904
33905    # Use eval to expand a potential ~
33906    eval path="$path"
33907    if test ! -f "$path" && test ! -d "$path"; then
33908      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33909    fi
33910
33911    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33912  fi
33913
33914
33915    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33917$as_echo_n "checking for freetype includes... " >&6; }
33918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33919$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33920    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33922$as_echo_n "checking for freetype libraries... " >&6; }
33923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33924$as_echo "$FREETYPE_LIB_PATH" >&6; }
33925  fi
33926
33927              fi
33928            fi
33929          fi
33930        fi
33931      fi # end check in well-known locations
33932
33933      if test "x$FOUND_FREETYPE" != xyes; then
33934
33935  # Print a helpful message on how to acquire the necessary build dependency.
33936  # freetype is the help tag: freetype, cups, pulse, alsa etc
33937  MISSING_DEPENDENCY=freetype
33938
33939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33940    cygwin_help $MISSING_DEPENDENCY
33941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33942    msys_help $MISSING_DEPENDENCY
33943  else
33944    PKGHANDLER_COMMAND=
33945
33946    case $PKGHANDLER in
33947      apt-get)
33948        apt_help     $MISSING_DEPENDENCY ;;
33949      yum)
33950        yum_help     $MISSING_DEPENDENCY ;;
33951      port)
33952        port_help    $MISSING_DEPENDENCY ;;
33953      pkgutil)
33954        pkgutil_help $MISSING_DEPENDENCY ;;
33955      pkgadd)
33956        pkgadd_help  $MISSING_DEPENDENCY ;;
33957      * )
33958        break ;;
33959    esac
33960
33961    if test "x$PKGHANDLER_COMMAND" != x; then
33962      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33963    fi
33964  fi
33965
33966        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
33967      fi
33968    fi # end user specified settings
33969
33970    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
33971    if test "x$FREETYPE_CFLAGS" = x; then
33972
33973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33974
33975  # Input might be given as Windows format, start by converting to
33976  # unix format.
33977  path="$FREETYPE_INCLUDE_PATH"
33978  new_path=`$CYGPATH -u "$path"`
33979
33980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33983  # "foo.exe" is OK but "foo" is an error.
33984  #
33985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33986  # It is also a way to make sure we got the proper file name for the real test later on.
33987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33988  if test "x$test_shortpath" = x; then
33989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33990$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33991    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
33992  fi
33993
33994  # Call helper function which possibly converts this using DOS-style short mode.
33995  # If so, the updated path is stored in $new_path.
33996
33997  input_path="$new_path"
33998  # Check if we need to convert this using DOS-style short mode. If the path
33999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34000  # take no chances and rewrite it.
34001  # Note: m4 eats our [], so we need to use [ and ] instead.
34002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34003  if test "x$has_forbidden_chars" != x; then
34004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34008      # Going to short mode and back again did indeed matter. Since short mode is
34009      # case insensitive, let's make it lowercase to improve readability.
34010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34011      # Now convert it back to Unix-stile (cygpath)
34012      input_path=`$CYGPATH -u "$shortmode_path"`
34013      new_path="$input_path"
34014    fi
34015  fi
34016
34017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34018  if test "x$test_cygdrive_prefix" = x; then
34019    # As a simple fix, exclude /usr/bin since it's not a real path.
34020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34022      # a path prefixed by /cygdrive for fixpath to work.
34023      new_path="$CYGWIN_ROOT_PATH$input_path"
34024    fi
34025  fi
34026
34027
34028  if test "x$path" != "x$new_path"; then
34029    FREETYPE_INCLUDE_PATH="$new_path"
34030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34031$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34032  fi
34033
34034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34035
34036  path="$FREETYPE_INCLUDE_PATH"
34037  has_colon=`$ECHO $path | $GREP ^.:`
34038  new_path="$path"
34039  if test "x$has_colon" = x; then
34040    # Not in mixed or Windows style, start by that.
34041    new_path=`cmd //c echo $path`
34042  fi
34043
34044
34045  input_path="$new_path"
34046  # Check if we need to convert this using DOS-style short mode. If the path
34047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34048  # take no chances and rewrite it.
34049  # Note: m4 eats our [], so we need to use [ and ] instead.
34050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34051  if test "x$has_forbidden_chars" != x; then
34052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34054  fi
34055
34056
34057  windows_path="$new_path"
34058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34059    unix_path=`$CYGPATH -u "$windows_path"`
34060    new_path="$unix_path"
34061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34063    new_path="$unix_path"
34064  fi
34065
34066  if test "x$path" != "x$new_path"; then
34067    FREETYPE_INCLUDE_PATH="$new_path"
34068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34069$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34070  fi
34071
34072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34074
34075  else
34076    # We're on a posix platform. Hooray! :)
34077    path="$FREETYPE_INCLUDE_PATH"
34078    has_space=`$ECHO "$path" | $GREP " "`
34079    if test "x$has_space" != x; then
34080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34081$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34082      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34083    fi
34084
34085    # Use eval to expand a potential ~
34086    eval path="$path"
34087    if test ! -f "$path" && test ! -d "$path"; then
34088      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34089    fi
34090
34091    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34092  fi
34093
34094      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34095        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34096      else
34097        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34098      fi
34099    fi
34100
34101    if test "x$FREETYPE_LIBS" = x; then
34102
34103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34104
34105  # Input might be given as Windows format, start by converting to
34106  # unix format.
34107  path="$FREETYPE_LIB_PATH"
34108  new_path=`$CYGPATH -u "$path"`
34109
34110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34113  # "foo.exe" is OK but "foo" is an error.
34114  #
34115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34116  # It is also a way to make sure we got the proper file name for the real test later on.
34117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34118  if test "x$test_shortpath" = x; then
34119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34120$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34121    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34122  fi
34123
34124  # Call helper function which possibly converts this using DOS-style short mode.
34125  # If so, the updated path is stored in $new_path.
34126
34127  input_path="$new_path"
34128  # Check if we need to convert this using DOS-style short mode. If the path
34129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34130  # take no chances and rewrite it.
34131  # Note: m4 eats our [], so we need to use [ and ] instead.
34132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34133  if test "x$has_forbidden_chars" != x; then
34134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34138      # Going to short mode and back again did indeed matter. Since short mode is
34139      # case insensitive, let's make it lowercase to improve readability.
34140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34141      # Now convert it back to Unix-stile (cygpath)
34142      input_path=`$CYGPATH -u "$shortmode_path"`
34143      new_path="$input_path"
34144    fi
34145  fi
34146
34147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34148  if test "x$test_cygdrive_prefix" = x; then
34149    # As a simple fix, exclude /usr/bin since it's not a real path.
34150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34152      # a path prefixed by /cygdrive for fixpath to work.
34153      new_path="$CYGWIN_ROOT_PATH$input_path"
34154    fi
34155  fi
34156
34157
34158  if test "x$path" != "x$new_path"; then
34159    FREETYPE_LIB_PATH="$new_path"
34160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34161$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34162  fi
34163
34164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34165
34166  path="$FREETYPE_LIB_PATH"
34167  has_colon=`$ECHO $path | $GREP ^.:`
34168  new_path="$path"
34169  if test "x$has_colon" = x; then
34170    # Not in mixed or Windows style, start by that.
34171    new_path=`cmd //c echo $path`
34172  fi
34173
34174
34175  input_path="$new_path"
34176  # Check if we need to convert this using DOS-style short mode. If the path
34177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34178  # take no chances and rewrite it.
34179  # Note: m4 eats our [], so we need to use [ and ] instead.
34180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34181  if test "x$has_forbidden_chars" != x; then
34182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34184  fi
34185
34186
34187  windows_path="$new_path"
34188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34189    unix_path=`$CYGPATH -u "$windows_path"`
34190    new_path="$unix_path"
34191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34193    new_path="$unix_path"
34194  fi
34195
34196  if test "x$path" != "x$new_path"; then
34197    FREETYPE_LIB_PATH="$new_path"
34198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34199$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34200  fi
34201
34202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34204
34205  else
34206    # We're on a posix platform. Hooray! :)
34207    path="$FREETYPE_LIB_PATH"
34208    has_space=`$ECHO "$path" | $GREP " "`
34209    if test "x$has_space" != x; then
34210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34211$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34212      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34213    fi
34214
34215    # Use eval to expand a potential ~
34216    eval path="$path"
34217    if test ! -f "$path" && test ! -d "$path"; then
34218      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34219    fi
34220
34221    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34222  fi
34223
34224      if test "x$OPENJDK_TARGET_OS" = xwindows; then
34225        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34226      else
34227        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34228      fi
34229    fi
34230
34231    # Try to compile it
34232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34233$as_echo_n "checking if we can compile and link with freetype... " >&6; }
34234    ac_ext=cpp
34235ac_cpp='$CXXCPP $CPPFLAGS'
34236ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34237ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34238ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34239
34240    PREV_CXXCFLAGS="$CXXFLAGS"
34241    PREV_LIBS="$LIBS"
34242    PREV_CXX="$CXX"
34243    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34244    LIBS="$LIBS $FREETYPE_LIBS"
34245    CXX="$FIXPATH $CXX"
34246    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34247/* end confdefs.h.  */
34248
34249          #include<ft2build.h>
34250          #include FT_FREETYPE_H
34251          int main () {
34252            FT_Init_FreeType(NULL);
34253            return 0;
34254          }
34255
34256_ACEOF
34257if ac_fn_cxx_try_link "$LINENO"; then :
34258
34259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34260$as_echo "yes" >&6; }
34261
34262else
34263
34264          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34265$as_echo "no" >&6; }
34266          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34267$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34268          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34269$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34270
34271
34272  # Print a helpful message on how to acquire the necessary build dependency.
34273  # freetype is the help tag: freetype, cups, pulse, alsa etc
34274  MISSING_DEPENDENCY=freetype
34275
34276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34277    cygwin_help $MISSING_DEPENDENCY
34278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34279    msys_help $MISSING_DEPENDENCY
34280  else
34281    PKGHANDLER_COMMAND=
34282
34283    case $PKGHANDLER in
34284      apt-get)
34285        apt_help     $MISSING_DEPENDENCY ;;
34286      yum)
34287        yum_help     $MISSING_DEPENDENCY ;;
34288      port)
34289        port_help    $MISSING_DEPENDENCY ;;
34290      pkgutil)
34291        pkgutil_help $MISSING_DEPENDENCY ;;
34292      pkgadd)
34293        pkgadd_help  $MISSING_DEPENDENCY ;;
34294      * )
34295        break ;;
34296    esac
34297
34298    if test "x$PKGHANDLER_COMMAND" != x; then
34299      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34300    fi
34301  fi
34302
34303
34304          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34305
34306
34307fi
34308rm -f core conftest.err conftest.$ac_objext \
34309    conftest$ac_exeext conftest.$ac_ext
34310    CXXCFLAGS="$PREV_CXXFLAGS"
34311    LIBS="$PREV_LIBS"
34312    CXX="$PREV_CXX"
34313    ac_ext=cpp
34314ac_cpp='$CXXCPP $CPPFLAGS'
34315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34318
34319
34320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34321$as_echo_n "checking if we should bundle freetype... " >&6; }
34322    if test "x$BUNDLE_FREETYPE" = xyes; then
34323      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34324    fi
34325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34326$as_echo "$BUNDLE_FREETYPE" >&6; }
34327
34328  fi # end freetype needed
34329
34330
34331
34332
34333
34334
34335
34336  ###############################################################################
34337  #
34338  # Check for alsa headers and libraries. Used on Linux/GNU systems.
34339  #
34340
34341# Check whether --with-alsa was given.
34342if test "${with_alsa+set}" = set; then :
34343  withval=$with_alsa;
34344fi
34345
34346
34347# Check whether --with-alsa-include was given.
34348if test "${with_alsa_include+set}" = set; then :
34349  withval=$with_alsa_include;
34350fi
34351
34352
34353# Check whether --with-alsa-lib was given.
34354if test "${with_alsa_lib+set}" = set; then :
34355  withval=$with_alsa_lib;
34356fi
34357
34358
34359  if test "x$ALSA_NOT_NEEDED" = xyes; then
34360    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34361      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34362$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34363    fi
34364    ALSA_CFLAGS=
34365    ALSA_LIBS=
34366  else
34367    ALSA_FOUND=no
34368
34369    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34370      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34371    fi
34372
34373    if test "x${with_alsa}" != x; then
34374      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34375      ALSA_CFLAGS="-I${with_alsa}/include"
34376      ALSA_FOUND=yes
34377    fi
34378    if test "x${with_alsa_include}" != x; then
34379      ALSA_CFLAGS="-I${with_alsa_include}"
34380      ALSA_FOUND=yes
34381    fi
34382    if test "x${with_alsa_lib}" != x; then
34383      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34384      ALSA_FOUND=yes
34385    fi
34386    if test "x$ALSA_FOUND" = xno; then
34387
34388
34389  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34390    # Source the builddeps file again, to make sure it uses the latest variables!
34391    . $builddepsfile
34392    # Look for a target and build machine specific resource!
34393    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34394    if test "x$resource" = x; then
34395      # Ok, lets instead look for a target specific resource
34396      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34397    fi
34398    if test "x$resource" = x; then
34399      # Ok, lets instead look for a build specific resource
34400      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34401    fi
34402    if test "x$resource" = x; then
34403      # Ok, lets instead look for a generic resource
34404      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34405      resource=${builddep_alsa}
34406    fi
34407    if test "x$resource" != x; then
34408      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34409$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34410      # If the resource in the builddeps.conf file is an existing directory,
34411      # for example /java/linux/cups
34412      if test -d ${resource}; then
34413        depdir=${resource}
34414      else
34415
34416  # alsa is for example mymodule
34417  # $resource is for example libs/general/libmymod_1_2_3.zip
34418  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34419  # $with_builddeps_dir is for example /localhome/builddeps
34420  # depdir is the name of the variable into which we store the depdir, eg MYMOD
34421  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34422  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34423  filename=`basename $resource`
34424  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34425  filebase=${filename%%.*}
34426  extension=${filename#*.}
34427  installdir=$with_builddeps_dir/$filebase
34428  if test ! -f $installdir/$filename.unpacked; then
34429    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34430$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34431    if test ! -d $installdir; then
34432      mkdir -p $installdir
34433    fi
34434    if test ! -d $installdir; then
34435      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34436    fi
34437    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34438    touch $tmpfile
34439    if test ! -f $tmpfile; then
34440      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34441    fi
34442
34443  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34444  # $tmpfile is the local file name for the downloaded file.
34445  VALID_TOOL=no
34446  if test "x$BDEPS_FTP" = xwget; then
34447    VALID_TOOL=yes
34448    wget -O $tmpfile $with_builddeps_server/$resource
34449  fi
34450  if test "x$BDEPS_FTP" = xlftp; then
34451    VALID_TOOL=yes
34452    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34453  fi
34454  if test "x$BDEPS_FTP" = xftp; then
34455    VALID_TOOL=yes
34456    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34457    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34458    FTPUSERPWD=${FTPSERVER%%@*}
34459    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34460      FTPUSER=${userpwd%%:*}
34461      FTPPWD=${userpwd#*@}
34462      FTPSERVER=${FTPSERVER#*@}
34463    else
34464      FTPUSER=ftp
34465      FTPPWD=ftp
34466    fi
34467    # the "pass" command does not work on some
34468    # ftp clients (read ftp.exe) but if it works,
34469    # passive mode is better!
34470    ( \
34471        echo "user $FTPUSER $FTPPWD"        ; \
34472        echo "pass"                         ; \
34473        echo "bin"                          ; \
34474        echo "get $FTPPATH $tmpfile"              ; \
34475    ) | ftp -in $FTPSERVER
34476  fi
34477  if test "x$VALID_TOOL" != xyes; then
34478    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34479  fi
34480
34481    mv $tmpfile $installdir/$filename
34482    if test ! -s $installdir/$filename; then
34483      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34484    fi
34485    case "$extension" in
34486      zip)  echo "Unzipping $installdir/$filename..."
34487        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34488        ;;
34489      tar.gz) echo "Untaring $installdir/$filename..."
34490        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34491        ;;
34492      tgz) echo "Untaring $installdir/$filename..."
34493        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34494        ;;
34495      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34496        ;;
34497    esac
34498  fi
34499  if test -f $installdir/$filename.unpacked; then
34500    depdir=$installdir
34501  fi
34502
34503      fi
34504      # Source the builddeps file again, because in the previous command, the depdir
34505      # was updated to point at the current build dependency install directory.
34506      . $builddepsfile
34507      # Now extract variables from the builddeps.conf files.
34508      theroot=${builddep_alsa_ROOT}
34509      thecflags=${builddep_alsa_CFLAGS}
34510      thelibs=${builddep_alsa_LIBS}
34511      if test "x$depdir" = x; then
34512        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34513      fi
34514      ALSA=$depdir
34515      if test "x$theroot" != x; then
34516        ALSA="$theroot"
34517      fi
34518      if test "x$thecflags" != x; then
34519        ALSA_CFLAGS="$thecflags"
34520      fi
34521      if test "x$thelibs" != x; then
34522        ALSA_LIBS="$thelibs"
34523      fi
34524      ALSA_FOUND=yes
34525      else ALSA_FOUND=no
34526
34527    fi
34528    else ALSA_FOUND=no
34529
34530  fi
34531
34532    fi
34533    if test "x$ALSA_FOUND" = xno; then
34534
34535pkg_failed=no
34536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34537$as_echo_n "checking for ALSA... " >&6; }
34538
34539if test -n "$ALSA_CFLAGS"; then
34540    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34541 elif test -n "$PKG_CONFIG"; then
34542    if test -n "$PKG_CONFIG" && \
34543    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34544  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34545  ac_status=$?
34546  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34547  test $ac_status = 0; }; then
34548  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34549else
34550  pkg_failed=yes
34551fi
34552 else
34553    pkg_failed=untried
34554fi
34555if test -n "$ALSA_LIBS"; then
34556    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34557 elif test -n "$PKG_CONFIG"; then
34558    if test -n "$PKG_CONFIG" && \
34559    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34560  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34561  ac_status=$?
34562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34563  test $ac_status = 0; }; then
34564  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34565else
34566  pkg_failed=yes
34567fi
34568 else
34569    pkg_failed=untried
34570fi
34571
34572
34573
34574if test $pkg_failed = yes; then
34575
34576if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34577        _pkg_short_errors_supported=yes
34578else
34579        _pkg_short_errors_supported=no
34580fi
34581        if test $_pkg_short_errors_supported = yes; then
34582	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34583        else
34584	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34585        fi
34586	# Put the nasty error message in config.log where it belongs
34587	echo "$ALSA_PKG_ERRORS" >&5
34588
34589	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34590$as_echo "no" >&6; }
34591                ALSA_FOUND=no
34592elif test $pkg_failed = untried; then
34593	ALSA_FOUND=no
34594else
34595	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34596	ALSA_LIBS=$pkg_cv_ALSA_LIBS
34597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34598$as_echo "yes" >&6; }
34599	ALSA_FOUND=yes
34600fi
34601    fi
34602    if test "x$ALSA_FOUND" = xno; then
34603      for ac_header in alsa/asoundlib.h
34604do :
34605  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34606if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34607  cat >>confdefs.h <<_ACEOF
34608#define HAVE_ALSA_ASOUNDLIB_H 1
34609_ACEOF
34610
34611            ALSA_FOUND=yes
34612            ALSA_CFLAGS=-Iignoreme
34613            ALSA_LIBS=-lasound
34614            DEFAULT_ALSA=yes
34615
34616else
34617  ALSA_FOUND=no
34618fi
34619
34620done
34621
34622    fi
34623    if test "x$ALSA_FOUND" = xno; then
34624
34625  # Print a helpful message on how to acquire the necessary build dependency.
34626  # alsa is the help tag: freetype, cups, pulse, alsa etc
34627  MISSING_DEPENDENCY=alsa
34628
34629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34630    cygwin_help $MISSING_DEPENDENCY
34631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34632    msys_help $MISSING_DEPENDENCY
34633  else
34634    PKGHANDLER_COMMAND=
34635
34636    case $PKGHANDLER in
34637      apt-get)
34638        apt_help     $MISSING_DEPENDENCY ;;
34639      yum)
34640        yum_help     $MISSING_DEPENDENCY ;;
34641      port)
34642        port_help    $MISSING_DEPENDENCY ;;
34643      pkgutil)
34644        pkgutil_help $MISSING_DEPENDENCY ;;
34645      pkgadd)
34646        pkgadd_help  $MISSING_DEPENDENCY ;;
34647      * )
34648        break ;;
34649    esac
34650
34651    if test "x$PKGHANDLER_COMMAND" != x; then
34652      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34653    fi
34654  fi
34655
34656      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34657    fi
34658  fi
34659
34660
34661
34662
34663
34664
34665  ###############################################################################
34666  #
34667  # Check for the jpeg library
34668  #
34669
34670  USE_EXTERNAL_LIBJPEG=true
34671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34672$as_echo_n "checking for main in -ljpeg... " >&6; }
34673if ${ac_cv_lib_jpeg_main+:} false; then :
34674  $as_echo_n "(cached) " >&6
34675else
34676  ac_check_lib_save_LIBS=$LIBS
34677LIBS="-ljpeg  $LIBS"
34678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34679/* end confdefs.h.  */
34680
34681
34682int
34683main ()
34684{
34685return main ();
34686  ;
34687  return 0;
34688}
34689_ACEOF
34690if ac_fn_cxx_try_link "$LINENO"; then :
34691  ac_cv_lib_jpeg_main=yes
34692else
34693  ac_cv_lib_jpeg_main=no
34694fi
34695rm -f core conftest.err conftest.$ac_objext \
34696    conftest$ac_exeext conftest.$ac_ext
34697LIBS=$ac_check_lib_save_LIBS
34698fi
34699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34700$as_echo "$ac_cv_lib_jpeg_main" >&6; }
34701if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34702  cat >>confdefs.h <<_ACEOF
34703#define HAVE_LIBJPEG 1
34704_ACEOF
34705
34706  LIBS="-ljpeg $LIBS"
34707
34708else
34709   USE_EXTERNAL_LIBJPEG=false
34710      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34711$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34712
34713fi
34714
34715
34716
34717  ###############################################################################
34718  #
34719  # Check for the gif library
34720  #
34721
34722
34723# Check whether --with-giflib was given.
34724if test "${with_giflib+set}" = set; then :
34725  withval=$with_giflib;
34726fi
34727
34728
34729
34730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34731$as_echo_n "checking for which giflib to use... " >&6; }
34732
34733  # default is bundled
34734  DEFAULT_GIFLIB=bundled
34735
34736  #
34737  # if user didn't specify, use DEFAULT_GIFLIB
34738  #
34739  if test "x${with_giflib}" = "x"; then
34740    with_giflib=${DEFAULT_GIFLIB}
34741  fi
34742
34743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34744$as_echo "${with_giflib}" >&6; }
34745
34746  if test "x${with_giflib}" = "xbundled"; then
34747    USE_EXTERNAL_LIBGIF=false
34748  elif test "x${with_giflib}" = "xsystem"; then
34749    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34750if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34751
34752else
34753   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34754fi
34755
34756
34757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34758$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34759if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34760  $as_echo_n "(cached) " >&6
34761else
34762  ac_check_lib_save_LIBS=$LIBS
34763LIBS="-lgif  $LIBS"
34764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34765/* end confdefs.h.  */
34766
34767/* Override any GCC internal prototype to avoid an error.
34768   Use char because int might match the return type of a GCC
34769   builtin and then its argument prototype would still apply.  */
34770#ifdef __cplusplus
34771extern "C"
34772#endif
34773char DGifGetCode ();
34774int
34775main ()
34776{
34777return DGifGetCode ();
34778  ;
34779  return 0;
34780}
34781_ACEOF
34782if ac_fn_cxx_try_link "$LINENO"; then :
34783  ac_cv_lib_gif_DGifGetCode=yes
34784else
34785  ac_cv_lib_gif_DGifGetCode=no
34786fi
34787rm -f core conftest.err conftest.$ac_objext \
34788    conftest$ac_exeext conftest.$ac_ext
34789LIBS=$ac_check_lib_save_LIBS
34790fi
34791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
34792$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
34793if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
34794  cat >>confdefs.h <<_ACEOF
34795#define HAVE_LIBGIF 1
34796_ACEOF
34797
34798  LIBS="-lgif $LIBS"
34799
34800else
34801   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
34802fi
34803
34804
34805    USE_EXTERNAL_LIBGIF=true
34806  else
34807    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
34808  fi
34809
34810
34811  ###############################################################################
34812  #
34813  # Check for the zlib library
34814  #
34815
34816
34817# Check whether --with-zlib was given.
34818if test "${with_zlib+set}" = set; then :
34819  withval=$with_zlib;
34820fi
34821
34822
34823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
34824$as_echo_n "checking for compress in -lz... " >&6; }
34825if ${ac_cv_lib_z_compress+:} false; then :
34826  $as_echo_n "(cached) " >&6
34827else
34828  ac_check_lib_save_LIBS=$LIBS
34829LIBS="-lz  $LIBS"
34830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34831/* end confdefs.h.  */
34832
34833/* Override any GCC internal prototype to avoid an error.
34834   Use char because int might match the return type of a GCC
34835   builtin and then its argument prototype would still apply.  */
34836#ifdef __cplusplus
34837extern "C"
34838#endif
34839char compress ();
34840int
34841main ()
34842{
34843return compress ();
34844  ;
34845  return 0;
34846}
34847_ACEOF
34848if ac_fn_cxx_try_link "$LINENO"; then :
34849  ac_cv_lib_z_compress=yes
34850else
34851  ac_cv_lib_z_compress=no
34852fi
34853rm -f core conftest.err conftest.$ac_objext \
34854    conftest$ac_exeext conftest.$ac_ext
34855LIBS=$ac_check_lib_save_LIBS
34856fi
34857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
34858$as_echo "$ac_cv_lib_z_compress" >&6; }
34859if test "x$ac_cv_lib_z_compress" = xyes; then :
34860   ZLIB_FOUND=yes
34861else
34862   ZLIB_FOUND=no
34863fi
34864
34865
34866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
34867$as_echo_n "checking for which zlib to use... " >&6; }
34868
34869  DEFAULT_ZLIB=bundled
34870  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
34871    #
34872    # On macosx default is system...on others default is
34873    #
34874    DEFAULT_ZLIB=system
34875  fi
34876
34877  if test "x${ZLIB_FOUND}" != "xyes"; then
34878    #
34879    # If we don't find any system...set default to bundled
34880    #
34881    DEFAULT_ZLIB=bundled
34882  fi
34883
34884  #
34885  # If user didn't specify, use DEFAULT_ZLIB
34886  #
34887  if test "x${with_zlib}" = "x"; then
34888    with_zlib=${DEFAULT_ZLIB}
34889  fi
34890
34891  if test "x${with_zlib}" = "xbundled"; then
34892    USE_EXTERNAL_LIBZ=false
34893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
34894$as_echo "bundled" >&6; }
34895  elif test "x${with_zlib}" = "xsystem"; then
34896    if test "x${ZLIB_FOUND}" = "xyes"; then
34897      USE_EXTERNAL_LIBZ=true
34898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
34899$as_echo "system" >&6; }
34900    else
34901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
34902$as_echo "system not found" >&6; }
34903      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
34904    fi
34905  else
34906    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
34907  fi
34908
34909
34910
34911  ###############################################################################
34912  LIBZIP_CAN_USE_MMAP=true
34913
34914
34915
34916  ###############################################################################
34917  #
34918  # Check if altzone exists in time.h
34919  #
34920
34921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34922/* end confdefs.h.  */
34923#include <time.h>
34924int
34925main ()
34926{
34927return (int)altzone;
34928  ;
34929  return 0;
34930}
34931_ACEOF
34932if ac_fn_cxx_try_link "$LINENO"; then :
34933  has_altzone=yes
34934else
34935  has_altzone=no
34936fi
34937rm -f core conftest.err conftest.$ac_objext \
34938    conftest$ac_exeext conftest.$ac_ext
34939  if test "x$has_altzone" = xyes; then
34940
34941$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
34942
34943  fi
34944
34945  ###############################################################################
34946  #
34947  # Check the maths library
34948  #
34949
34950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
34951$as_echo_n "checking for cos in -lm... " >&6; }
34952if ${ac_cv_lib_m_cos+:} false; then :
34953  $as_echo_n "(cached) " >&6
34954else
34955  ac_check_lib_save_LIBS=$LIBS
34956LIBS="-lm  $LIBS"
34957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34958/* end confdefs.h.  */
34959
34960/* Override any GCC internal prototype to avoid an error.
34961   Use char because int might match the return type of a GCC
34962   builtin and then its argument prototype would still apply.  */
34963#ifdef __cplusplus
34964extern "C"
34965#endif
34966char cos ();
34967int
34968main ()
34969{
34970return cos ();
34971  ;
34972  return 0;
34973}
34974_ACEOF
34975if ac_fn_cxx_try_link "$LINENO"; then :
34976  ac_cv_lib_m_cos=yes
34977else
34978  ac_cv_lib_m_cos=no
34979fi
34980rm -f core conftest.err conftest.$ac_objext \
34981    conftest$ac_exeext conftest.$ac_ext
34982LIBS=$ac_check_lib_save_LIBS
34983fi
34984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
34985$as_echo "$ac_cv_lib_m_cos" >&6; }
34986if test "x$ac_cv_lib_m_cos" = xyes; then :
34987  cat >>confdefs.h <<_ACEOF
34988#define HAVE_LIBM 1
34989_ACEOF
34990
34991  LIBS="-lm $LIBS"
34992
34993else
34994
34995        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
34996$as_echo "$as_me: Maths library was not found" >&6;}
34997
34998
34999fi
35000
35001
35002
35003  ###############################################################################
35004  #
35005  # Check for libdl.so
35006
35007  save_LIBS="$LIBS"
35008  LIBS=""
35009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35010$as_echo_n "checking for dlopen in -ldl... " >&6; }
35011if ${ac_cv_lib_dl_dlopen+:} false; then :
35012  $as_echo_n "(cached) " >&6
35013else
35014  ac_check_lib_save_LIBS=$LIBS
35015LIBS="-ldl  $LIBS"
35016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35017/* end confdefs.h.  */
35018
35019/* Override any GCC internal prototype to avoid an error.
35020   Use char because int might match the return type of a GCC
35021   builtin and then its argument prototype would still apply.  */
35022#ifdef __cplusplus
35023extern "C"
35024#endif
35025char dlopen ();
35026int
35027main ()
35028{
35029return dlopen ();
35030  ;
35031  return 0;
35032}
35033_ACEOF
35034if ac_fn_cxx_try_link "$LINENO"; then :
35035  ac_cv_lib_dl_dlopen=yes
35036else
35037  ac_cv_lib_dl_dlopen=no
35038fi
35039rm -f core conftest.err conftest.$ac_objext \
35040    conftest$ac_exeext conftest.$ac_ext
35041LIBS=$ac_check_lib_save_LIBS
35042fi
35043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35044$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35045if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35046  cat >>confdefs.h <<_ACEOF
35047#define HAVE_LIBDL 1
35048_ACEOF
35049
35050  LIBS="-ldl $LIBS"
35051
35052fi
35053
35054  LIBDL="$LIBS"
35055
35056  LIBS="$save_LIBS"
35057
35058
35059  ###############################################################################
35060  #
35061  # statically link libstdc++ before C++ ABI is stablized on Linux unless
35062  # dynamic build is configured on command line.
35063  #
35064
35065# Check whether --with-stdc++lib was given.
35066if test "${with_stdc__lib+set}" = set; then :
35067  withval=$with_stdc__lib;
35068        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35069                && test "x$with_stdc__lib" != xdefault; then
35070          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35071        fi
35072
35073else
35074  with_stdc__lib=default
35075
35076fi
35077
35078
35079  if test "x$OPENJDK_TARGET_OS" = xlinux; then
35080    # Test if -lstdc++ works.
35081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35082$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35083    ac_ext=cpp
35084ac_cpp='$CXXCPP $CPPFLAGS'
35085ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35086ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35087ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35088
35089    OLD_CXXFLAGS="$CXXFLAGS"
35090    CXXFLAGS="$CXXFLAGS -lstdc++"
35091    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35092/* end confdefs.h.  */
35093
35094int
35095main ()
35096{
35097return 0;
35098  ;
35099  return 0;
35100}
35101_ACEOF
35102if ac_fn_cxx_try_link "$LINENO"; then :
35103  has_dynamic_libstdcxx=yes
35104else
35105  has_dynamic_libstdcxx=no
35106fi
35107rm -f core conftest.err conftest.$ac_objext \
35108    conftest$ac_exeext conftest.$ac_ext
35109    CXXFLAGS="$OLD_CXXFLAGS"
35110    ac_ext=cpp
35111ac_cpp='$CXXCPP $CPPFLAGS'
35112ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35113ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35114ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35115
35116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35117$as_echo "$has_dynamic_libstdcxx" >&6; }
35118
35119    # Test if stdc++ can be linked statically.
35120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35121$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35122    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35123    ac_ext=cpp
35124ac_cpp='$CXXCPP $CPPFLAGS'
35125ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35126ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35127ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35128
35129    OLD_LIBS="$LIBS"
35130    OLD_CXX="$CXX"
35131    LIBS="$STATIC_STDCXX_FLAGS"
35132    CXX="$CC"
35133    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35134/* end confdefs.h.  */
35135
35136int
35137main ()
35138{
35139return 0;
35140  ;
35141  return 0;
35142}
35143_ACEOF
35144if ac_fn_cxx_try_link "$LINENO"; then :
35145  has_static_libstdcxx=yes
35146else
35147  has_static_libstdcxx=no
35148fi
35149rm -f core conftest.err conftest.$ac_objext \
35150    conftest$ac_exeext conftest.$ac_ext
35151    LIBS="$OLD_LIBS"
35152    CXX="$OLD_CXX"
35153    ac_ext=cpp
35154ac_cpp='$CXXCPP $CPPFLAGS'
35155ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35156ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35157ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35158
35159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35160$as_echo "$has_static_libstdcxx" >&6; }
35161
35162    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35163      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35164    fi
35165
35166    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35167      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35168    fi
35169
35170    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35171      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35172    fi
35173
35174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35175$as_echo_n "checking how to link with libstdc++... " >&6; }
35176    # If dynamic was requested, it's available since it would fail above otherwise.
35177    # If dynamic wasn't requested, go with static unless it isn't available.
35178    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35179      LIBCXX="$LIBCXX -lstdc++"
35180      LDCXX="$CXX"
35181      STATIC_CXX_SETTING="STATIC_CXX=false"
35182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35183$as_echo "dynamic" >&6; }
35184    else
35185      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35186      LDCXX="$CC"
35187      STATIC_CXX_SETTING="STATIC_CXX=true"
35188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35189$as_echo "static" >&6; }
35190    fi
35191  fi
35192
35193
35194  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35195    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35196
35197pkg_failed=no
35198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35199$as_echo_n "checking for LIBFFI... " >&6; }
35200
35201if test -n "$LIBFFI_CFLAGS"; then
35202    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35203 elif test -n "$PKG_CONFIG"; then
35204    if test -n "$PKG_CONFIG" && \
35205    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35206  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35207  ac_status=$?
35208  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35209  test $ac_status = 0; }; then
35210  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35211else
35212  pkg_failed=yes
35213fi
35214 else
35215    pkg_failed=untried
35216fi
35217if test -n "$LIBFFI_LIBS"; then
35218    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35219 elif test -n "$PKG_CONFIG"; then
35220    if test -n "$PKG_CONFIG" && \
35221    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35222  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35223  ac_status=$?
35224  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35225  test $ac_status = 0; }; then
35226  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35227else
35228  pkg_failed=yes
35229fi
35230 else
35231    pkg_failed=untried
35232fi
35233
35234
35235
35236if test $pkg_failed = yes; then
35237
35238if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35239        _pkg_short_errors_supported=yes
35240else
35241        _pkg_short_errors_supported=no
35242fi
35243        if test $_pkg_short_errors_supported = yes; then
35244	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35245        else
35246	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35247        fi
35248	# Put the nasty error message in config.log where it belongs
35249	echo "$LIBFFI_PKG_ERRORS" >&5
35250
35251	as_fn_error $? "Package requirements (libffi) were not met:
35252
35253$LIBFFI_PKG_ERRORS
35254
35255Consider adjusting the PKG_CONFIG_PATH environment variable if you
35256installed software in a non-standard prefix.
35257
35258Alternatively, you may set the environment variables LIBFFI_CFLAGS
35259and LIBFFI_LIBS to avoid the need to call pkg-config.
35260See the pkg-config man page for more details.
35261" "$LINENO" 5
35262elif test $pkg_failed = untried; then
35263	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35265as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35266is in your PATH or set the PKG_CONFIG environment variable to the full
35267path to pkg-config.
35268
35269Alternatively, you may set the environment variables LIBFFI_CFLAGS
35270and LIBFFI_LIBS to avoid the need to call pkg-config.
35271See the pkg-config man page for more details.
35272
35273To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35274See \`config.log' for more details" "$LINENO" 5; }
35275else
35276	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35277	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35279$as_echo "yes" >&6; }
35280	:
35281fi
35282
35283  fi
35284
35285  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35286    # Extract the first word of "llvm-config", so it can be a program name with args.
35287set dummy llvm-config; ac_word=$2
35288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35289$as_echo_n "checking for $ac_word... " >&6; }
35290if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35291  $as_echo_n "(cached) " >&6
35292else
35293  if test -n "$LLVM_CONFIG"; then
35294  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35295else
35296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35297for as_dir in $PATH
35298do
35299  IFS=$as_save_IFS
35300  test -z "$as_dir" && as_dir=.
35301    for ac_exec_ext in '' $ac_executable_extensions; do
35302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35303    ac_cv_prog_LLVM_CONFIG="llvm-config"
35304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35305    break 2
35306  fi
35307done
35308  done
35309IFS=$as_save_IFS
35310
35311fi
35312fi
35313LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35314if test -n "$LLVM_CONFIG"; then
35315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35316$as_echo "$LLVM_CONFIG" >&6; }
35317else
35318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35319$as_echo "no" >&6; }
35320fi
35321
35322
35323
35324    if test "x$LLVM_CONFIG" != xllvm-config; then
35325      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35326    fi
35327
35328    llvm_components="jit mcjit engine nativecodegen native"
35329    unset LLVM_CFLAGS
35330    for flag in $("$LLVM_CONFIG" --cxxflags); do
35331      if echo "${flag}" | grep -q '^-[ID]'; then
35332        if test "${flag}" != "-D_DEBUG" ; then
35333          if test "${LLVM_CFLAGS}" != "" ; then
35334            LLVM_CFLAGS="${LLVM_CFLAGS} "
35335          fi
35336          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35337        fi
35338      fi
35339    done
35340    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35341    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35342
35343    unset LLVM_LDFLAGS
35344    for flag in $("${LLVM_CONFIG}" --ldflags); do
35345      if echo "${flag}" | grep -q '^-L'; then
35346        if test "${LLVM_LDFLAGS}" != ""; then
35347          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35348        fi
35349        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35350      fi
35351    done
35352
35353    unset LLVM_LIBS
35354    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35355      if echo "${flag}" | grep -q '^-l'; then
35356        if test "${LLVM_LIBS}" != ""; then
35357          LLVM_LIBS="${LLVM_LIBS} "
35358        fi
35359        LLVM_LIBS="${LLVM_LIBS}${flag}"
35360      fi
35361    done
35362
35363
35364
35365
35366  fi
35367
35368  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35369  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35370    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35371  fi
35372
35373  # TODO better (platform agnostic) test
35374  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35375    LIBCXX="-lstdc++"
35376  fi
35377
35378
35379
35380
35381
35382###############################################################################
35383#
35384# We need to do some final tweaking, when everything else is done.
35385#
35386###############################################################################
35387
35388
35389  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35390
35391
35392  # The name of the Service Agent jar.
35393  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35394  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35395    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35396  fi
35397
35398
35399
35400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35401$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35402
35403    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35404      ENABLE_INTREE_EC=yes
35405      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35406$as_echo "yes" >&6; }
35407    else
35408      ENABLE_INTREE_EC=no
35409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35410$as_echo "no" >&6; }
35411    fi
35412
35413
35414
35415
35416###############################################################################
35417#
35418# Configure parts of the build that only affect the build performance,
35419# not the result.
35420#
35421###############################################################################
35422
35423
35424  # How many cores do we have on this build system?
35425
35426# Check whether --with-num-cores was given.
35427if test "${with_num_cores+set}" = set; then :
35428  withval=$with_num_cores;
35429fi
35430
35431  if test "x$with_num_cores" = x; then
35432    # The number of cores were not specified, try to probe them.
35433
35434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35435$as_echo_n "checking for number of cores... " >&6; }
35436  NUM_CORES=1
35437  FOUND_CORES=no
35438
35439  if test -f /proc/cpuinfo; then
35440    # Looks like a Linux (or cygwin) system
35441    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35442    FOUND_CORES=yes
35443  elif test -x /usr/sbin/psrinfo; then
35444    # Looks like a Solaris system
35445    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35446    FOUND_CORES=yes
35447  elif test -x /usr/sbin/system_profiler; then
35448    # Looks like a MacOSX system
35449    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35450    FOUND_CORES=yes
35451  elif test -n "$NUMBER_OF_PROCESSORS"; then
35452    # On windows, look in the env
35453    NUM_CORES=$NUMBER_OF_PROCESSORS
35454    FOUND_CORES=yes
35455  fi
35456
35457  if test "x$FOUND_CORES" = xyes; then
35458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35459$as_echo "$NUM_CORES" >&6; }
35460  else
35461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35462$as_echo "could not detect number of cores, defaulting to 1" >&6; }
35463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35464$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35465  fi
35466
35467  else
35468    NUM_CORES=$with_num_cores
35469  fi
35470
35471
35472
35473  # How much memory do we have on this build system?
35474
35475# Check whether --with-memory-size was given.
35476if test "${with_memory_size+set}" = set; then :
35477  withval=$with_memory_size;
35478fi
35479
35480  if test "x$with_memory_size" = x; then
35481    # The memory size was not specified, try to probe it.
35482
35483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35484$as_echo_n "checking for memory size... " >&6; }
35485  # Default to 1024 MB
35486  MEMORY_SIZE=1024
35487  FOUND_MEM=no
35488
35489  if test -f /proc/meminfo; then
35490    # Looks like a Linux (or cygwin) system
35491    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35492    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35493    FOUND_MEM=yes
35494  elif test -x /usr/sbin/prtconf; then
35495    # Looks like a Solaris system
35496    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
35497    FOUND_MEM=yes
35498  elif test -x /usr/sbin/system_profiler; then
35499    # Looks like a MacOSX system
35500    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35501    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35502    FOUND_MEM=yes
35503  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35504    # Windows, but without cygwin
35505    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35506    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35507    FOUND_MEM=yes
35508  fi
35509
35510  if test "x$FOUND_MEM" = xyes; then
35511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35512$as_echo "$MEMORY_SIZE MB" >&6; }
35513  else
35514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35515$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35516    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35517$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35518  fi
35519
35520  else
35521    MEMORY_SIZE=$with_memory_size
35522  fi
35523
35524
35525
35526  # Provide a decent default number of parallel jobs for make depending on
35527  # number of cores, amount of memory and machine architecture.
35528
35529# Check whether --with-jobs was given.
35530if test "${with_jobs+set}" = set; then :
35531  withval=$with_jobs;
35532fi
35533
35534  if test "x$with_jobs" = x; then
35535    # Number of jobs was not specified, calculate.
35536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35537$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35538    # Approximate memory in GB, rounding up a bit.
35539    memory_gb=`expr $MEMORY_SIZE / 1100`
35540    # Pick the lowest of memory in gb and number of cores.
35541    if test "$memory_gb" -lt "$NUM_CORES"; then
35542      JOBS="$memory_gb"
35543    else
35544      JOBS="$NUM_CORES"
35545      # On bigger machines, leave some room for other processes to run
35546      if test "$JOBS" -gt "4"; then
35547        JOBS=`expr $JOBS '*' 90 / 100`
35548      fi
35549    fi
35550    # Cap number of jobs to 16
35551    if test "$JOBS" -gt "16"; then
35552      JOBS=16
35553    fi
35554    if test "$JOBS" -eq "0"; then
35555      JOBS=1
35556    fi
35557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35558$as_echo "$JOBS" >&6; }
35559  else
35560    JOBS=$with_jobs
35561  fi
35562
35563
35564
35565# Setup smart javac (after cores and memory have been setup)
35566
35567
35568# Check whether --with-sjavac-server-java was given.
35569if test "${with_sjavac_server_java+set}" = set; then :
35570  withval=$with_sjavac_server_java;
35571fi
35572
35573
35574  if test "x$with_sjavac_server_java" != x; then
35575    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35576    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35577    if test "x$FOUND_VERSION" = x; then
35578      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35579    fi
35580  else
35581    SJAVAC_SERVER_JAVA=""
35582    # Hotspot specific options.
35583
35584  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35585  $ECHO "Command: $JAVA -verbosegc -version" >&5
35586  OUTPUT=`$JAVA -verbosegc -version 2>&1`
35587  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35588  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35589  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35590    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35591    JVM_ARG_OK=true
35592  else
35593    $ECHO "Arg failed:" >&5
35594    $ECHO "$OUTPUT" >&5
35595    JVM_ARG_OK=false
35596  fi
35597
35598    # JRockit specific options.
35599
35600  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35601  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35602  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35603  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35604  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35605  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35606    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35607    JVM_ARG_OK=true
35608  else
35609    $ECHO "Arg failed:" >&5
35610    $ECHO "$OUTPUT" >&5
35611    JVM_ARG_OK=false
35612  fi
35613
35614    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35615  fi
35616
35617
35618  if test "$MEMORY_SIZE" -gt "2500"; then
35619
35620  $ECHO "Check if jvm arg is ok: -d64" >&5
35621  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35622  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35623  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35624  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35625  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35626    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35627    JVM_ARG_OK=true
35628  else
35629    $ECHO "Arg failed:" >&5
35630    $ECHO "$OUTPUT" >&5
35631    JVM_ARG_OK=false
35632  fi
35633
35634    if test "$JVM_ARG_OK" = true; then
35635      JVM_64BIT=true
35636      JVM_ARG_OK=false
35637    fi
35638  fi
35639
35640  if test "$JVM_64BIT" = true; then
35641    if test "$MEMORY_SIZE" -gt "17000"; then
35642
35643  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35644  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35645  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35646  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35647  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35648  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35649    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35650    JVM_ARG_OK=true
35651  else
35652    $ECHO "Arg failed:" >&5
35653    $ECHO "$OUTPUT" >&5
35654    JVM_ARG_OK=false
35655  fi
35656
35657    fi
35658    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35659
35660  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35661  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35662  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35663  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35664  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35665  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35666    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35667    JVM_ARG_OK=true
35668  else
35669    $ECHO "Arg failed:" >&5
35670    $ECHO "$OUTPUT" >&5
35671    JVM_ARG_OK=false
35672  fi
35673
35674    fi
35675    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35676
35677  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35678  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35679  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35680  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35681  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35682  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35683    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35684    JVM_ARG_OK=true
35685  else
35686    $ECHO "Arg failed:" >&5
35687    $ECHO "$OUTPUT" >&5
35688    JVM_ARG_OK=false
35689  fi
35690
35691    fi
35692    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35693
35694  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35695  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35696  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35697  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35698  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35699  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35700    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35701    JVM_ARG_OK=true
35702  else
35703    $ECHO "Arg failed:" >&5
35704    $ECHO "$OUTPUT" >&5
35705    JVM_ARG_OK=false
35706  fi
35707
35708    fi
35709  fi
35710  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35711
35712  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35713  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35714  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35715  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35716  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35717  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35718    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35719    JVM_ARG_OK=true
35720  else
35721    $ECHO "Arg failed:" >&5
35722    $ECHO "$OUTPUT" >&5
35723    JVM_ARG_OK=false
35724  fi
35725
35726  fi
35727  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35728
35729  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35730  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35731  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35732  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35733  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35734  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35735    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35736    JVM_ARG_OK=true
35737  else
35738    $ECHO "Arg failed:" >&5
35739    $ECHO "$OUTPUT" >&5
35740    JVM_ARG_OK=false
35741  fi
35742
35743  fi
35744  if test "$JVM_ARG_OK" = false; then
35745
35746  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35747  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35748  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35749  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35750  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35751  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35752    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35753    JVM_ARG_OK=true
35754  else
35755    $ECHO "Arg failed:" >&5
35756    $ECHO "$OUTPUT" >&5
35757    JVM_ARG_OK=false
35758  fi
35759
35760  fi
35761
35762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35763$as_echo_n "checking whether to use sjavac... " >&6; }
35764  # Check whether --enable-sjavac was given.
35765if test "${enable_sjavac+set}" = set; then :
35766  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35767else
35768  ENABLE_SJAVAC='no'
35769fi
35770
35771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
35772$as_echo "$ENABLE_SJAVAC" >&6; }
35773
35774
35775  if test "x$ENABLE_SJAVAC" = xyes; then
35776    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
35777  else
35778    SJAVAC_SERVER_DIR=
35779  fi
35780
35781
35782
35783# Can the C/C++ compiler use precompiled headers?
35784
35785
35786  ###############################################################################
35787  #
35788  # Can the C/C++ compiler use precompiled headers?
35789  #
35790  # Check whether --enable-precompiled-headers was given.
35791if test "${enable_precompiled_headers+set}" = set; then :
35792  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
35793else
35794  ENABLE_PRECOMPH=yes
35795fi
35796
35797
35798  USE_PRECOMPILED_HEADER=1
35799  if test "x$ENABLE_PRECOMPH" = xno; then
35800    USE_PRECOMPILED_HEADER=0
35801  fi
35802
35803  if test "x$ENABLE_PRECOMPH" = xyes; then
35804    # Check that the compiler actually supports precomp headers.
35805    if test "x$GCC" = xyes; then
35806      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
35807$as_echo_n "checking that precompiled headers work... " >&6; }
35808      echo "int alfa();" > conftest.h
35809      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
35810      if test ! -f conftest.hpp.gch; then
35811        USE_PRECOMPILED_HEADER=0
35812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35813$as_echo "no" >&6; }
35814      else
35815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35816$as_echo "yes" >&6; }
35817      fi
35818      rm -f conftest.h conftest.hpp.gch
35819    fi
35820  fi
35821
35822
35823
35824
35825# Setup use of ccache, if available
35826
35827  # Check whether --enable-ccache was given.
35828if test "${enable_ccache+set}" = set; then :
35829  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
35830else
35831  ENABLE_CCACHE=yes
35832fi
35833
35834  if test "x$ENABLE_CCACHE" = xyes; then
35835    OLD_PATH="$PATH"
35836    if test "x$TOOLS_DIR" != x; then
35837      PATH=$TOOLS_DIR:$PATH
35838    fi
35839    # Extract the first word of "ccache", so it can be a program name with args.
35840set dummy ccache; ac_word=$2
35841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35842$as_echo_n "checking for $ac_word... " >&6; }
35843if ${ac_cv_path_CCACHE+:} false; then :
35844  $as_echo_n "(cached) " >&6
35845else
35846  case $CCACHE in
35847  [\\/]* | ?:[\\/]*)
35848  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
35849  ;;
35850  *)
35851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35852for as_dir in $PATH
35853do
35854  IFS=$as_save_IFS
35855  test -z "$as_dir" && as_dir=.
35856    for ac_exec_ext in '' $ac_executable_extensions; do
35857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35858    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
35859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35860    break 2
35861  fi
35862done
35863  done
35864IFS=$as_save_IFS
35865
35866  ;;
35867esac
35868fi
35869CCACHE=$ac_cv_path_CCACHE
35870if test -n "$CCACHE"; then
35871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
35872$as_echo "$CCACHE" >&6; }
35873else
35874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35875$as_echo "no" >&6; }
35876fi
35877
35878
35879    PATH="$OLD_PATH"
35880  else
35881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
35882$as_echo_n "checking for ccache... " >&6; }
35883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
35884$as_echo "explicitly disabled" >&6; }
35885    CCACHE=
35886  fi
35887
35888
35889
35890# Check whether --with-ccache-dir was given.
35891if test "${with_ccache_dir+set}" = set; then :
35892  withval=$with_ccache_dir;
35893fi
35894
35895
35896  if test "x$with_ccache_dir" != x; then
35897    # When using a non home ccache directory, assume the use is to share ccache files
35898    # with other users. Thus change the umask.
35899    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
35900  fi
35901  CCACHE_FOUND=""
35902  if test "x$CCACHE" != x; then
35903
35904  if test "x$CCACHE" != x; then
35905    CCACHE_FOUND="true"
35906    # Only use ccache if it is 3.1.4 or later, which supports
35907    # precompiled headers.
35908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
35909$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
35910    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
35911    if test "x$HAS_GOOD_CCACHE" = x; then
35912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
35913$as_echo "no, disabling ccache" >&6; }
35914      CCACHE=
35915    else
35916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35917$as_echo "yes" >&6; }
35918      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
35919$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
35920      PUSHED_FLAGS="$CXXFLAGS"
35921      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
35922      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35923/* end confdefs.h.  */
35924
35925int
35926main ()
35927{
35928
35929  ;
35930  return 0;
35931}
35932_ACEOF
35933if ac_fn_cxx_try_compile "$LINENO"; then :
35934  CC_KNOWS_CCACHE_TRICK=yes
35935else
35936  CC_KNOWS_CCACHE_TRICK=no
35937fi
35938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35939      CXXFLAGS="$PUSHED_FLAGS"
35940      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
35941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35942$as_echo "yes" >&6; }
35943      else
35944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
35945$as_echo "no, disabling ccaching of precompiled headers" >&6; }
35946        CCACHE=
35947      fi
35948    fi
35949  fi
35950
35951  if test "x$CCACHE" != x; then
35952    CCACHE_SLOPPINESS=time_macros
35953    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
35954    CCACHE_FLAGS=-fpch-preprocess
35955
35956    if test "x$SET_CCACHE_DIR" != x; then
35957      mkdir -p $CCACHE_DIR > /dev/null 2>&1
35958      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
35959    fi
35960  fi
35961
35962  fi
35963
35964
35965###############################################################################
35966#
35967# And now the finish...
35968#
35969###############################################################################
35970
35971# Check for some common pitfalls
35972
35973  if test x"$OPENJDK_BUILD_OS" = xwindows; then
35974    file_to_test="$SRC_ROOT/LICENSE"
35975    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
35976      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
35977    fi
35978  fi
35979
35980
35981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
35982$as_echo_n "checking if build directory is on local disk... " >&6; }
35983
35984  # df -l lists only local disks; if the given directory is not found then
35985  # a non-zero exit code is given
35986  if test "x$DF" = x; then
35987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35988      # msys does not have df; use Windows "net use" instead.
35989      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
35990      if test "x$IS_NETWORK_DISK" = x; then
35991        OUTPUT_DIR_IS_LOCAL="yes"
35992      else
35993        OUTPUT_DIR_IS_LOCAL="no"
35994      fi
35995    else
35996      # No df here, say it's local
35997      OUTPUT_DIR_IS_LOCAL="yes"
35998    fi
35999  else
36000    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36001      OUTPUT_DIR_IS_LOCAL="yes"
36002    else
36003      OUTPUT_DIR_IS_LOCAL="no"
36004    fi
36005  fi
36006
36007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36008$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36009
36010
36011
36012  # Check if the user has any old-style ALT_ variables set.
36013  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36014
36015  # Before generating output files, test if they exist. If they do, this is a reconfigure.
36016  # Since we can't properly handle the dependencies for this, warn the user about the situation
36017  if test -e $OUTPUT_ROOT/spec.gmk; then
36018    IS_RECONFIGURE=yes
36019  else
36020    IS_RECONFIGURE=no
36021  fi
36022
36023  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36024    HIDE_PERFORMANCE_HINTS=yes
36025  else
36026    HIDE_PERFORMANCE_HINTS=no
36027    # Hide it the next time around...
36028    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36029  fi
36030
36031
36032# At the end, call the custom hook. (Dummy macro if no custom sources available)
36033
36034
36035# We're messing a bit with internal autoconf variables to put the config.status
36036# in the output directory instead of the current directory.
36037CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36038
36039# Create the actual output files. Now the main work of configure is done.
36040cat >confcache <<\_ACEOF
36041# This file is a shell script that caches the results of configure
36042# tests run on this system so they can be shared between configure
36043# scripts and configure runs, see configure's option --config-cache.
36044# It is not useful on other systems.  If it contains results you don't
36045# want to keep, you may remove or edit it.
36046#
36047# config.status only pays attention to the cache file if you give it
36048# the --recheck option to rerun configure.
36049#
36050# `ac_cv_env_foo' variables (set or unset) will be overridden when
36051# loading this file, other *unset* `ac_cv_foo' will be assigned the
36052# following values.
36053
36054_ACEOF
36055
36056# The following way of writing the cache mishandles newlines in values,
36057# but we know of no workaround that is simple, portable, and efficient.
36058# So, we kill variables containing newlines.
36059# Ultrix sh set writes to stderr and can't be redirected directly,
36060# and sets the high bit in the cache file unless we assign to the vars.
36061(
36062  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36063    eval ac_val=\$$ac_var
36064    case $ac_val in #(
36065    *${as_nl}*)
36066      case $ac_var in #(
36067      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36068$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36069      esac
36070      case $ac_var in #(
36071      _ | IFS | as_nl) ;; #(
36072      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36073      *) { eval $ac_var=; unset $ac_var;} ;;
36074      esac ;;
36075    esac
36076  done
36077
36078  (set) 2>&1 |
36079    case $as_nl`(ac_space=' '; set) 2>&1` in #(
36080    *${as_nl}ac_space=\ *)
36081      # `set' does not quote correctly, so add quotes: double-quote
36082      # substitution turns \\\\ into \\, and sed turns \\ into \.
36083      sed -n \
36084	"s/'/'\\\\''/g;
36085	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36086      ;; #(
36087    *)
36088      # `set' quotes correctly as required by POSIX, so do not add quotes.
36089      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36090      ;;
36091    esac |
36092    sort
36093) |
36094  sed '
36095     /^ac_cv_env_/b end
36096     t clear
36097     :clear
36098     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36099     t end
36100     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36101     :end' >>confcache
36102if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36103  if test -w "$cache_file"; then
36104    if test "x$cache_file" != "x/dev/null"; then
36105      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36106$as_echo "$as_me: updating cache $cache_file" >&6;}
36107      if test ! -f "$cache_file" || test -h "$cache_file"; then
36108	cat confcache >"$cache_file"
36109      else
36110        case $cache_file in #(
36111        */* | ?:*)
36112	  mv -f confcache "$cache_file"$$ &&
36113	  mv -f "$cache_file"$$ "$cache_file" ;; #(
36114        *)
36115	  mv -f confcache "$cache_file" ;;
36116	esac
36117      fi
36118    fi
36119  else
36120    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36121$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36122  fi
36123fi
36124rm -f confcache
36125
36126test "x$prefix" = xNONE && prefix=$ac_default_prefix
36127# Let make expand exec_prefix.
36128test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36129
36130DEFS=-DHAVE_CONFIG_H
36131
36132ac_libobjs=
36133ac_ltlibobjs=
36134U=
36135for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36136  # 1. Remove the extension, and $U if already installed.
36137  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36138  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36139  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36140  #    will be set to the directory where LIBOBJS objects are built.
36141  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36142  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36143done
36144LIBOBJS=$ac_libobjs
36145
36146LTLIBOBJS=$ac_ltlibobjs
36147
36148
36149
36150: "${CONFIG_STATUS=./config.status}"
36151ac_write_fail=0
36152ac_clean_files_save=$ac_clean_files
36153ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36154{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36155$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36156as_write_fail=0
36157cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36158#! $SHELL
36159# Generated by $as_me.
36160# Run this file to recreate the current configuration.
36161# Compiler output produced by configure, useful for debugging
36162# configure, is in config.log if it exists.
36163
36164debug=false
36165ac_cs_recheck=false
36166ac_cs_silent=false
36167
36168SHELL=\${CONFIG_SHELL-$SHELL}
36169export SHELL
36170_ASEOF
36171cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36172## -------------------- ##
36173## M4sh Initialization. ##
36174## -------------------- ##
36175
36176# Be more Bourne compatible
36177DUALCASE=1; export DUALCASE # for MKS sh
36178if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36179  emulate sh
36180  NULLCMD=:
36181  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36182  # is contrary to our usage.  Disable this feature.
36183  alias -g '${1+"$@"}'='"$@"'
36184  setopt NO_GLOB_SUBST
36185else
36186  case `(set -o) 2>/dev/null` in #(
36187  *posix*) :
36188    set -o posix ;; #(
36189  *) :
36190     ;;
36191esac
36192fi
36193
36194
36195as_nl='
36196'
36197export as_nl
36198# Printing a long string crashes Solaris 7 /usr/bin/printf.
36199as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36200as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36201as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36202# Prefer a ksh shell builtin over an external printf program on Solaris,
36203# but without wasting forks for bash or zsh.
36204if test -z "$BASH_VERSION$ZSH_VERSION" \
36205    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36206  as_echo='print -r --'
36207  as_echo_n='print -rn --'
36208elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36209  as_echo='printf %s\n'
36210  as_echo_n='printf %s'
36211else
36212  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36213    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36214    as_echo_n='/usr/ucb/echo -n'
36215  else
36216    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36217    as_echo_n_body='eval
36218      arg=$1;
36219      case $arg in #(
36220      *"$as_nl"*)
36221	expr "X$arg" : "X\\(.*\\)$as_nl";
36222	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36223      esac;
36224      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36225    '
36226    export as_echo_n_body
36227    as_echo_n='sh -c $as_echo_n_body as_echo'
36228  fi
36229  export as_echo_body
36230  as_echo='sh -c $as_echo_body as_echo'
36231fi
36232
36233# The user is always right.
36234if test "${PATH_SEPARATOR+set}" != set; then
36235  PATH_SEPARATOR=:
36236  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36237    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36238      PATH_SEPARATOR=';'
36239  }
36240fi
36241
36242
36243# IFS
36244# We need space, tab and new line, in precisely that order.  Quoting is
36245# there to prevent editors from complaining about space-tab.
36246# (If _AS_PATH_WALK were called with IFS unset, it would disable word
36247# splitting by setting IFS to empty value.)
36248IFS=" ""	$as_nl"
36249
36250# Find who we are.  Look in the path if we contain no directory separator.
36251as_myself=
36252case $0 in #((
36253  *[\\/]* ) as_myself=$0 ;;
36254  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36255for as_dir in $PATH
36256do
36257  IFS=$as_save_IFS
36258  test -z "$as_dir" && as_dir=.
36259    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36260  done
36261IFS=$as_save_IFS
36262
36263     ;;
36264esac
36265# We did not find ourselves, most probably we were run as `sh COMMAND'
36266# in which case we are not to be found in the path.
36267if test "x$as_myself" = x; then
36268  as_myself=$0
36269fi
36270if test ! -f "$as_myself"; then
36271  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36272  exit 1
36273fi
36274
36275# Unset variables that we do not need and which cause bugs (e.g. in
36276# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36277# suppresses any "Segmentation fault" message there.  '((' could
36278# trigger a bug in pdksh 5.2.14.
36279for as_var in BASH_ENV ENV MAIL MAILPATH
36280do eval test x\${$as_var+set} = xset \
36281  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36282done
36283PS1='$ '
36284PS2='> '
36285PS4='+ '
36286
36287# NLS nuisances.
36288LC_ALL=C
36289export LC_ALL
36290LANGUAGE=C
36291export LANGUAGE
36292
36293# CDPATH.
36294(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36295
36296
36297# as_fn_error STATUS ERROR [LINENO LOG_FD]
36298# ----------------------------------------
36299# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36300# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36301# script with STATUS, using 1 if that was 0.
36302as_fn_error ()
36303{
36304  as_status=$1; test $as_status -eq 0 && as_status=1
36305  if test "$4"; then
36306    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36307    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36308  fi
36309  $as_echo "$as_me: error: $2" >&2
36310  as_fn_exit $as_status
36311} # as_fn_error
36312
36313
36314# as_fn_set_status STATUS
36315# -----------------------
36316# Set $? to STATUS, without forking.
36317as_fn_set_status ()
36318{
36319  return $1
36320} # as_fn_set_status
36321
36322# as_fn_exit STATUS
36323# -----------------
36324# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36325as_fn_exit ()
36326{
36327  set +e
36328  as_fn_set_status $1
36329  exit $1
36330} # as_fn_exit
36331
36332# as_fn_unset VAR
36333# ---------------
36334# Portably unset VAR.
36335as_fn_unset ()
36336{
36337  { eval $1=; unset $1;}
36338}
36339as_unset=as_fn_unset
36340# as_fn_append VAR VALUE
36341# ----------------------
36342# Append the text in VALUE to the end of the definition contained in VAR. Take
36343# advantage of any shell optimizations that allow amortized linear growth over
36344# repeated appends, instead of the typical quadratic growth present in naive
36345# implementations.
36346if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36347  eval 'as_fn_append ()
36348  {
36349    eval $1+=\$2
36350  }'
36351else
36352  as_fn_append ()
36353  {
36354    eval $1=\$$1\$2
36355  }
36356fi # as_fn_append
36357
36358# as_fn_arith ARG...
36359# ------------------
36360# Perform arithmetic evaluation on the ARGs, and store the result in the
36361# global $as_val. Take advantage of shells that can avoid forks. The arguments
36362# must be portable across $(()) and expr.
36363if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36364  eval 'as_fn_arith ()
36365  {
36366    as_val=$(( $* ))
36367  }'
36368else
36369  as_fn_arith ()
36370  {
36371    as_val=`expr "$@" || test $? -eq 1`
36372  }
36373fi # as_fn_arith
36374
36375
36376if expr a : '\(a\)' >/dev/null 2>&1 &&
36377   test "X`expr 00001 : '.*\(...\)'`" = X001; then
36378  as_expr=expr
36379else
36380  as_expr=false
36381fi
36382
36383if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36384  as_basename=basename
36385else
36386  as_basename=false
36387fi
36388
36389if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36390  as_dirname=dirname
36391else
36392  as_dirname=false
36393fi
36394
36395as_me=`$as_basename -- "$0" ||
36396$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36397	 X"$0" : 'X\(//\)$' \| \
36398	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36399$as_echo X/"$0" |
36400    sed '/^.*\/\([^/][^/]*\)\/*$/{
36401	    s//\1/
36402	    q
36403	  }
36404	  /^X\/\(\/\/\)$/{
36405	    s//\1/
36406	    q
36407	  }
36408	  /^X\/\(\/\).*/{
36409	    s//\1/
36410	    q
36411	  }
36412	  s/.*/./; q'`
36413
36414# Avoid depending upon Character Ranges.
36415as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36416as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36417as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36418as_cr_digits='0123456789'
36419as_cr_alnum=$as_cr_Letters$as_cr_digits
36420
36421ECHO_C= ECHO_N= ECHO_T=
36422case `echo -n x` in #(((((
36423-n*)
36424  case `echo 'xy\c'` in
36425  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
36426  xy)  ECHO_C='\c';;
36427  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36428       ECHO_T='	';;
36429  esac;;
36430*)
36431  ECHO_N='-n';;
36432esac
36433
36434rm -f conf$$ conf$$.exe conf$$.file
36435if test -d conf$$.dir; then
36436  rm -f conf$$.dir/conf$$.file
36437else
36438  rm -f conf$$.dir
36439  mkdir conf$$.dir 2>/dev/null
36440fi
36441if (echo >conf$$.file) 2>/dev/null; then
36442  if ln -s conf$$.file conf$$ 2>/dev/null; then
36443    as_ln_s='ln -s'
36444    # ... but there are two gotchas:
36445    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36446    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36447    # In both cases, we have to default to `cp -pR'.
36448    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36449      as_ln_s='cp -pR'
36450  elif ln conf$$.file conf$$ 2>/dev/null; then
36451    as_ln_s=ln
36452  else
36453    as_ln_s='cp -pR'
36454  fi
36455else
36456  as_ln_s='cp -pR'
36457fi
36458rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36459rmdir conf$$.dir 2>/dev/null
36460
36461
36462# as_fn_mkdir_p
36463# -------------
36464# Create "$as_dir" as a directory, including parents if necessary.
36465as_fn_mkdir_p ()
36466{
36467
36468  case $as_dir in #(
36469  -*) as_dir=./$as_dir;;
36470  esac
36471  test -d "$as_dir" || eval $as_mkdir_p || {
36472    as_dirs=
36473    while :; do
36474      case $as_dir in #(
36475      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36476      *) as_qdir=$as_dir;;
36477      esac
36478      as_dirs="'$as_qdir' $as_dirs"
36479      as_dir=`$as_dirname -- "$as_dir" ||
36480$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36481	 X"$as_dir" : 'X\(//\)[^/]' \| \
36482	 X"$as_dir" : 'X\(//\)$' \| \
36483	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36484$as_echo X"$as_dir" |
36485    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36486	    s//\1/
36487	    q
36488	  }
36489	  /^X\(\/\/\)[^/].*/{
36490	    s//\1/
36491	    q
36492	  }
36493	  /^X\(\/\/\)$/{
36494	    s//\1/
36495	    q
36496	  }
36497	  /^X\(\/\).*/{
36498	    s//\1/
36499	    q
36500	  }
36501	  s/.*/./; q'`
36502      test -d "$as_dir" && break
36503    done
36504    test -z "$as_dirs" || eval "mkdir $as_dirs"
36505  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36506
36507
36508} # as_fn_mkdir_p
36509if mkdir -p . 2>/dev/null; then
36510  as_mkdir_p='mkdir -p "$as_dir"'
36511else
36512  test -d ./-p && rmdir ./-p
36513  as_mkdir_p=false
36514fi
36515
36516
36517# as_fn_executable_p FILE
36518# -----------------------
36519# Test if FILE is an executable regular file.
36520as_fn_executable_p ()
36521{
36522  test -f "$1" && test -x "$1"
36523} # as_fn_executable_p
36524as_test_x='test -x'
36525as_executable_p=as_fn_executable_p
36526
36527# Sed expression to map a string onto a valid CPP name.
36528as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36529
36530# Sed expression to map a string onto a valid variable name.
36531as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36532
36533
36534exec 6>&1
36535## ----------------------------------- ##
36536## Main body of $CONFIG_STATUS script. ##
36537## ----------------------------------- ##
36538_ASEOF
36539test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36540
36541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36542# Save the log message, to keep $0 and so on meaningful, and to
36543# report actual input values of CONFIG_FILES etc. instead of their
36544# values after options handling.
36545ac_log="
36546This file was extended by OpenJDK $as_me jdk8, which was
36547generated by GNU Autoconf 2.69.  Invocation command line was
36548
36549  CONFIG_FILES    = $CONFIG_FILES
36550  CONFIG_HEADERS  = $CONFIG_HEADERS
36551  CONFIG_LINKS    = $CONFIG_LINKS
36552  CONFIG_COMMANDS = $CONFIG_COMMANDS
36553  $ $0 $@
36554
36555on `(hostname || uname -n) 2>/dev/null | sed 1q`
36556"
36557
36558_ACEOF
36559
36560case $ac_config_files in *"
36561"*) set x $ac_config_files; shift; ac_config_files=$*;;
36562esac
36563
36564case $ac_config_headers in *"
36565"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36566esac
36567
36568
36569cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36570# Files that config.status was made for.
36571config_files="$ac_config_files"
36572config_headers="$ac_config_headers"
36573
36574_ACEOF
36575
36576cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36577ac_cs_usage="\
36578\`$as_me' instantiates files and other configuration actions
36579from templates according to the current configuration.  Unless the files
36580and actions are specified as TAGs, all are instantiated by default.
36581
36582Usage: $0 [OPTION]... [TAG]...
36583
36584  -h, --help       print this help, then exit
36585  -V, --version    print version number and configuration settings, then exit
36586      --config     print configuration, then exit
36587  -q, --quiet, --silent
36588                   do not print progress messages
36589  -d, --debug      don't remove temporary files
36590      --recheck    update $as_me by reconfiguring in the same conditions
36591      --file=FILE[:TEMPLATE]
36592                   instantiate the configuration file FILE
36593      --header=FILE[:TEMPLATE]
36594                   instantiate the configuration header FILE
36595
36596Configuration files:
36597$config_files
36598
36599Configuration headers:
36600$config_headers
36601
36602Report bugs to <build-dev@openjdk.java.net>.
36603OpenJDK home page: <http://openjdk.java.net>."
36604
36605_ACEOF
36606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36607ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36608ac_cs_version="\\
36609OpenJDK config.status jdk8
36610configured by $0, generated by GNU Autoconf 2.69,
36611  with options \\"\$ac_cs_config\\"
36612
36613Copyright (C) 2012 Free Software Foundation, Inc.
36614This config.status script is free software; the Free Software Foundation
36615gives unlimited permission to copy, distribute and modify it."
36616
36617ac_pwd='$ac_pwd'
36618srcdir='$srcdir'
36619AWK='$AWK'
36620test -n "\$AWK" || AWK=awk
36621_ACEOF
36622
36623cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36624# The default lists apply if the user does not specify any file.
36625ac_need_defaults=:
36626while test $# != 0
36627do
36628  case $1 in
36629  --*=?*)
36630    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36631    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36632    ac_shift=:
36633    ;;
36634  --*=)
36635    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36636    ac_optarg=
36637    ac_shift=:
36638    ;;
36639  *)
36640    ac_option=$1
36641    ac_optarg=$2
36642    ac_shift=shift
36643    ;;
36644  esac
36645
36646  case $ac_option in
36647  # Handling of the options.
36648  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36649    ac_cs_recheck=: ;;
36650  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36651    $as_echo "$ac_cs_version"; exit ;;
36652  --config | --confi | --conf | --con | --co | --c )
36653    $as_echo "$ac_cs_config"; exit ;;
36654  --debug | --debu | --deb | --de | --d | -d )
36655    debug=: ;;
36656  --file | --fil | --fi | --f )
36657    $ac_shift
36658    case $ac_optarg in
36659    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36660    '') as_fn_error $? "missing file argument" ;;
36661    esac
36662    as_fn_append CONFIG_FILES " '$ac_optarg'"
36663    ac_need_defaults=false;;
36664  --header | --heade | --head | --hea )
36665    $ac_shift
36666    case $ac_optarg in
36667    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36668    esac
36669    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36670    ac_need_defaults=false;;
36671  --he | --h)
36672    # Conflict between --help and --header
36673    as_fn_error $? "ambiguous option: \`$1'
36674Try \`$0 --help' for more information.";;
36675  --help | --hel | -h )
36676    $as_echo "$ac_cs_usage"; exit ;;
36677  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36678  | -silent | --silent | --silen | --sile | --sil | --si | --s)
36679    ac_cs_silent=: ;;
36680
36681  # This is an error.
36682  -*) as_fn_error $? "unrecognized option: \`$1'
36683Try \`$0 --help' for more information." ;;
36684
36685  *) as_fn_append ac_config_targets " $1"
36686     ac_need_defaults=false ;;
36687
36688  esac
36689  shift
36690done
36691
36692ac_configure_extra_args=
36693
36694if $ac_cs_silent; then
36695  exec 6>/dev/null
36696  ac_configure_extra_args="$ac_configure_extra_args --silent"
36697fi
36698
36699_ACEOF
36700cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36701if \$ac_cs_recheck; then
36702  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36703  shift
36704  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36705  CONFIG_SHELL='$SHELL'
36706  export CONFIG_SHELL
36707  exec "\$@"
36708fi
36709
36710_ACEOF
36711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36712exec 5>>config.log
36713{
36714  echo
36715  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36716## Running $as_me. ##
36717_ASBOX
36718  $as_echo "$ac_log"
36719} >&5
36720
36721_ACEOF
36722cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36723_ACEOF
36724
36725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36726
36727# Handling of arguments.
36728for ac_config_target in $ac_config_targets
36729do
36730  case $ac_config_target in
36731    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36732    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36733    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36734    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36735    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36736    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36737    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36738
36739  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36740  esac
36741done
36742
36743
36744# If the user did not use the arguments to specify the items to instantiate,
36745# then the envvar interface is used.  Set only those that are not.
36746# We use the long form for the default assignment because of an extremely
36747# bizarre bug on SunOS 4.1.3.
36748if $ac_need_defaults; then
36749  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36750  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36751fi
36752
36753# Have a temporary directory for convenience.  Make it in the build tree
36754# simply because there is no reason against having it here, and in addition,
36755# creating and moving files from /tmp can sometimes cause problems.
36756# Hook for its removal unless debugging.
36757# Note that there is a small window in which the directory will not be cleaned:
36758# after its creation but before its name has been assigned to `$tmp'.
36759$debug ||
36760{
36761  tmp= ac_tmp=
36762  trap 'exit_status=$?
36763  : "${ac_tmp:=$tmp}"
36764  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36765' 0
36766  trap 'as_fn_exit 1' 1 2 13 15
36767}
36768# Create a (secure) tmp directory for tmp files.
36769
36770{
36771  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36772  test -d "$tmp"
36773}  ||
36774{
36775  tmp=./conf$$-$RANDOM
36776  (umask 077 && mkdir "$tmp")
36777} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36778ac_tmp=$tmp
36779
36780# Set up the scripts for CONFIG_FILES section.
36781# No need to generate them if there are no CONFIG_FILES.
36782# This happens for instance with `./config.status config.h'.
36783if test -n "$CONFIG_FILES"; then
36784
36785
36786ac_cr=`echo X | tr X '\015'`
36787# On cygwin, bash can eat \r inside `` if the user requested igncr.
36788# But we know of no other shell where ac_cr would be empty at this
36789# point, so we can use a bashism as a fallback.
36790if test "x$ac_cr" = x; then
36791  eval ac_cr=\$\'\\r\'
36792fi
36793ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36794if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36795  ac_cs_awk_cr='\\r'
36796else
36797  ac_cs_awk_cr=$ac_cr
36798fi
36799
36800echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36801_ACEOF
36802
36803
36804{
36805  echo "cat >conf$$subs.awk <<_ACEOF" &&
36806  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36807  echo "_ACEOF"
36808} >conf$$subs.sh ||
36809  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36810ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36811ac_delim='%!_!# '
36812for ac_last_try in false false false false false :; do
36813  . ./conf$$subs.sh ||
36814    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36815
36816  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36817  if test $ac_delim_n = $ac_delim_num; then
36818    break
36819  elif $ac_last_try; then
36820    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36821  else
36822    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36823  fi
36824done
36825rm -f conf$$subs.sh
36826
36827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36828cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36829_ACEOF
36830sed -n '
36831h
36832s/^/S["/; s/!.*/"]=/
36833p
36834g
36835s/^[^!]*!//
36836:repl
36837t repl
36838s/'"$ac_delim"'$//
36839t delim
36840:nl
36841h
36842s/\(.\{148\}\)..*/\1/
36843t more1
36844s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36845p
36846n
36847b repl
36848:more1
36849s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36850p
36851g
36852s/.\{148\}//
36853t nl
36854:delim
36855h
36856s/\(.\{148\}\)..*/\1/
36857t more2
36858s/["\\]/\\&/g; s/^/"/; s/$/"/
36859p
36860b
36861:more2
36862s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36863p
36864g
36865s/.\{148\}//
36866t delim
36867' <conf$$subs.awk | sed '
36868/^[^""]/{
36869  N
36870  s/\n//
36871}
36872' >>$CONFIG_STATUS || ac_write_fail=1
36873rm -f conf$$subs.awk
36874cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36875_ACAWK
36876cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36877  for (key in S) S_is_set[key] = 1
36878  FS = ""
36879
36880}
36881{
36882  line = $ 0
36883  nfields = split(line, field, "@")
36884  substed = 0
36885  len = length(field[1])
36886  for (i = 2; i < nfields; i++) {
36887    key = field[i]
36888    keylen = length(key)
36889    if (S_is_set[key]) {
36890      value = S[key]
36891      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
36892      len += length(value) + length(field[++i])
36893      substed = 1
36894    } else
36895      len += 1 + keylen
36896  }
36897
36898  print line
36899}
36900
36901_ACAWK
36902_ACEOF
36903cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36904if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36905  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36906else
36907  cat
36908fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
36909  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
36910_ACEOF
36911
36912# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
36913# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
36914# trailing colons and then remove the whole line if VPATH becomes empty
36915# (actually we leave an empty line to preserve line numbers).
36916if test "x$srcdir" = x.; then
36917  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
36918h
36919s///
36920s/^/:/
36921s/[	 ]*$/:/
36922s/:\$(srcdir):/:/g
36923s/:\${srcdir}:/:/g
36924s/:@srcdir@:/:/g
36925s/^:*//
36926s/:*$//
36927x
36928s/\(=[	 ]*\).*/\1/
36929G
36930s/\n//
36931s/^[^=]*=[	 ]*$//
36932}'
36933fi
36934
36935cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36936fi # test -n "$CONFIG_FILES"
36937
36938# Set up the scripts for CONFIG_HEADERS section.
36939# No need to generate them if there are no CONFIG_HEADERS.
36940# This happens for instance with `./config.status Makefile'.
36941if test -n "$CONFIG_HEADERS"; then
36942cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36943BEGIN {
36944_ACEOF
36945
36946# Transform confdefs.h into an awk script `defines.awk', embedded as
36947# here-document in config.status, that substitutes the proper values into
36948# config.h.in to produce config.h.
36949
36950# Create a delimiter string that does not exist in confdefs.h, to ease
36951# handling of long lines.
36952ac_delim='%!_!# '
36953for ac_last_try in false false :; do
36954  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
36955  if test -z "$ac_tt"; then
36956    break
36957  elif $ac_last_try; then
36958    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
36959  else
36960    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36961  fi
36962done
36963
36964# For the awk script, D is an array of macro values keyed by name,
36965# likewise P contains macro parameters if any.  Preserve backslash
36966# newline sequences.
36967
36968ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36969sed -n '
36970s/.\{148\}/&'"$ac_delim"'/g
36971t rset
36972:rset
36973s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
36974t def
36975d
36976:def
36977s/\\$//
36978t bsnl
36979s/["\\]/\\&/g
36980s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36981D["\1"]=" \3"/p
36982s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
36983d
36984:bsnl
36985s/["\\]/\\&/g
36986s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36987D["\1"]=" \3\\\\\\n"\\/p
36988t cont
36989s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
36990t cont
36991d
36992:cont
36993n
36994s/.\{148\}/&'"$ac_delim"'/g
36995t clear
36996:clear
36997s/\\$//
36998t bsnlc
36999s/["\\]/\\&/g; s/^/"/; s/$/"/p
37000d
37001:bsnlc
37002s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37003b cont
37004' <confdefs.h | sed '
37005s/'"$ac_delim"'/"\\\
37006"/g' >>$CONFIG_STATUS || ac_write_fail=1
37007
37008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37009  for (key in D) D_is_set[key] = 1
37010  FS = ""
37011}
37012/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37013  line = \$ 0
37014  split(line, arg, " ")
37015  if (arg[1] == "#") {
37016    defundef = arg[2]
37017    mac1 = arg[3]
37018  } else {
37019    defundef = substr(arg[1], 2)
37020    mac1 = arg[2]
37021  }
37022  split(mac1, mac2, "(") #)
37023  macro = mac2[1]
37024  prefix = substr(line, 1, index(line, defundef) - 1)
37025  if (D_is_set[macro]) {
37026    # Preserve the white space surrounding the "#".
37027    print prefix "define", macro P[macro] D[macro]
37028    next
37029  } else {
37030    # Replace #undef with comments.  This is necessary, for example,
37031    # in the case of _POSIX_SOURCE, which is predefined and required
37032    # on some systems where configure will not decide to define it.
37033    if (defundef == "undef") {
37034      print "/*", prefix defundef, macro, "*/"
37035      next
37036    }
37037  }
37038}
37039{ print }
37040_ACAWK
37041_ACEOF
37042cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37043  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37044fi # test -n "$CONFIG_HEADERS"
37045
37046
37047eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37048shift
37049for ac_tag
37050do
37051  case $ac_tag in
37052  :[FHLC]) ac_mode=$ac_tag; continue;;
37053  esac
37054  case $ac_mode$ac_tag in
37055  :[FHL]*:*);;
37056  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37057  :[FH]-) ac_tag=-:-;;
37058  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37059  esac
37060  ac_save_IFS=$IFS
37061  IFS=:
37062  set x $ac_tag
37063  IFS=$ac_save_IFS
37064  shift
37065  ac_file=$1
37066  shift
37067
37068  case $ac_mode in
37069  :L) ac_source=$1;;
37070  :[FH])
37071    ac_file_inputs=
37072    for ac_f
37073    do
37074      case $ac_f in
37075      -) ac_f="$ac_tmp/stdin";;
37076      *) # Look for the file first in the build tree, then in the source tree
37077	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
37078	 # because $ac_f cannot contain `:'.
37079	 test -f "$ac_f" ||
37080	   case $ac_f in
37081	   [\\/$]*) false;;
37082	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37083	   esac ||
37084	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37085      esac
37086      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37087      as_fn_append ac_file_inputs " '$ac_f'"
37088    done
37089
37090    # Let's still pretend it is `configure' which instantiates (i.e., don't
37091    # use $as_me), people would be surprised to read:
37092    #    /* config.h.  Generated by config.status.  */
37093    configure_input='Generated from '`
37094	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37095	`' by configure.'
37096    if test x"$ac_file" != x-; then
37097      configure_input="$ac_file.  $configure_input"
37098      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37099$as_echo "$as_me: creating $ac_file" >&6;}
37100    fi
37101    # Neutralize special characters interpreted by sed in replacement strings.
37102    case $configure_input in #(
37103    *\&* | *\|* | *\\* )
37104       ac_sed_conf_input=`$as_echo "$configure_input" |
37105       sed 's/[\\\\&|]/\\\\&/g'`;; #(
37106    *) ac_sed_conf_input=$configure_input;;
37107    esac
37108
37109    case $ac_tag in
37110    *:-:* | *:-) cat >"$ac_tmp/stdin" \
37111      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37112    esac
37113    ;;
37114  esac
37115
37116  ac_dir=`$as_dirname -- "$ac_file" ||
37117$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37118	 X"$ac_file" : 'X\(//\)[^/]' \| \
37119	 X"$ac_file" : 'X\(//\)$' \| \
37120	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37121$as_echo X"$ac_file" |
37122    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37123	    s//\1/
37124	    q
37125	  }
37126	  /^X\(\/\/\)[^/].*/{
37127	    s//\1/
37128	    q
37129	  }
37130	  /^X\(\/\/\)$/{
37131	    s//\1/
37132	    q
37133	  }
37134	  /^X\(\/\).*/{
37135	    s//\1/
37136	    q
37137	  }
37138	  s/.*/./; q'`
37139  as_dir="$ac_dir"; as_fn_mkdir_p
37140  ac_builddir=.
37141
37142case "$ac_dir" in
37143.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37144*)
37145  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37146  # A ".." for each directory in $ac_dir_suffix.
37147  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37148  case $ac_top_builddir_sub in
37149  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37150  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37151  esac ;;
37152esac
37153ac_abs_top_builddir=$ac_pwd
37154ac_abs_builddir=$ac_pwd$ac_dir_suffix
37155# for backward compatibility:
37156ac_top_builddir=$ac_top_build_prefix
37157
37158case $srcdir in
37159  .)  # We are building in place.
37160    ac_srcdir=.
37161    ac_top_srcdir=$ac_top_builddir_sub
37162    ac_abs_top_srcdir=$ac_pwd ;;
37163  [\\/]* | ?:[\\/]* )  # Absolute name.
37164    ac_srcdir=$srcdir$ac_dir_suffix;
37165    ac_top_srcdir=$srcdir
37166    ac_abs_top_srcdir=$srcdir ;;
37167  *) # Relative name.
37168    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37169    ac_top_srcdir=$ac_top_build_prefix$srcdir
37170    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37171esac
37172ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37173
37174
37175  case $ac_mode in
37176  :F)
37177  #
37178  # CONFIG_FILE
37179  #
37180
37181_ACEOF
37182
37183cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37184# If the template does not know about datarootdir, expand it.
37185# FIXME: This hack should be removed a few years after 2.60.
37186ac_datarootdir_hack=; ac_datarootdir_seen=
37187ac_sed_dataroot='
37188/datarootdir/ {
37189  p
37190  q
37191}
37192/@datadir@/p
37193/@docdir@/p
37194/@infodir@/p
37195/@localedir@/p
37196/@mandir@/p'
37197case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37198*datarootdir*) ac_datarootdir_seen=yes;;
37199*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37200  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37201$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37202_ACEOF
37203cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37204  ac_datarootdir_hack='
37205  s&@datadir@&$datadir&g
37206  s&@docdir@&$docdir&g
37207  s&@infodir@&$infodir&g
37208  s&@localedir@&$localedir&g
37209  s&@mandir@&$mandir&g
37210  s&\\\${datarootdir}&$datarootdir&g' ;;
37211esac
37212_ACEOF
37213
37214# Neutralize VPATH when `$srcdir' = `.'.
37215# Shell code in configure.ac might set extrasub.
37216# FIXME: do we really want to maintain this feature?
37217cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37218ac_sed_extra="$ac_vpsub
37219$extrasub
37220_ACEOF
37221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37222:t
37223/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37224s|@configure_input@|$ac_sed_conf_input|;t t
37225s&@top_builddir@&$ac_top_builddir_sub&;t t
37226s&@top_build_prefix@&$ac_top_build_prefix&;t t
37227s&@srcdir@&$ac_srcdir&;t t
37228s&@abs_srcdir@&$ac_abs_srcdir&;t t
37229s&@top_srcdir@&$ac_top_srcdir&;t t
37230s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37231s&@builddir@&$ac_builddir&;t t
37232s&@abs_builddir@&$ac_abs_builddir&;t t
37233s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37234$ac_datarootdir_hack
37235"
37236eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37237  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37238
37239test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37240  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37241  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
37242      "$ac_tmp/out"`; test -z "$ac_out"; } &&
37243  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37244which seems to be undefined.  Please make sure it is defined" >&5
37245$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37246which seems to be undefined.  Please make sure it is defined" >&2;}
37247
37248  rm -f "$ac_tmp/stdin"
37249  case $ac_file in
37250  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37251  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37252  esac \
37253  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37254 ;;
37255  :H)
37256  #
37257  # CONFIG_HEADER
37258  #
37259  if test x"$ac_file" != x-; then
37260    {
37261      $as_echo "/* $configure_input  */" \
37262      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37263    } >"$ac_tmp/config.h" \
37264      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37265    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37266      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37267$as_echo "$as_me: $ac_file is unchanged" >&6;}
37268    else
37269      rm -f "$ac_file"
37270      mv "$ac_tmp/config.h" "$ac_file" \
37271	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
37272    fi
37273  else
37274    $as_echo "/* $configure_input  */" \
37275      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37276      || as_fn_error $? "could not create -" "$LINENO" 5
37277  fi
37278 ;;
37279
37280
37281  esac
37282
37283done # for ac_tag
37284
37285
37286as_fn_exit 0
37287_ACEOF
37288ac_clean_files=$ac_clean_files_save
37289
37290test $ac_write_fail = 0 ||
37291  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37292
37293
37294# configure is writing to config.log, and then calls config.status.
37295# config.status does its own redirection, appending to config.log.
37296# Unfortunately, on DOS this fails, as config.log is still kept open
37297# by configure, so config.status won't be able to write to it; its
37298# output is simply discarded.  So we exec the FD to /dev/null,
37299# effectively closing config.log, so it can be properly (re)opened and
37300# appended to by config.status.  When coming back to configure, we
37301# need to make the FD available again.
37302if test "$no_create" != yes; then
37303  ac_cs_success=:
37304  ac_config_status_args=
37305  test "$silent" = yes &&
37306    ac_config_status_args="$ac_config_status_args --quiet"
37307  exec 5>/dev/null
37308  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37309  exec 5>>config.log
37310  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37311  # would make configure fail if this is the last instruction.
37312  $ac_cs_success || as_fn_exit 1
37313fi
37314if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37315  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37316$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37317fi
37318
37319
37320# Try to move the config.log file to the output directory.
37321if test -e ./config.log; then
37322  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37323fi
37324
37325# Make the compare script executable
37326$CHMOD +x $OUTPUT_ROOT/compare.sh
37327
37328# Finally output some useful information to the user
37329
37330  # Finally output some useful information to the user
37331
37332  if test "x$CCACHE_FOUND" != x; then
37333    if  test "x$HAS_GOOD_CCACHE" = x; then
37334      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37335      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37336    else
37337      CCACHE_STATUS="installed and in use"
37338    fi
37339  else
37340    if test "x$GCC" = xyes; then
37341      CCACHE_STATUS="not installed (consider installing)"
37342      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37343    else
37344      CCACHE_STATUS="not available for your system"
37345    fi
37346  fi
37347
37348  printf "\n"
37349  printf "====================================================\n"
37350  printf "A new configuration has been successfully created in\n"
37351  printf "$OUTPUT_ROOT\n"
37352  if test "x$CONFIGURE_COMMAND_LINE" != x; then
37353    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37354  else
37355    printf "using default settings.\n"
37356  fi
37357
37358  printf "\n"
37359  printf "Configuration summary:\n"
37360  printf "* Debug level:    $DEBUG_LEVEL\n"
37361  printf "* JDK variant:    $JDK_VARIANT\n"
37362  printf "* JVM variants:   $with_jvm_variants\n"
37363  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37364
37365  printf "\n"
37366  printf "Tools summary:\n"
37367  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37368    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37369  fi
37370  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37371  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37372  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37373
37374  printf "\n"
37375  printf "Build performance summary:\n"
37376  printf "* Cores to use:   $JOBS\n"
37377  printf "* Memory limit:   $MEMORY_SIZE MB\n"
37378  printf "* ccache status:  $CCACHE_STATUS\n"
37379  printf "\n"
37380
37381  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37382    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37383    printf "$CCACHE_HELP_MSG\n"
37384
37385  # Print a helpful message on how to acquire the necessary build dependency.
37386  # ccache is the help tag: freetype, cups, pulse, alsa etc
37387  MISSING_DEPENDENCY=ccache
37388
37389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37390    cygwin_help $MISSING_DEPENDENCY
37391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37392    msys_help $MISSING_DEPENDENCY
37393  else
37394    PKGHANDLER_COMMAND=
37395
37396    case $PKGHANDLER in
37397      apt-get)
37398        apt_help     $MISSING_DEPENDENCY ;;
37399      yum)
37400        yum_help     $MISSING_DEPENDENCY ;;
37401      port)
37402        port_help    $MISSING_DEPENDENCY ;;
37403      pkgutil)
37404        pkgutil_help $MISSING_DEPENDENCY ;;
37405      pkgadd)
37406        pkgadd_help  $MISSING_DEPENDENCY ;;
37407      * )
37408        break ;;
37409    esac
37410
37411    if test "x$PKGHANDLER_COMMAND" != x; then
37412      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37413    fi
37414  fi
37415
37416    printf "$HELP_MSG\n"
37417    printf "\n"
37418  fi
37419
37420  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37421    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37422    printf "will result in longer build times.\n"
37423    printf "\n"
37424  fi
37425
37426  if test "x$FOUND_ALT_VARIABLES" != "x"; then
37427    printf "WARNING: You have old-style ALT_ environment variables set.\n"
37428    printf "These are not respected, and will be ignored. It is recommended\n"
37429    printf "that you clean your environment. The following variables are set:\n"
37430    printf "$FOUND_ALT_VARIABLES\n"
37431    printf "\n"
37432  fi
37433
37434  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37435    printf "WARNING: Your build output directory is not on a local disk.\n"
37436    printf "This will severely degrade build performance!\n"
37437    printf "It is recommended that you create an output directory on a local disk,\n"
37438    printf "and run the configure script again from that directory.\n"
37439    printf "\n"
37440  fi
37441
37442  if test "x$IS_RECONFIGURE" = "xyes"; then
37443    printf "WARNING: The result of this configuration has overridden an older\n"
37444    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37445    printf "proper build. Failure to do so might result in strange build problems.\n"
37446    printf "\n"
37447  fi
37448
37449