generated-configure.sh revision 901:067355edfbf8
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_API_DIR
873OPENJDK_TARGET_CPU_JLI_CFLAGS
874OPENJDK_TARGET_CPU_OSARCH
875OPENJDK_TARGET_CPU_ISADIR
876OPENJDK_TARGET_CPU_LIBDIR
877OPENJDK_TARGET_CPU_LEGACY_LIB
878OPENJDK_TARGET_CPU_LEGACY
879REQUIRED_OS_VERSION
880REQUIRED_OS_NAME
881COMPILE_TYPE
882OPENJDK_TARGET_CPU_ENDIAN
883OPENJDK_TARGET_CPU_BITS
884OPENJDK_TARGET_CPU_ARCH
885OPENJDK_TARGET_CPU
886OPENJDK_TARGET_OS_API
887OPENJDK_TARGET_OS
888OPENJDK_BUILD_CPU_ENDIAN
889OPENJDK_BUILD_CPU_BITS
890OPENJDK_BUILD_CPU_ARCH
891OPENJDK_BUILD_CPU
892OPENJDK_BUILD_OS_API
893OPENJDK_BUILD_OS
894OPENJDK_BUILD_AUTOCONF_NAME
895OPENJDK_TARGET_AUTOCONF_NAME
896target_os
897target_vendor
898target_cpu
899target
900host_os
901host_vendor
902host_cpu
903host
904build_os
905build_vendor
906build_cpu
907build
908SETFILE
909DF
910READLINK
911CYGPATH
912NAWK
913SED
914FGREP
915EGREP
916GREP
917AWK
918XARGS
919WHICH
920WC
921UNIQ
922UNAME
923TR
924TOUCH
925TEE
926TAR
927TAIL
928SORT
929SH
930RM
931PRINTF
932MV
933MKTEMP
934MKDIR
935LS
936LN
937HEAD
938FIND
939FILE
940EXPR
941ECHO
942DIRNAME
943DIFF
944DATE
945CUT
946CPIO
947CP
948COMM
949CMP
950CHMOD
951CAT
952BASH
953BASENAME
954DATE_WHEN_CONFIGURED
955CONFIGURE_COMMAND_LINE
956CUSTOM_MAKE_DIR
957target_alias
958host_alias
959build_alias
960LIBS
961ECHO_T
962ECHO_N
963ECHO_C
964DEFS
965mandir
966localedir
967libdir
968psdir
969pdfdir
970dvidir
971htmldir
972infodir
973docdir
974oldincludedir
975includedir
976localstatedir
977sharedstatedir
978sysconfdir
979datadir
980datarootdir
981libexecdir
982sbindir
983bindir
984program_transform_name
985prefix
986exec_prefix
987PACKAGE_URL
988PACKAGE_BUGREPORT
989PACKAGE_STRING
990PACKAGE_VERSION
991PACKAGE_TARNAME
992PACKAGE_NAME
993PATH_SEPARATOR
994SHELL'
995ac_subst_files=''
996ac_user_opts='
997enable_option_checking
998with_custom_make_dir
999with_target_bits
1000with_sys_root
1001with_tools_dir
1002with_devkit
1003enable_openjdk_only
1004with_jdk_variant
1005with_jvm_variants
1006enable_debug
1007with_debug_level
1008with_conf_name
1009with_builddeps_conf
1010with_builddeps_server
1011with_builddeps_dir
1012with_builddeps_group
1013enable_headful
1014enable_hotspot_test_in_build
1015with_cacerts_file
1016enable_unlimited_crypto
1017with_milestone
1018with_update_version
1019with_user_release_suffix
1020with_build_number
1021with_boot_jdk
1022with_boot_jdk_jvmargs
1023with_add_source_root
1024with_override_source_root
1025with_adds_and_overrides
1026with_override_langtools
1027with_override_corba
1028with_override_jaxp
1029with_override_jaxws
1030with_override_hotspot
1031with_override_nashorn
1032with_override_jdk
1033with_import_hotspot
1034with_msvcr_dll
1035with_dxsdk
1036with_dxsdk_lib
1037with_dxsdk_include
1038with_jtreg
1039with_extra_cflags
1040with_extra_cxxflags
1041with_extra_ldflags
1042enable_debug_symbols
1043enable_zip_debug_info
1044enable_macosx_runtime_support
1045with_x
1046with_cups
1047with_cups_include
1048with_freetype
1049with_freetype_include
1050with_freetype_lib
1051enable_freetype_bundling
1052with_alsa
1053with_alsa_include
1054with_alsa_lib
1055with_giflib
1056with_zlib
1057with_stdc__lib
1058with_num_cores
1059with_memory_size
1060with_jobs
1061with_sjavac_server_java
1062enable_sjavac
1063enable_precompiled_headers
1064enable_ccache
1065with_ccache_dir
1066'
1067      ac_precious_vars='build_alias
1068host_alias
1069target_alias
1070PKG_CONFIG
1071CC
1072CFLAGS
1073LDFLAGS
1074LIBS
1075CPPFLAGS
1076CXX
1077CXXFLAGS
1078CCC
1079OBJC
1080OBJCFLAGS
1081CPP
1082CXXCPP
1083XMKMF
1084FREETYPE_CFLAGS
1085FREETYPE_LIBS
1086ALSA_CFLAGS
1087ALSA_LIBS
1088LIBFFI_CFLAGS
1089LIBFFI_LIBS'
1090
1091
1092# Initialize some variables set by options.
1093ac_init_help=
1094ac_init_version=false
1095ac_unrecognized_opts=
1096ac_unrecognized_sep=
1097# The variables have the same names as the options, with
1098# dashes changed to underlines.
1099cache_file=/dev/null
1100exec_prefix=NONE
1101no_create=
1102no_recursion=
1103prefix=NONE
1104program_prefix=NONE
1105program_suffix=NONE
1106program_transform_name=s,x,x,
1107silent=
1108site=
1109srcdir=
1110verbose=
1111x_includes=NONE
1112x_libraries=NONE
1113
1114# Installation directory options.
1115# These are left unexpanded so users can "make install exec_prefix=/foo"
1116# and all the variables that are supposed to be based on exec_prefix
1117# by default will actually change.
1118# Use braces instead of parens because sh, perl, etc. also accept them.
1119# (The list follows the same order as the GNU Coding Standards.)
1120bindir='${exec_prefix}/bin'
1121sbindir='${exec_prefix}/sbin'
1122libexecdir='${exec_prefix}/libexec'
1123datarootdir='${prefix}/share'
1124datadir='${datarootdir}'
1125sysconfdir='${prefix}/etc'
1126sharedstatedir='${prefix}/com'
1127localstatedir='${prefix}/var'
1128includedir='${prefix}/include'
1129oldincludedir='/usr/include'
1130docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1131infodir='${datarootdir}/info'
1132htmldir='${docdir}'
1133dvidir='${docdir}'
1134pdfdir='${docdir}'
1135psdir='${docdir}'
1136libdir='${exec_prefix}/lib'
1137localedir='${datarootdir}/locale'
1138mandir='${datarootdir}/man'
1139
1140ac_prev=
1141ac_dashdash=
1142for ac_option
1143do
1144  # If the previous option needs an argument, assign it.
1145  if test -n "$ac_prev"; then
1146    eval $ac_prev=\$ac_option
1147    ac_prev=
1148    continue
1149  fi
1150
1151  case $ac_option in
1152  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1153  *=)   ac_optarg= ;;
1154  *)    ac_optarg=yes ;;
1155  esac
1156
1157  # Accept the important Cygnus configure options, so we can diagnose typos.
1158
1159  case $ac_dashdash$ac_option in
1160  --)
1161    ac_dashdash=yes ;;
1162
1163  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1164    ac_prev=bindir ;;
1165  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1166    bindir=$ac_optarg ;;
1167
1168  -build | --build | --buil | --bui | --bu)
1169    ac_prev=build_alias ;;
1170  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1171    build_alias=$ac_optarg ;;
1172
1173  -cache-file | --cache-file | --cache-fil | --cache-fi \
1174  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1175    ac_prev=cache_file ;;
1176  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1177  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1178    cache_file=$ac_optarg ;;
1179
1180  --config-cache | -C)
1181    cache_file=config.cache ;;
1182
1183  -datadir | --datadir | --datadi | --datad)
1184    ac_prev=datadir ;;
1185  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1186    datadir=$ac_optarg ;;
1187
1188  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1189  | --dataroo | --dataro | --datar)
1190    ac_prev=datarootdir ;;
1191  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1192  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1193    datarootdir=$ac_optarg ;;
1194
1195  -disable-* | --disable-*)
1196    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1197    # Reject names that are not valid shell variable names.
1198    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199      as_fn_error $? "invalid feature name: $ac_useropt"
1200    ac_useropt_orig=$ac_useropt
1201    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202    case $ac_user_opts in
1203      *"
1204"enable_$ac_useropt"
1205"*) ;;
1206      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1207	 ac_unrecognized_sep=', ';;
1208    esac
1209    eval enable_$ac_useropt=no ;;
1210
1211  -docdir | --docdir | --docdi | --doc | --do)
1212    ac_prev=docdir ;;
1213  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1214    docdir=$ac_optarg ;;
1215
1216  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1217    ac_prev=dvidir ;;
1218  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1219    dvidir=$ac_optarg ;;
1220
1221  -enable-* | --enable-*)
1222    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1223    # Reject names that are not valid shell variable names.
1224    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1225      as_fn_error $? "invalid feature name: $ac_useropt"
1226    ac_useropt_orig=$ac_useropt
1227    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228    case $ac_user_opts in
1229      *"
1230"enable_$ac_useropt"
1231"*) ;;
1232      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1233	 ac_unrecognized_sep=', ';;
1234    esac
1235    eval enable_$ac_useropt=\$ac_optarg ;;
1236
1237  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1238  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1239  | --exec | --exe | --ex)
1240    ac_prev=exec_prefix ;;
1241  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1242  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1243  | --exec=* | --exe=* | --ex=*)
1244    exec_prefix=$ac_optarg ;;
1245
1246  -gas | --gas | --ga | --g)
1247    # Obsolete; use --with-gas.
1248    with_gas=yes ;;
1249
1250  -help | --help | --hel | --he | -h)
1251    ac_init_help=long ;;
1252  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1253    ac_init_help=recursive ;;
1254  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1255    ac_init_help=short ;;
1256
1257  -host | --host | --hos | --ho)
1258    ac_prev=host_alias ;;
1259  -host=* | --host=* | --hos=* | --ho=*)
1260    host_alias=$ac_optarg ;;
1261
1262  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1263    ac_prev=htmldir ;;
1264  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1265  | --ht=*)
1266    htmldir=$ac_optarg ;;
1267
1268  -includedir | --includedir | --includedi | --included | --include \
1269  | --includ | --inclu | --incl | --inc)
1270    ac_prev=includedir ;;
1271  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1272  | --includ=* | --inclu=* | --incl=* | --inc=*)
1273    includedir=$ac_optarg ;;
1274
1275  -infodir | --infodir | --infodi | --infod | --info | --inf)
1276    ac_prev=infodir ;;
1277  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1278    infodir=$ac_optarg ;;
1279
1280  -libdir | --libdir | --libdi | --libd)
1281    ac_prev=libdir ;;
1282  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1283    libdir=$ac_optarg ;;
1284
1285  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1286  | --libexe | --libex | --libe)
1287    ac_prev=libexecdir ;;
1288  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1289  | --libexe=* | --libex=* | --libe=*)
1290    libexecdir=$ac_optarg ;;
1291
1292  -localedir | --localedir | --localedi | --localed | --locale)
1293    ac_prev=localedir ;;
1294  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1295    localedir=$ac_optarg ;;
1296
1297  -localstatedir | --localstatedir | --localstatedi | --localstated \
1298  | --localstate | --localstat | --localsta | --localst | --locals)
1299    ac_prev=localstatedir ;;
1300  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1301  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1302    localstatedir=$ac_optarg ;;
1303
1304  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1305    ac_prev=mandir ;;
1306  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1307    mandir=$ac_optarg ;;
1308
1309  -nfp | --nfp | --nf)
1310    # Obsolete; use --without-fp.
1311    with_fp=no ;;
1312
1313  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1314  | --no-cr | --no-c | -n)
1315    no_create=yes ;;
1316
1317  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1318  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1319    no_recursion=yes ;;
1320
1321  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1322  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1323  | --oldin | --oldi | --old | --ol | --o)
1324    ac_prev=oldincludedir ;;
1325  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1326  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1327  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1328    oldincludedir=$ac_optarg ;;
1329
1330  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1331    ac_prev=prefix ;;
1332  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1333    prefix=$ac_optarg ;;
1334
1335  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1336  | --program-pre | --program-pr | --program-p)
1337    ac_prev=program_prefix ;;
1338  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1339  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1340    program_prefix=$ac_optarg ;;
1341
1342  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1343  | --program-suf | --program-su | --program-s)
1344    ac_prev=program_suffix ;;
1345  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1346  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1347    program_suffix=$ac_optarg ;;
1348
1349  -program-transform-name | --program-transform-name \
1350  | --program-transform-nam | --program-transform-na \
1351  | --program-transform-n | --program-transform- \
1352  | --program-transform | --program-transfor \
1353  | --program-transfo | --program-transf \
1354  | --program-trans | --program-tran \
1355  | --progr-tra | --program-tr | --program-t)
1356    ac_prev=program_transform_name ;;
1357  -program-transform-name=* | --program-transform-name=* \
1358  | --program-transform-nam=* | --program-transform-na=* \
1359  | --program-transform-n=* | --program-transform-=* \
1360  | --program-transform=* | --program-transfor=* \
1361  | --program-transfo=* | --program-transf=* \
1362  | --program-trans=* | --program-tran=* \
1363  | --progr-tra=* | --program-tr=* | --program-t=*)
1364    program_transform_name=$ac_optarg ;;
1365
1366  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1367    ac_prev=pdfdir ;;
1368  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1369    pdfdir=$ac_optarg ;;
1370
1371  -psdir | --psdir | --psdi | --psd | --ps)
1372    ac_prev=psdir ;;
1373  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1374    psdir=$ac_optarg ;;
1375
1376  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1377  | -silent | --silent | --silen | --sile | --sil)
1378    silent=yes ;;
1379
1380  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1381    ac_prev=sbindir ;;
1382  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1383  | --sbi=* | --sb=*)
1384    sbindir=$ac_optarg ;;
1385
1386  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1387  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1388  | --sharedst | --shareds | --shared | --share | --shar \
1389  | --sha | --sh)
1390    ac_prev=sharedstatedir ;;
1391  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1392  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1393  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1394  | --sha=* | --sh=*)
1395    sharedstatedir=$ac_optarg ;;
1396
1397  -site | --site | --sit)
1398    ac_prev=site ;;
1399  -site=* | --site=* | --sit=*)
1400    site=$ac_optarg ;;
1401
1402  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1403    ac_prev=srcdir ;;
1404  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1405    srcdir=$ac_optarg ;;
1406
1407  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1408  | --syscon | --sysco | --sysc | --sys | --sy)
1409    ac_prev=sysconfdir ;;
1410  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1411  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1412    sysconfdir=$ac_optarg ;;
1413
1414  -target | --target | --targe | --targ | --tar | --ta | --t)
1415    ac_prev=target_alias ;;
1416  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1417    target_alias=$ac_optarg ;;
1418
1419  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1420    verbose=yes ;;
1421
1422  -version | --version | --versio | --versi | --vers | -V)
1423    ac_init_version=: ;;
1424
1425  -with-* | --with-*)
1426    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1427    # Reject names that are not valid shell variable names.
1428    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1429      as_fn_error $? "invalid package name: $ac_useropt"
1430    ac_useropt_orig=$ac_useropt
1431    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1432    case $ac_user_opts in
1433      *"
1434"with_$ac_useropt"
1435"*) ;;
1436      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1437	 ac_unrecognized_sep=', ';;
1438    esac
1439    eval with_$ac_useropt=\$ac_optarg ;;
1440
1441  -without-* | --without-*)
1442    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1443    # Reject names that are not valid shell variable names.
1444    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1445      as_fn_error $? "invalid package name: $ac_useropt"
1446    ac_useropt_orig=$ac_useropt
1447    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1448    case $ac_user_opts in
1449      *"
1450"with_$ac_useropt"
1451"*) ;;
1452      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1453	 ac_unrecognized_sep=', ';;
1454    esac
1455    eval with_$ac_useropt=no ;;
1456
1457  --x)
1458    # Obsolete; use --with-x.
1459    with_x=yes ;;
1460
1461  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1462  | --x-incl | --x-inc | --x-in | --x-i)
1463    ac_prev=x_includes ;;
1464  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1465  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1466    x_includes=$ac_optarg ;;
1467
1468  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1469  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1470    ac_prev=x_libraries ;;
1471  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1472  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1473    x_libraries=$ac_optarg ;;
1474
1475  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1476Try \`$0 --help' for more information"
1477    ;;
1478
1479  *=*)
1480    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1481    # Reject names that are not valid shell variable names.
1482    case $ac_envvar in #(
1483      '' | [0-9]* | *[!_$as_cr_alnum]* )
1484      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1485    esac
1486    eval $ac_envvar=\$ac_optarg
1487    export $ac_envvar ;;
1488
1489  *)
1490    # FIXME: should be removed in autoconf 3.0.
1491    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1492    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1493      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1494    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1495    ;;
1496
1497  esac
1498done
1499
1500if test -n "$ac_prev"; then
1501  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1502  as_fn_error $? "missing argument to $ac_option"
1503fi
1504
1505if test -n "$ac_unrecognized_opts"; then
1506  case $enable_option_checking in
1507    no) ;;
1508    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1509    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1510  esac
1511fi
1512
1513# Check all directory arguments for consistency.
1514for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1515		datadir sysconfdir sharedstatedir localstatedir includedir \
1516		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1517		libdir localedir mandir
1518do
1519  eval ac_val=\$$ac_var
1520  # Remove trailing slashes.
1521  case $ac_val in
1522    */ )
1523      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1524      eval $ac_var=\$ac_val;;
1525  esac
1526  # Be sure to have absolute directory names.
1527  case $ac_val in
1528    [\\/$]* | ?:[\\/]* )  continue;;
1529    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1530  esac
1531  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1532done
1533
1534# There might be people who depend on the old broken behavior: `$host'
1535# used to hold the argument of --host etc.
1536# FIXME: To remove some day.
1537build=$build_alias
1538host=$host_alias
1539target=$target_alias
1540
1541# FIXME: To remove some day.
1542if test "x$host_alias" != x; then
1543  if test "x$build_alias" = x; then
1544    cross_compiling=maybe
1545  elif test "x$build_alias" != "x$host_alias"; then
1546    cross_compiling=yes
1547  fi
1548fi
1549
1550ac_tool_prefix=
1551test -n "$host_alias" && ac_tool_prefix=$host_alias-
1552
1553test "$silent" = yes && exec 6>/dev/null
1554
1555
1556ac_pwd=`pwd` && test -n "$ac_pwd" &&
1557ac_ls_di=`ls -di .` &&
1558ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1559  as_fn_error $? "working directory cannot be determined"
1560test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1561  as_fn_error $? "pwd does not report name of working directory"
1562
1563
1564# Find the source files, if location was not specified.
1565if test -z "$srcdir"; then
1566  ac_srcdir_defaulted=yes
1567  # Try the directory containing this script, then the parent directory.
1568  ac_confdir=`$as_dirname -- "$as_myself" ||
1569$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1570	 X"$as_myself" : 'X\(//\)[^/]' \| \
1571	 X"$as_myself" : 'X\(//\)$' \| \
1572	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1573$as_echo X"$as_myself" |
1574    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1575	    s//\1/
1576	    q
1577	  }
1578	  /^X\(\/\/\)[^/].*/{
1579	    s//\1/
1580	    q
1581	  }
1582	  /^X\(\/\/\)$/{
1583	    s//\1/
1584	    q
1585	  }
1586	  /^X\(\/\).*/{
1587	    s//\1/
1588	    q
1589	  }
1590	  s/.*/./; q'`
1591  srcdir=$ac_confdir
1592  if test ! -r "$srcdir/$ac_unique_file"; then
1593    srcdir=..
1594  fi
1595else
1596  ac_srcdir_defaulted=no
1597fi
1598if test ! -r "$srcdir/$ac_unique_file"; then
1599  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1600  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1601fi
1602ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1603ac_abs_confdir=`(
1604	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1605	pwd)`
1606# When building in place, set srcdir=.
1607if test "$ac_abs_confdir" = "$ac_pwd"; then
1608  srcdir=.
1609fi
1610# Remove unnecessary trailing slashes from srcdir.
1611# Double slashes in file names in object file debugging info
1612# mess up M-x gdb in Emacs.
1613case $srcdir in
1614*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1615esac
1616for ac_var in $ac_precious_vars; do
1617  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1618  eval ac_env_${ac_var}_value=\$${ac_var}
1619  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1620  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1621done
1622
1623#
1624# Report the --help message.
1625#
1626if test "$ac_init_help" = "long"; then
1627  # Omit some internal or obsolete options to make the list less imposing.
1628  # This message is too long to be a string in the A/UX 3.1 sh.
1629  cat <<_ACEOF
1630\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1631
1632Usage: $0 [OPTION]... [VAR=VALUE]...
1633
1634To assign environment variables (e.g., CC, CFLAGS...), specify them as
1635VAR=VALUE.  See below for descriptions of some of the useful variables.
1636
1637Defaults for the options are specified in brackets.
1638
1639Configuration:
1640  -h, --help              display this help and exit
1641      --help=short        display options specific to this package
1642      --help=recursive    display the short help of all the included packages
1643  -V, --version           display version information and exit
1644  -q, --quiet, --silent   do not print \`checking ...' messages
1645      --cache-file=FILE   cache test results in FILE [disabled]
1646  -C, --config-cache      alias for \`--cache-file=config.cache'
1647  -n, --no-create         do not create output files
1648      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1649
1650Installation directories:
1651  --prefix=PREFIX         install architecture-independent files in PREFIX
1652                          [$ac_default_prefix]
1653  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1654                          [PREFIX]
1655
1656By default, \`make install' will install all the files in
1657\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1658an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1659for instance \`--prefix=\$HOME'.
1660
1661For better control, use the options below.
1662
1663Fine tuning of the installation directories:
1664  --bindir=DIR            user executables [EPREFIX/bin]
1665  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1666  --libexecdir=DIR        program executables [EPREFIX/libexec]
1667  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1668  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1669  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1670  --libdir=DIR            object code libraries [EPREFIX/lib]
1671  --includedir=DIR        C header files [PREFIX/include]
1672  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1673  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1674  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1675  --infodir=DIR           info documentation [DATAROOTDIR/info]
1676  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1677  --mandir=DIR            man documentation [DATAROOTDIR/man]
1678  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1679  --htmldir=DIR           html documentation [DOCDIR]
1680  --dvidir=DIR            dvi documentation [DOCDIR]
1681  --pdfdir=DIR            pdf documentation [DOCDIR]
1682  --psdir=DIR             ps documentation [DOCDIR]
1683_ACEOF
1684
1685  cat <<\_ACEOF
1686
1687X features:
1688  --x-includes=DIR    X include files are in DIR
1689  --x-libraries=DIR   X library files are in DIR
1690
1691System types:
1692  --build=BUILD     configure for building on BUILD [guessed]
1693  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1694  --target=TARGET   configure for building compilers for TARGET [HOST]
1695_ACEOF
1696fi
1697
1698if test -n "$ac_init_help"; then
1699  case $ac_init_help in
1700     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1701   esac
1702  cat <<\_ACEOF
1703
1704Optional Features:
1705  --disable-option-checking  ignore unrecognized --enable/--with options
1706  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1707  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1708  --enable-openjdk-only   suppress building custom source even if present
1709                          [disabled]
1710  --enable-debug          set the debug level to fastdebug (shorthand for
1711                          --with-debug-level=fastdebug) [disabled]
1712  --disable-headful       disable building headful support (graphical UI
1713                          support) [enabled]
1714  --enable-hotspot-test-in-build
1715                          run the Queens test after Hotspot build [disabled]
1716  --enable-unlimited-crypto
1717                          Enable unlimited crypto policy [disabled]
1718  --disable-debug-symbols disable generation of debug symbols [enabled]
1719  --disable-zip-debug-info
1720                          disable zipping of debug-info files [enabled]
1721  --enable-macosx-runtime-support
1722                          Deprecated. Option is kept for backwards
1723                          compatibility and is ignored
1724  --disable-freetype-bundling
1725                          disable bundling of the freetype library with the
1726                          build result [enabled on Windows or when using
1727                          --with-freetype, disabled otherwise]
1728  --enable-sjavac         use sjavac to do fast incremental compiles
1729                          [disabled]
1730  --disable-precompiled-headers
1731                          disable using precompiled headers when compiling C++
1732                          [enabled]
1733  --disable-ccache        disable using ccache to speed up recompilations
1734                          [enabled]
1735
1736Optional Packages:
1737  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1738  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1739  --with-custom-make-dir  use this directory for custom build/make files
1740  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1741                          support it), e.g. --with-target-bits=32 [guessed]
1742  --with-sys-root         pass this sys-root to the compilers and tools (for
1743                          cross-compiling)
1744  --with-tools-dir        search this directory for compilers and tools (for
1745                          cross-compiling)
1746  --with-devkit           use this directory as base for tools-dir and
1747                          sys-root (for cross-compiling)
1748  --with-jdk-variant      JDK variant to build (normal) [normal]
1749  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1750                          client, minimal1, kernel, zero, zeroshark) [server]
1751  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1752                          [release]
1753  --with-conf-name        use this as the name of the configuration [generated
1754                          from important configuration options]
1755  --with-builddeps-conf   use this configuration file for the builddeps
1756  --with-builddeps-server download and use build dependencies from this server
1757                          url
1758  --with-builddeps-dir    store downloaded build dependencies here
1759                          [/localhome/builddeps]
1760  --with-builddeps-group  chgrp the downloaded build dependencies to this
1761                          group
1762  --with-cacerts-file     specify alternative cacerts file
1763  --with-milestone        Set milestone value for build [internal]
1764  --with-update-version   Set update version value for build [b00]
1765  --with-user-release-suffix
1766                          Add a custom string to the version string if build
1767                          number isn't set.[username_builddateb00]
1768  --with-build-number     Set build number value for build [b00]
1769  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1770  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1771                          invocations of the Boot JDK, overriding the default
1772                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1773                          -enableassertions"
1774  --with-add-source-root  for each and every source directory, look in this
1775                          additional source root for the same directory; if it
1776                          exists and have files in it, include it in the build
1777  --with-override-source-root
1778                          for each and every source directory, look in this
1779                          override source root for the same directory; if it
1780                          exists, use that directory instead and ignore the
1781                          directory in the original source root
1782  --with-adds-and-overrides
1783                          use the subdirs 'adds' and 'overrides' in the
1784                          specified directory as add-source-root and
1785                          override-source-root
1786  --with-override-langtools
1787                          use this langtools dir for the build
1788  --with-override-corba   use this corba dir for the build
1789  --with-override-jaxp    use this jaxp dir for the build
1790  --with-override-jaxws   use this jaxws dir for the build
1791  --with-override-hotspot use this hotspot dir for the build
1792  --with-override-nashorn use this nashorn dir for the build
1793  --with-override-jdk     use this jdk dir for the build
1794  --with-import-hotspot   import hotspot binaries from this jdk image or
1795                          hotspot build dist dir instead of building from
1796                          source
1797  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1798                          only) [probed]
1799  --with-dxsdk            Deprecated. Option is kept for backwards
1800                          compatibility and is ignored
1801  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1802                          compatibility and is ignored
1803  --with-dxsdk-include    Deprecated. Option is kept for backwards
1804                          compatibility and is ignored
1805  --with-jtreg            Regression Test Harness [probed]
1806  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1807  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1808  --with-extra-ldflags    extra flags to be used when linking jdk
1809  --with-x                use the X Window System
1810  --with-cups             specify prefix directory for the cups package
1811                          (expecting the headers under PATH/include)
1812  --with-cups-include     specify directory for the cups include files
1813  --with-freetype         specify prefix directory for the freetype package
1814                          (expecting the libraries under PATH/lib and the
1815                          headers under PATH/include)
1816  --with-freetype-include specify directory for the freetype include files
1817  --with-freetype-lib     specify directory for the freetype library
1818  --with-alsa             specify prefix directory for the alsa package
1819                          (expecting the libraries under PATH/lib and the
1820                          headers under PATH/include)
1821  --with-alsa-include     specify directory for the alsa include files
1822  --with-alsa-lib         specify directory for the alsa library
1823  --with-giflib           use giflib from build system or OpenJDK source
1824                          (system, bundled) [bundled]
1825  --with-zlib             use zlib from build system or OpenJDK source
1826                          (system, bundled) [bundled]
1827  --with-stdc++lib=<static>,<dynamic>,<default>
1828                          force linking of the C++ runtime on Linux to either
1829                          static or dynamic, default is static with dynamic as
1830                          fallback
1831  --with-num-cores        number of cores in the build system, e.g.
1832                          --with-num-cores=8 [probed]
1833  --with-memory-size      memory (in MB) available in the build system, e.g.
1834                          --with-memory-size=1024 [probed]
1835  --with-jobs             number of parallel jobs to let make run [calculated
1836                          based on cores and memory]
1837  --with-sjavac-server-java
1838                          use this java binary for running the sjavac
1839                          background server [Boot JDK java]
1840  --with-ccache-dir       where to store ccache files [~/.ccache]
1841
1842Some influential environment variables:
1843  PKG_CONFIG  path to pkg-config utility
1844  CC          C compiler command
1845  CFLAGS      C compiler flags
1846  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1847              nonstandard directory <lib dir>
1848  LIBS        libraries to pass to the linker, e.g. -l<library>
1849  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1850              you have headers in a nonstandard directory <include dir>
1851  CXX         C++ compiler command
1852  CXXFLAGS    C++ compiler flags
1853  OBJC        Objective C compiler command
1854  OBJCFLAGS   Objective C compiler flags
1855  CPP         C preprocessor
1856  CXXCPP      C++ preprocessor
1857  XMKMF       Path to xmkmf, Makefile generator for X Window System
1858  FREETYPE_CFLAGS
1859              C compiler flags for FREETYPE, overriding pkg-config
1860  FREETYPE_LIBS
1861              linker flags for FREETYPE, overriding pkg-config
1862  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1863  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1864  LIBFFI_CFLAGS
1865              C compiler flags for LIBFFI, overriding pkg-config
1866  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1867
1868Use these variables to override the choices made by `configure' or to help
1869it to find libraries and programs with nonstandard names/locations.
1870
1871Report bugs to <build-dev@openjdk.java.net>.
1872OpenJDK home page: <http://openjdk.java.net>.
1873_ACEOF
1874ac_status=$?
1875fi
1876
1877if test "$ac_init_help" = "recursive"; then
1878  # If there are subdirs, report their specific --help.
1879  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1880    test -d "$ac_dir" ||
1881      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1882      continue
1883    ac_builddir=.
1884
1885case "$ac_dir" in
1886.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1887*)
1888  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1889  # A ".." for each directory in $ac_dir_suffix.
1890  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1891  case $ac_top_builddir_sub in
1892  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1893  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1894  esac ;;
1895esac
1896ac_abs_top_builddir=$ac_pwd
1897ac_abs_builddir=$ac_pwd$ac_dir_suffix
1898# for backward compatibility:
1899ac_top_builddir=$ac_top_build_prefix
1900
1901case $srcdir in
1902  .)  # We are building in place.
1903    ac_srcdir=.
1904    ac_top_srcdir=$ac_top_builddir_sub
1905    ac_abs_top_srcdir=$ac_pwd ;;
1906  [\\/]* | ?:[\\/]* )  # Absolute name.
1907    ac_srcdir=$srcdir$ac_dir_suffix;
1908    ac_top_srcdir=$srcdir
1909    ac_abs_top_srcdir=$srcdir ;;
1910  *) # Relative name.
1911    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1912    ac_top_srcdir=$ac_top_build_prefix$srcdir
1913    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1914esac
1915ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1916
1917    cd "$ac_dir" || { ac_status=$?; continue; }
1918    # Check for guested configure.
1919    if test -f "$ac_srcdir/configure.gnu"; then
1920      echo &&
1921      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1922    elif test -f "$ac_srcdir/configure"; then
1923      echo &&
1924      $SHELL "$ac_srcdir/configure" --help=recursive
1925    else
1926      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1927    fi || ac_status=$?
1928    cd "$ac_pwd" || { ac_status=$?; break; }
1929  done
1930fi
1931
1932test -n "$ac_init_help" && exit $ac_status
1933if $ac_init_version; then
1934  cat <<\_ACEOF
1935OpenJDK configure jdk8
1936generated by GNU Autoconf 2.69
1937
1938Copyright (C) 2012 Free Software Foundation, Inc.
1939This configure script is free software; the Free Software Foundation
1940gives unlimited permission to copy, distribute and modify it.
1941_ACEOF
1942  exit
1943fi
1944
1945## ------------------------ ##
1946## Autoconf initialization. ##
1947## ------------------------ ##
1948
1949# ac_fn_c_try_compile LINENO
1950# --------------------------
1951# Try to compile conftest.$ac_ext, and return whether this succeeded.
1952ac_fn_c_try_compile ()
1953{
1954  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955  rm -f conftest.$ac_objext
1956  if { { ac_try="$ac_compile"
1957case "(($ac_try" in
1958  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1959  *) ac_try_echo=$ac_try;;
1960esac
1961eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1962$as_echo "$ac_try_echo"; } >&5
1963  (eval "$ac_compile") 2>conftest.err
1964  ac_status=$?
1965  if test -s conftest.err; then
1966    grep -v '^ *+' conftest.err >conftest.er1
1967    cat conftest.er1 >&5
1968    mv -f conftest.er1 conftest.err
1969  fi
1970  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1971  test $ac_status = 0; } && {
1972	 test -z "$ac_c_werror_flag" ||
1973	 test ! -s conftest.err
1974       } && test -s conftest.$ac_objext; then :
1975  ac_retval=0
1976else
1977  $as_echo "$as_me: failed program was:" >&5
1978sed 's/^/| /' conftest.$ac_ext >&5
1979
1980	ac_retval=1
1981fi
1982  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1983  as_fn_set_status $ac_retval
1984
1985} # ac_fn_c_try_compile
1986
1987# ac_fn_cxx_try_compile LINENO
1988# ----------------------------
1989# Try to compile conftest.$ac_ext, and return whether this succeeded.
1990ac_fn_cxx_try_compile ()
1991{
1992  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993  rm -f conftest.$ac_objext
1994  if { { ac_try="$ac_compile"
1995case "(($ac_try" in
1996  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1997  *) ac_try_echo=$ac_try;;
1998esac
1999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2000$as_echo "$ac_try_echo"; } >&5
2001  (eval "$ac_compile") 2>conftest.err
2002  ac_status=$?
2003  if test -s conftest.err; then
2004    grep -v '^ *+' conftest.err >conftest.er1
2005    cat conftest.er1 >&5
2006    mv -f conftest.er1 conftest.err
2007  fi
2008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009  test $ac_status = 0; } && {
2010	 test -z "$ac_cxx_werror_flag" ||
2011	 test ! -s conftest.err
2012       } && test -s conftest.$ac_objext; then :
2013  ac_retval=0
2014else
2015  $as_echo "$as_me: failed program was:" >&5
2016sed 's/^/| /' conftest.$ac_ext >&5
2017
2018	ac_retval=1
2019fi
2020  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2021  as_fn_set_status $ac_retval
2022
2023} # ac_fn_cxx_try_compile
2024
2025# ac_fn_objc_try_compile LINENO
2026# -----------------------------
2027# Try to compile conftest.$ac_ext, and return whether this succeeded.
2028ac_fn_objc_try_compile ()
2029{
2030  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031  rm -f conftest.$ac_objext
2032  if { { ac_try="$ac_compile"
2033case "(($ac_try" in
2034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035  *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039  (eval "$ac_compile") 2>conftest.err
2040  ac_status=$?
2041  if test -s conftest.err; then
2042    grep -v '^ *+' conftest.err >conftest.er1
2043    cat conftest.er1 >&5
2044    mv -f conftest.er1 conftest.err
2045  fi
2046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047  test $ac_status = 0; } && {
2048	 test -z "$ac_objc_werror_flag" ||
2049	 test ! -s conftest.err
2050       } && test -s conftest.$ac_objext; then :
2051  ac_retval=0
2052else
2053  $as_echo "$as_me: failed program was:" >&5
2054sed 's/^/| /' conftest.$ac_ext >&5
2055
2056	ac_retval=1
2057fi
2058  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2059  as_fn_set_status $ac_retval
2060
2061} # ac_fn_objc_try_compile
2062
2063# ac_fn_c_try_cpp LINENO
2064# ----------------------
2065# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2066ac_fn_c_try_cpp ()
2067{
2068  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069  if { { ac_try="$ac_cpp conftest.$ac_ext"
2070case "(($ac_try" in
2071  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2072  *) ac_try_echo=$ac_try;;
2073esac
2074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2075$as_echo "$ac_try_echo"; } >&5
2076  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2077  ac_status=$?
2078  if test -s conftest.err; then
2079    grep -v '^ *+' conftest.err >conftest.er1
2080    cat conftest.er1 >&5
2081    mv -f conftest.er1 conftest.err
2082  fi
2083  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2084  test $ac_status = 0; } > conftest.i && {
2085	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2086	 test ! -s conftest.err
2087       }; then :
2088  ac_retval=0
2089else
2090  $as_echo "$as_me: failed program was:" >&5
2091sed 's/^/| /' conftest.$ac_ext >&5
2092
2093    ac_retval=1
2094fi
2095  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2096  as_fn_set_status $ac_retval
2097
2098} # ac_fn_c_try_cpp
2099
2100# ac_fn_cxx_try_cpp LINENO
2101# ------------------------
2102# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2103ac_fn_cxx_try_cpp ()
2104{
2105  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2106  if { { ac_try="$ac_cpp conftest.$ac_ext"
2107case "(($ac_try" in
2108  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2109  *) ac_try_echo=$ac_try;;
2110esac
2111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2112$as_echo "$ac_try_echo"; } >&5
2113  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2114  ac_status=$?
2115  if test -s conftest.err; then
2116    grep -v '^ *+' conftest.err >conftest.er1
2117    cat conftest.er1 >&5
2118    mv -f conftest.er1 conftest.err
2119  fi
2120  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2121  test $ac_status = 0; } > conftest.i && {
2122	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2123	 test ! -s conftest.err
2124       }; then :
2125  ac_retval=0
2126else
2127  $as_echo "$as_me: failed program was:" >&5
2128sed 's/^/| /' conftest.$ac_ext >&5
2129
2130    ac_retval=1
2131fi
2132  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2133  as_fn_set_status $ac_retval
2134
2135} # ac_fn_cxx_try_cpp
2136
2137# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2138# ---------------------------------------------------------
2139# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2140# the include files in INCLUDES and setting the cache variable VAR
2141# accordingly.
2142ac_fn_cxx_check_header_mongrel ()
2143{
2144  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2145  if eval \${$3+:} false; then :
2146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2147$as_echo_n "checking for $2... " >&6; }
2148if eval \${$3+:} false; then :
2149  $as_echo_n "(cached) " >&6
2150fi
2151eval ac_res=\$$3
2152	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2153$as_echo "$ac_res" >&6; }
2154else
2155  # Is the header compilable?
2156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2157$as_echo_n "checking $2 usability... " >&6; }
2158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159/* end confdefs.h.  */
2160$4
2161#include <$2>
2162_ACEOF
2163if ac_fn_cxx_try_compile "$LINENO"; then :
2164  ac_header_compiler=yes
2165else
2166  ac_header_compiler=no
2167fi
2168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2170$as_echo "$ac_header_compiler" >&6; }
2171
2172# Is the header present?
2173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2174$as_echo_n "checking $2 presence... " >&6; }
2175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h.  */
2177#include <$2>
2178_ACEOF
2179if ac_fn_cxx_try_cpp "$LINENO"; then :
2180  ac_header_preproc=yes
2181else
2182  ac_header_preproc=no
2183fi
2184rm -f conftest.err conftest.i conftest.$ac_ext
2185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2186$as_echo "$ac_header_preproc" >&6; }
2187
2188# So?  What about this header?
2189case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2190  yes:no: )
2191    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2192$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2193    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2194$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2195    ;;
2196  no:yes:* )
2197    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2198$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2199    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2200$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2201    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2202$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2203    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2204$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2205    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2206$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2207( $as_echo "## ----------------------------------------- ##
2208## Report this to build-dev@openjdk.java.net ##
2209## ----------------------------------------- ##"
2210     ) | sed "s/^/$as_me: WARNING:     /" >&2
2211    ;;
2212esac
2213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2214$as_echo_n "checking for $2... " >&6; }
2215if eval \${$3+:} false; then :
2216  $as_echo_n "(cached) " >&6
2217else
2218  eval "$3=\$ac_header_compiler"
2219fi
2220eval ac_res=\$$3
2221	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
2223fi
2224  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2225
2226} # ac_fn_cxx_check_header_mongrel
2227
2228# ac_fn_cxx_try_run LINENO
2229# ------------------------
2230# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2231# that executables *can* be run.
2232ac_fn_cxx_try_run ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  if { { ac_try="$ac_link"
2236case "(($ac_try" in
2237  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2238  *) ac_try_echo=$ac_try;;
2239esac
2240eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2241$as_echo "$ac_try_echo"; } >&5
2242  (eval "$ac_link") 2>&5
2243  ac_status=$?
2244  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2245  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2246  { { case "(($ac_try" in
2247  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2248  *) ac_try_echo=$ac_try;;
2249esac
2250eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2251$as_echo "$ac_try_echo"; } >&5
2252  (eval "$ac_try") 2>&5
2253  ac_status=$?
2254  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2255  test $ac_status = 0; }; }; then :
2256  ac_retval=0
2257else
2258  $as_echo "$as_me: program exited with status $ac_status" >&5
2259       $as_echo "$as_me: failed program was:" >&5
2260sed 's/^/| /' conftest.$ac_ext >&5
2261
2262       ac_retval=$ac_status
2263fi
2264  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2265  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2266  as_fn_set_status $ac_retval
2267
2268} # ac_fn_cxx_try_run
2269
2270# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2271# ---------------------------------------------------------
2272# Tests whether HEADER exists and can be compiled using the include files in
2273# INCLUDES, setting the cache variable VAR accordingly.
2274ac_fn_cxx_check_header_compile ()
2275{
2276  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2278$as_echo_n "checking for $2... " >&6; }
2279if eval \${$3+:} false; then :
2280  $as_echo_n "(cached) " >&6
2281else
2282  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283/* end confdefs.h.  */
2284$4
2285#include <$2>
2286_ACEOF
2287if ac_fn_cxx_try_compile "$LINENO"; then :
2288  eval "$3=yes"
2289else
2290  eval "$3=no"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294eval ac_res=\$$3
2295	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2296$as_echo "$ac_res" >&6; }
2297  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2298
2299} # ac_fn_cxx_check_header_compile
2300
2301# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2302# ----------------------------------------------
2303# Tries to find the compile-time value of EXPR in a program that includes
2304# INCLUDES, setting VAR accordingly. Returns whether the value could be
2305# computed
2306ac_fn_cxx_compute_int ()
2307{
2308  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309  if test "$cross_compiling" = yes; then
2310    # Depending upon the size, compute the lo and hi bounds.
2311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h.  */
2313$4
2314int
2315main ()
2316{
2317static int test_array [1 - 2 * !(($2) >= 0)];
2318test_array [0] = 0;
2319return test_array [0];
2320
2321  ;
2322  return 0;
2323}
2324_ACEOF
2325if ac_fn_cxx_try_compile "$LINENO"; then :
2326  ac_lo=0 ac_mid=0
2327  while :; do
2328    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h.  */
2330$4
2331int
2332main ()
2333{
2334static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2335test_array [0] = 0;
2336return test_array [0];
2337
2338  ;
2339  return 0;
2340}
2341_ACEOF
2342if ac_fn_cxx_try_compile "$LINENO"; then :
2343  ac_hi=$ac_mid; break
2344else
2345  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2346			if test $ac_lo -le $ac_mid; then
2347			  ac_lo= ac_hi=
2348			  break
2349			fi
2350			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2351fi
2352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2353  done
2354else
2355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h.  */
2357$4
2358int
2359main ()
2360{
2361static int test_array [1 - 2 * !(($2) < 0)];
2362test_array [0] = 0;
2363return test_array [0];
2364
2365  ;
2366  return 0;
2367}
2368_ACEOF
2369if ac_fn_cxx_try_compile "$LINENO"; then :
2370  ac_hi=-1 ac_mid=-1
2371  while :; do
2372    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h.  */
2374$4
2375int
2376main ()
2377{
2378static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2379test_array [0] = 0;
2380return test_array [0];
2381
2382  ;
2383  return 0;
2384}
2385_ACEOF
2386if ac_fn_cxx_try_compile "$LINENO"; then :
2387  ac_lo=$ac_mid; break
2388else
2389  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2390			if test $ac_mid -le $ac_hi; then
2391			  ac_lo= ac_hi=
2392			  break
2393			fi
2394			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397  done
2398else
2399  ac_lo= ac_hi=
2400fi
2401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2402fi
2403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2404# Binary search between lo and hi bounds.
2405while test "x$ac_lo" != "x$ac_hi"; do
2406  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408/* end confdefs.h.  */
2409$4
2410int
2411main ()
2412{
2413static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2414test_array [0] = 0;
2415return test_array [0];
2416
2417  ;
2418  return 0;
2419}
2420_ACEOF
2421if ac_fn_cxx_try_compile "$LINENO"; then :
2422  ac_hi=$ac_mid
2423else
2424  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2425fi
2426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427done
2428case $ac_lo in #((
2429?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2430'') ac_retval=1 ;;
2431esac
2432  else
2433    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h.  */
2435$4
2436static long int longval () { return $2; }
2437static unsigned long int ulongval () { return $2; }
2438#include <stdio.h>
2439#include <stdlib.h>
2440int
2441main ()
2442{
2443
2444  FILE *f = fopen ("conftest.val", "w");
2445  if (! f)
2446    return 1;
2447  if (($2) < 0)
2448    {
2449      long int i = longval ();
2450      if (i != ($2))
2451	return 1;
2452      fprintf (f, "%ld", i);
2453    }
2454  else
2455    {
2456      unsigned long int i = ulongval ();
2457      if (i != ($2))
2458	return 1;
2459      fprintf (f, "%lu", i);
2460    }
2461  /* Do not output a trailing newline, as this causes \r\n confusion
2462     on some platforms.  */
2463  return ferror (f) || fclose (f) != 0;
2464
2465  ;
2466  return 0;
2467}
2468_ACEOF
2469if ac_fn_cxx_try_run "$LINENO"; then :
2470  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2471else
2472  ac_retval=1
2473fi
2474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2475  conftest.$ac_objext conftest.beam conftest.$ac_ext
2476rm -f conftest.val
2477
2478  fi
2479  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2480  as_fn_set_status $ac_retval
2481
2482} # ac_fn_cxx_compute_int
2483
2484# ac_fn_cxx_try_link LINENO
2485# -------------------------
2486# Try to link conftest.$ac_ext, and return whether this succeeded.
2487ac_fn_cxx_try_link ()
2488{
2489  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2490  rm -f conftest.$ac_objext conftest$ac_exeext
2491  if { { ac_try="$ac_link"
2492case "(($ac_try" in
2493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494  *) ac_try_echo=$ac_try;;
2495esac
2496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2497$as_echo "$ac_try_echo"; } >&5
2498  (eval "$ac_link") 2>conftest.err
2499  ac_status=$?
2500  if test -s conftest.err; then
2501    grep -v '^ *+' conftest.err >conftest.er1
2502    cat conftest.er1 >&5
2503    mv -f conftest.er1 conftest.err
2504  fi
2505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506  test $ac_status = 0; } && {
2507	 test -z "$ac_cxx_werror_flag" ||
2508	 test ! -s conftest.err
2509       } && test -s conftest$ac_exeext && {
2510	 test "$cross_compiling" = yes ||
2511	 test -x conftest$ac_exeext
2512       }; then :
2513  ac_retval=0
2514else
2515  $as_echo "$as_me: failed program was:" >&5
2516sed 's/^/| /' conftest.$ac_ext >&5
2517
2518	ac_retval=1
2519fi
2520  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2521  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2522  # interfere with the next link command; also delete a directory that is
2523  # left behind by Apple's compiler.  We do this before executing the actions.
2524  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2525  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2526  as_fn_set_status $ac_retval
2527
2528} # ac_fn_cxx_try_link
2529
2530# ac_fn_cxx_check_func LINENO FUNC VAR
2531# ------------------------------------
2532# Tests whether FUNC exists, setting the cache variable VAR accordingly
2533ac_fn_cxx_check_func ()
2534{
2535  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2537$as_echo_n "checking for $2... " >&6; }
2538if eval \${$3+:} false; then :
2539  $as_echo_n "(cached) " >&6
2540else
2541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2542/* end confdefs.h.  */
2543/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2544   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2545#define $2 innocuous_$2
2546
2547/* System header to define __stub macros and hopefully few prototypes,
2548    which can conflict with char $2 (); below.
2549    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2550    <limits.h> exists even on freestanding compilers.  */
2551
2552#ifdef __STDC__
2553# include <limits.h>
2554#else
2555# include <assert.h>
2556#endif
2557
2558#undef $2
2559
2560/* Override any GCC internal prototype to avoid an error.
2561   Use char because int might match the return type of a GCC
2562   builtin and then its argument prototype would still apply.  */
2563#ifdef __cplusplus
2564extern "C"
2565#endif
2566char $2 ();
2567/* The GNU C library defines this for functions which it implements
2568    to always fail with ENOSYS.  Some functions are actually named
2569    something starting with __ and the normal name is an alias.  */
2570#if defined __stub_$2 || defined __stub___$2
2571choke me
2572#endif
2573
2574int
2575main ()
2576{
2577return $2 ();
2578  ;
2579  return 0;
2580}
2581_ACEOF
2582if ac_fn_cxx_try_link "$LINENO"; then :
2583  eval "$3=yes"
2584else
2585  eval "$3=no"
2586fi
2587rm -f core conftest.err conftest.$ac_objext \
2588    conftest$ac_exeext conftest.$ac_ext
2589fi
2590eval ac_res=\$$3
2591	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2592$as_echo "$ac_res" >&6; }
2593  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2594
2595} # ac_fn_cxx_check_func
2596
2597# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2598# -------------------------------------------------------
2599# Tests whether HEADER exists and can be compiled using the include files in
2600# INCLUDES, setting the cache variable VAR accordingly.
2601ac_fn_c_check_header_compile ()
2602{
2603  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2605$as_echo_n "checking for $2... " >&6; }
2606if eval \${$3+:} false; then :
2607  $as_echo_n "(cached) " >&6
2608else
2609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610/* end confdefs.h.  */
2611$4
2612#include <$2>
2613_ACEOF
2614if ac_fn_c_try_compile "$LINENO"; then :
2615  eval "$3=yes"
2616else
2617  eval "$3=no"
2618fi
2619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2620fi
2621eval ac_res=\$$3
2622	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2623$as_echo "$ac_res" >&6; }
2624  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2625
2626} # ac_fn_c_check_header_compile
2627cat >config.log <<_ACEOF
2628This file contains any messages produced by compilers while
2629running configure, to aid debugging if configure makes a mistake.
2630
2631It was created by OpenJDK $as_me jdk8, which was
2632generated by GNU Autoconf 2.69.  Invocation command line was
2633
2634  $ $0 $@
2635
2636_ACEOF
2637exec 5>>config.log
2638{
2639cat <<_ASUNAME
2640## --------- ##
2641## Platform. ##
2642## --------- ##
2643
2644hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2645uname -m = `(uname -m) 2>/dev/null || echo unknown`
2646uname -r = `(uname -r) 2>/dev/null || echo unknown`
2647uname -s = `(uname -s) 2>/dev/null || echo unknown`
2648uname -v = `(uname -v) 2>/dev/null || echo unknown`
2649
2650/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2651/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2652
2653/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2654/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2655/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2656/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2657/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2658/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2659/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2660
2661_ASUNAME
2662
2663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2664for as_dir in $PATH
2665do
2666  IFS=$as_save_IFS
2667  test -z "$as_dir" && as_dir=.
2668    $as_echo "PATH: $as_dir"
2669  done
2670IFS=$as_save_IFS
2671
2672} >&5
2673
2674cat >&5 <<_ACEOF
2675
2676
2677## ----------- ##
2678## Core tests. ##
2679## ----------- ##
2680
2681_ACEOF
2682
2683
2684# Keep a trace of the command line.
2685# Strip out --no-create and --no-recursion so they do not pile up.
2686# Strip out --silent because we don't want to record it for future runs.
2687# Also quote any args containing shell meta-characters.
2688# Make two passes to allow for proper duplicate-argument suppression.
2689ac_configure_args=
2690ac_configure_args0=
2691ac_configure_args1=
2692ac_must_keep_next=false
2693for ac_pass in 1 2
2694do
2695  for ac_arg
2696  do
2697    case $ac_arg in
2698    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2699    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2700    | -silent | --silent | --silen | --sile | --sil)
2701      continue ;;
2702    *\'*)
2703      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2704    esac
2705    case $ac_pass in
2706    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2707    2)
2708      as_fn_append ac_configure_args1 " '$ac_arg'"
2709      if test $ac_must_keep_next = true; then
2710	ac_must_keep_next=false # Got value, back to normal.
2711      else
2712	case $ac_arg in
2713	  *=* | --config-cache | -C | -disable-* | --disable-* \
2714	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2715	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2716	  | -with-* | --with-* | -without-* | --without-* | --x)
2717	    case "$ac_configure_args0 " in
2718	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2719	    esac
2720	    ;;
2721	  -* ) ac_must_keep_next=true ;;
2722	esac
2723      fi
2724      as_fn_append ac_configure_args " '$ac_arg'"
2725      ;;
2726    esac
2727  done
2728done
2729{ ac_configure_args0=; unset ac_configure_args0;}
2730{ ac_configure_args1=; unset ac_configure_args1;}
2731
2732# When interrupted or exit'd, cleanup temporary files, and complete
2733# config.log.  We remove comments because anyway the quotes in there
2734# would cause problems or look ugly.
2735# WARNING: Use '\'' to represent an apostrophe within the trap.
2736# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2737trap 'exit_status=$?
2738  # Save into config.log some information that might help in debugging.
2739  {
2740    echo
2741
2742    $as_echo "## ---------------- ##
2743## Cache variables. ##
2744## ---------------- ##"
2745    echo
2746    # The following way of writing the cache mishandles newlines in values,
2747(
2748  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2749    eval ac_val=\$$ac_var
2750    case $ac_val in #(
2751    *${as_nl}*)
2752      case $ac_var in #(
2753      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2754$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2755      esac
2756      case $ac_var in #(
2757      _ | IFS | as_nl) ;; #(
2758      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2759      *) { eval $ac_var=; unset $ac_var;} ;;
2760      esac ;;
2761    esac
2762  done
2763  (set) 2>&1 |
2764    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2765    *${as_nl}ac_space=\ *)
2766      sed -n \
2767	"s/'\''/'\''\\\\'\'''\''/g;
2768	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2769      ;; #(
2770    *)
2771      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2772      ;;
2773    esac |
2774    sort
2775)
2776    echo
2777
2778    $as_echo "## ----------------- ##
2779## Output variables. ##
2780## ----------------- ##"
2781    echo
2782    for ac_var in $ac_subst_vars
2783    do
2784      eval ac_val=\$$ac_var
2785      case $ac_val in
2786      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2787      esac
2788      $as_echo "$ac_var='\''$ac_val'\''"
2789    done | sort
2790    echo
2791
2792    if test -n "$ac_subst_files"; then
2793      $as_echo "## ------------------- ##
2794## File substitutions. ##
2795## ------------------- ##"
2796      echo
2797      for ac_var in $ac_subst_files
2798      do
2799	eval ac_val=\$$ac_var
2800	case $ac_val in
2801	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2802	esac
2803	$as_echo "$ac_var='\''$ac_val'\''"
2804      done | sort
2805      echo
2806    fi
2807
2808    if test -s confdefs.h; then
2809      $as_echo "## ----------- ##
2810## confdefs.h. ##
2811## ----------- ##"
2812      echo
2813      cat confdefs.h
2814      echo
2815    fi
2816    test "$ac_signal" != 0 &&
2817      $as_echo "$as_me: caught signal $ac_signal"
2818    $as_echo "$as_me: exit $exit_status"
2819  } >&5
2820  rm -f core *.core core.conftest.* &&
2821    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2822    exit $exit_status
2823' 0
2824for ac_signal in 1 2 13 15; do
2825  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2826done
2827ac_signal=0
2828
2829# confdefs.h avoids OS command line length limits that DEFS can exceed.
2830rm -f -r conftest* confdefs.h
2831
2832$as_echo "/* confdefs.h */" > confdefs.h
2833
2834# Predefined preprocessor variables.
2835
2836cat >>confdefs.h <<_ACEOF
2837#define PACKAGE_NAME "$PACKAGE_NAME"
2838_ACEOF
2839
2840cat >>confdefs.h <<_ACEOF
2841#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2842_ACEOF
2843
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE_VERSION "$PACKAGE_VERSION"
2846_ACEOF
2847
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_STRING "$PACKAGE_STRING"
2850_ACEOF
2851
2852cat >>confdefs.h <<_ACEOF
2853#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2854_ACEOF
2855
2856cat >>confdefs.h <<_ACEOF
2857#define PACKAGE_URL "$PACKAGE_URL"
2858_ACEOF
2859
2860
2861# Let the site file select an alternate cache file if it wants to.
2862# Prefer an explicitly selected file to automatically selected ones.
2863ac_site_file1=NONE
2864ac_site_file2=NONE
2865if test -n "$CONFIG_SITE"; then
2866  # We do not want a PATH search for config.site.
2867  case $CONFIG_SITE in #((
2868    -*)  ac_site_file1=./$CONFIG_SITE;;
2869    */*) ac_site_file1=$CONFIG_SITE;;
2870    *)   ac_site_file1=./$CONFIG_SITE;;
2871  esac
2872elif test "x$prefix" != xNONE; then
2873  ac_site_file1=$prefix/share/config.site
2874  ac_site_file2=$prefix/etc/config.site
2875else
2876  ac_site_file1=$ac_default_prefix/share/config.site
2877  ac_site_file2=$ac_default_prefix/etc/config.site
2878fi
2879for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2880do
2881  test "x$ac_site_file" = xNONE && continue
2882  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2883    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2884$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2885    sed 's/^/| /' "$ac_site_file" >&5
2886    . "$ac_site_file" \
2887      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2889as_fn_error $? "failed to load site script $ac_site_file
2890See \`config.log' for more details" "$LINENO" 5; }
2891  fi
2892done
2893
2894if test -r "$cache_file"; then
2895  # Some versions of bash will fail to source /dev/null (special files
2896  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2897  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2898    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2899$as_echo "$as_me: loading cache $cache_file" >&6;}
2900    case $cache_file in
2901      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2902      *)                      . "./$cache_file";;
2903    esac
2904  fi
2905else
2906  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2907$as_echo "$as_me: creating cache $cache_file" >&6;}
2908  >$cache_file
2909fi
2910
2911# Check that the precious variables saved in the cache have kept the same
2912# value.
2913ac_cache_corrupted=false
2914for ac_var in $ac_precious_vars; do
2915  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2916  eval ac_new_set=\$ac_env_${ac_var}_set
2917  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2918  eval ac_new_val=\$ac_env_${ac_var}_value
2919  case $ac_old_set,$ac_new_set in
2920    set,)
2921      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2922$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2923      ac_cache_corrupted=: ;;
2924    ,set)
2925      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2926$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2927      ac_cache_corrupted=: ;;
2928    ,);;
2929    *)
2930      if test "x$ac_old_val" != "x$ac_new_val"; then
2931	# differences in whitespace do not lead to failure.
2932	ac_old_val_w=`echo x $ac_old_val`
2933	ac_new_val_w=`echo x $ac_new_val`
2934	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2935	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2936$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2937	  ac_cache_corrupted=:
2938	else
2939	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2940$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2941	  eval $ac_var=\$ac_old_val
2942	fi
2943	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2944$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2945	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2946$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2947      fi;;
2948  esac
2949  # Pass precious variables to config.status.
2950  if test "$ac_new_set" = set; then
2951    case $ac_new_val in
2952    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2953    *) ac_arg=$ac_var=$ac_new_val ;;
2954    esac
2955    case " $ac_configure_args " in
2956      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2957      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2958    esac
2959  fi
2960done
2961if $ac_cache_corrupted; then
2962  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2964  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2965$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2966  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2967fi
2968## -------------------- ##
2969## Main body of script. ##
2970## -------------------- ##
2971
2972ac_ext=c
2973ac_cpp='$CPP $CPPFLAGS'
2974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2976ac_compiler_gnu=$ac_cv_c_compiler_gnu
2977
2978
2979
2980ac_aux_dir=
2981for ac_dir in build-aux "$srcdir"/build-aux; do
2982  if test -f "$ac_dir/install-sh"; then
2983    ac_aux_dir=$ac_dir
2984    ac_install_sh="$ac_aux_dir/install-sh -c"
2985    break
2986  elif test -f "$ac_dir/install.sh"; then
2987    ac_aux_dir=$ac_dir
2988    ac_install_sh="$ac_aux_dir/install.sh -c"
2989    break
2990  elif test -f "$ac_dir/shtool"; then
2991    ac_aux_dir=$ac_dir
2992    ac_install_sh="$ac_aux_dir/shtool install -c"
2993    break
2994  fi
2995done
2996if test -z "$ac_aux_dir"; then
2997  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2998fi
2999
3000# These three variables are undocumented and unsupported,
3001# and are intended to be withdrawn in a future Autoconf release.
3002# They can cause serious problems if a builder's source tree is in a directory
3003# whose full name contains unusual characters.
3004ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3005ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3006ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3007
3008
3009# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3010
3011#
3012# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3013# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3014#
3015# This code is free software; you can redistribute it and/or modify it
3016# under the terms of the GNU General Public License version 2 only, as
3017# published by the Free Software Foundation.  Oracle designates this
3018# particular file as subject to the "Classpath" exception as provided
3019# by Oracle in the LICENSE file that accompanied this code.
3020#
3021# This code is distributed in the hope that it will be useful, but WITHOUT
3022# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3023# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3024# version 2 for more details (a copy is included in the LICENSE file that
3025# accompanied this code).
3026#
3027# You should have received a copy of the GNU General Public License version
3028# 2 along with this work; if not, write to the Free Software Foundation,
3029# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3030#
3031# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3032# or visit www.oracle.com if you need additional information or have any
3033# questions.
3034#
3035
3036#
3037# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3038#
3039# This program is free software; you can redistribute it and/or modify
3040# it under the terms of the GNU General Public License as published by
3041# the Free Software Foundation; either version 2 of the License, or
3042# (at your option) any later version.
3043#
3044# This program is distributed in the hope that it will be useful, but
3045# WITHOUT ANY WARRANTY; without even the implied warranty of
3046# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3047# General Public License for more details.
3048#
3049# You should have received a copy of the GNU General Public License
3050# along with this program; if not, write to the Free Software
3051# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3052#
3053# As a special exception to the GNU General Public License, if you
3054# distribute this file as part of a program that contains a
3055# configuration script generated by Autoconf, you may include it under
3056# the same distribution terms that you use for the rest of that program.
3057
3058# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3059# ----------------------------------
3060# PKG_PROG_PKG_CONFIG
3061
3062# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3063#
3064# Check to see whether a particular set of modules exists.  Similar
3065# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3066#
3067#
3068# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3069# this or PKG_CHECK_MODULES is called, or make sure to call
3070# PKG_CHECK_EXISTS manually
3071# --------------------------------------------------------------
3072
3073
3074
3075# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3076# ---------------------------------------------
3077# _PKG_CONFIG
3078
3079# _PKG_SHORT_ERRORS_SUPPORTED
3080# -----------------------------
3081# _PKG_SHORT_ERRORS_SUPPORTED
3082
3083
3084# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3085# [ACTION-IF-NOT-FOUND])
3086#
3087#
3088# Note that if there is a possibility the first call to
3089# PKG_CHECK_MODULES might not happen, you should be sure to include an
3090# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3091#
3092#
3093# --------------------------------------------------------------
3094# PKG_CHECK_MODULES
3095
3096
3097# Include these first...
3098#
3099# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3100# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3101#
3102# This code is free software; you can redistribute it and/or modify it
3103# under the terms of the GNU General Public License version 2 only, as
3104# published by the Free Software Foundation.  Oracle designates this
3105# particular file as subject to the "Classpath" exception as provided
3106# by Oracle in the LICENSE file that accompanied this code.
3107#
3108# This code is distributed in the hope that it will be useful, but WITHOUT
3109# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3110# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3111# version 2 for more details (a copy is included in the LICENSE file that
3112# accompanied this code).
3113#
3114# You should have received a copy of the GNU General Public License version
3115# 2 along with this work; if not, write to the Free Software Foundation,
3116# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3117#
3118# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3119# or visit www.oracle.com if you need additional information or have any
3120# questions.
3121#
3122
3123# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3124# If so, then append $1 to $2 \
3125# Also set JVM_ARG_OK to true/false depending on outcome.
3126
3127
3128# Appends a string to a path variable, only adding the : when needed.
3129
3130
3131# This will make sure the given variable points to a full and proper
3132# path. This means:
3133# 1) There will be no spaces in the path. On posix platforms,
3134#    spaces in the path will result in an error. On Windows,
3135#    the path will be rewritten using short-style to be space-free.
3136# 2) The path will be absolute, and it will be in unix-style (on
3137#     cygwin).
3138# $1: The name of the variable to fix
3139
3140
3141# This will make sure the given variable points to a executable
3142# with a full and proper path. This means:
3143# 1) There will be no spaces in the path. On posix platforms,
3144#    spaces in the path will result in an error. On Windows,
3145#    the path will be rewritten using short-style to be space-free.
3146# 2) The path will be absolute, and it will be in unix-style (on
3147#     cygwin).
3148# Any arguments given to the executable is preserved.
3149# If the input variable does not have a directory specification, then
3150# it need to be in the PATH.
3151# $1: The name of the variable to fix
3152
3153
3154
3155
3156# Register a --with argument but mark it as deprecated
3157# $1: The name of the with argument to deprecate, not including --with-
3158
3159
3160# Register a --enable argument but mark it as deprecated
3161# $1: The name of the with argument to deprecate, not including --enable-
3162# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3163
3164
3165
3166
3167# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3168# $1: variable to check
3169# $2: executable name to print in warning (optional)
3170
3171
3172# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3173# Arguments as AC_PATH_PROG:
3174# $1: variable to set
3175# $2: executable name to look for
3176
3177
3178# Setup the most fundamental tools that relies on not much else to set up,
3179# but is used by much of the early bootstrap code.
3180
3181
3182# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3183
3184
3185
3186
3187
3188
3189
3190#%%% Simple tools %%%
3191
3192# Check if we have found a usable version of make
3193# $1: the path to a potential make binary (or empty)
3194# $2: the description on how we found this
3195
3196
3197# Goes looking for a usable version of GNU make.
3198
3199
3200
3201
3202
3203
3204# Check if build directory is on local disk. If not possible to determine,
3205# we prefer to claim it's local.
3206# Argument 1: directory to test
3207# Argument 2: what to do if it is on local disk
3208# Argument 3: what to do otherwise (remote disk or failure)
3209
3210
3211# Check that source files have basic read permissions set. This might
3212# not be the case in cygwin in certain conditions.
3213
3214
3215
3216
3217#
3218# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3219# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3220#
3221# This code is free software; you can redistribute it and/or modify it
3222# under the terms of the GNU General Public License version 2 only, as
3223# published by the Free Software Foundation.  Oracle designates this
3224# particular file as subject to the "Classpath" exception as provided
3225# by Oracle in the LICENSE file that accompanied this code.
3226#
3227# This code is distributed in the hope that it will be useful, but WITHOUT
3228# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3229# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3230# version 2 for more details (a copy is included in the LICENSE file that
3231# accompanied this code).
3232#
3233# You should have received a copy of the GNU General Public License version
3234# 2 along with this work; if not, write to the Free Software Foundation,
3235# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3236#
3237# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3238# or visit www.oracle.com if you need additional information or have any
3239# questions.
3240#
3241
3242
3243
3244
3245
3246# Helper function which possibly converts a path using DOS-style short mode.
3247# If so, the updated path is stored in $new_path.
3248# $1: The path to check
3249
3250
3251# Helper function which possibly converts a path using DOS-style short mode.
3252# If so, the updated path is stored in $new_path.
3253# $1: The path to check
3254
3255
3256# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3257# and could probably be heavily simplified. However, all changes in this
3258# area tend to need lot of testing in different scenarios, and in lack of
3259# proper unit testing, cleaning this up has not been deemed worth the effort
3260# at the moment.
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3271
3272
3273
3274
3275#
3276# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3277# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3278#
3279# This code is free software; you can redistribute it and/or modify it
3280# under the terms of the GNU General Public License version 2 only, as
3281# published by the Free Software Foundation.  Oracle designates this
3282# particular file as subject to the "Classpath" exception as provided
3283# by Oracle in the LICENSE file that accompanied this code.
3284#
3285# This code is distributed in the hope that it will be useful, but WITHOUT
3286# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3287# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3288# version 2 for more details (a copy is included in the LICENSE file that
3289# accompanied this code).
3290#
3291# You should have received a copy of the GNU General Public License version
3292# 2 along with this work; if not, write to the Free Software Foundation,
3293# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3294#
3295# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3296# or visit www.oracle.com if you need additional information or have any
3297# questions.
3298#
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310# ... then the rest
3311#
3312# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3313# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3314#
3315# This code is free software; you can redistribute it and/or modify it
3316# under the terms of the GNU General Public License version 2 only, as
3317# published by the Free Software Foundation.  Oracle designates this
3318# particular file as subject to the "Classpath" exception as provided
3319# by Oracle in the LICENSE file that accompanied this code.
3320#
3321# This code is distributed in the hope that it will be useful, but WITHOUT
3322# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3323# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3324# version 2 for more details (a copy is included in the LICENSE file that
3325# accompanied this code).
3326#
3327# You should have received a copy of the GNU General Public License version
3328# 2 along with this work; if not, write to the Free Software Foundation,
3329# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3330#
3331# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3332# or visit www.oracle.com if you need additional information or have any
3333# questions.
3334#
3335
3336# Execute the check given as argument, and verify the result
3337# If the Boot JDK was previously found, do nothing
3338# $1 A command line (typically autoconf macro) to execute
3339
3340
3341# Test: Is bootjdk explicitely set by command line arguments?
3342
3343
3344# Test: Is bootjdk available from builddeps?
3345
3346
3347# Test: Is $JAVA_HOME set?
3348
3349
3350# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3351
3352
3353# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3354
3355
3356# Look for a jdk in the given path. If there are multiple, try to select the newest.
3357# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3358# $1 = Path to directory containing jdk installations.
3359# $2 = String to append to the found JDK directory to get the proper JDK home
3360
3361
3362# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3363# environmental variable as base for where to look.
3364# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3365
3366
3367# Test: Is there a JDK installed in default, well-known locations?
3368
3369
3370# Check that a command-line tool in the Boot JDK is correct
3371# $1 = name of variable to assign
3372# $2 = name of binary
3373
3374
3375###############################################################################
3376#
3377# We need a Boot JDK to bootstrap the build.
3378#
3379
3380
3381
3382
3383
3384#
3385# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3386# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3387#
3388# This code is free software; you can redistribute it and/or modify it
3389# under the terms of the GNU General Public License version 2 only, as
3390# published by the Free Software Foundation.  Oracle designates this
3391# particular file as subject to the "Classpath" exception as provided
3392# by Oracle in the LICENSE file that accompanied this code.
3393#
3394# This code is distributed in the hope that it will be useful, but WITHOUT
3395# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3396# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3397# version 2 for more details (a copy is included in the LICENSE file that
3398# accompanied this code).
3399#
3400# You should have received a copy of the GNU General Public License version
3401# 2 along with this work; if not, write to the Free Software Foundation,
3402# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3403#
3404# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3405# or visit www.oracle.com if you need additional information or have any
3406# questions.
3407#
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428#
3429# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3430# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3431#
3432# This code is free software; you can redistribute it and/or modify it
3433# under the terms of the GNU General Public License version 2 only, as
3434# published by the Free Software Foundation.  Oracle designates this
3435# particular file as subject to the "Classpath" exception as provided
3436# by Oracle in the LICENSE file that accompanied this code.
3437#
3438# This code is distributed in the hope that it will be useful, but WITHOUT
3439# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3440# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3441# version 2 for more details (a copy is included in the LICENSE file that
3442# accompanied this code).
3443#
3444# You should have received a copy of the GNU General Public License version
3445# 2 along with this work; if not, write to the Free Software Foundation,
3446# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3447#
3448# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3449# or visit www.oracle.com if you need additional information or have any
3450# questions.
3451#
3452
3453
3454
3455
3456
3457cygwin_help() {
3458  case $1 in
3459    unzip)
3460      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3461      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3462      ;;
3463    zip)
3464      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3465      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3466      ;;
3467    make)
3468      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3469      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3470      ;;
3471    freetype)
3472      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3473        HELP_MSG="To install freetype, run:
3474wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3475chmod +x /tmp/freetype-setup.exe
3476/tmp/freetype-setup.exe
3477Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3478After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3479      else
3480        HELP_MSG="You need to build a 64-bit version of freetype.
3481This is not readily available.
3482You can find source code and build instructions on
3483http://www.freetype.org/
3484If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3485      fi
3486      ;;
3487    * )
3488      break ;;
3489  esac
3490}
3491
3492msys_help() {
3493  PKGHANDLER_COMMAND=""
3494}
3495
3496apt_help() {
3497  case $1 in
3498    devkit)
3499      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3500    openjdk)
3501      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3502    alsa)
3503      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3504    cups)
3505      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3506    freetype)
3507      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3508    pulse)
3509      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3510    x11)
3511      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3512    ccache)
3513      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3514    * )
3515      break ;;
3516  esac
3517}
3518
3519yum_help() {
3520  case $1 in
3521    devkit)
3522      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3523    openjdk)
3524      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3525    alsa)
3526      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3527    cups)
3528      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3529    freetype)
3530      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3531    pulse)
3532      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3533    x11)
3534      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3535    ccache)
3536      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3537    * )
3538      break ;;
3539  esac
3540}
3541
3542port_help() {
3543  PKGHANDLER_COMMAND=""
3544}
3545
3546pkgutil_help() {
3547  PKGHANDLER_COMMAND=""
3548}
3549
3550pkgadd_help() {
3551  PKGHANDLER_COMMAND=""
3552}
3553
3554
3555
3556#
3557# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3558# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3559#
3560# This code is free software; you can redistribute it and/or modify it
3561# under the terms of the GNU General Public License version 2 only, as
3562# published by the Free Software Foundation.  Oracle designates this
3563# particular file as subject to the "Classpath" exception as provided
3564# by Oracle in the LICENSE file that accompanied this code.
3565#
3566# This code is distributed in the hope that it will be useful, but WITHOUT
3567# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3568# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3569# version 2 for more details (a copy is included in the LICENSE file that
3570# accompanied this code).
3571#
3572# You should have received a copy of the GNU General Public License version
3573# 2 along with this work; if not, write to the Free Software Foundation,
3574# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3575#
3576# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3577# or visit www.oracle.com if you need additional information or have any
3578# questions.
3579#
3580
3581
3582
3583
3584
3585
3586
3587
3588###############################################################################
3589#
3590# Should we build only OpenJDK even if closed sources are present?
3591#
3592
3593
3594
3595
3596###############################################################################
3597#
3598# Setup version numbers
3599#
3600
3601
3602
3603
3604
3605
3606# Support for customization of the build process. Some build files
3607# will include counterparts from this location, if they exist. This allows
3608# for a degree of customization of the build targets and the rules/recipes
3609# to create them
3610
3611# Check whether --with-custom-make-dir was given.
3612if test "${with_custom_make_dir+set}" = set; then :
3613  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3614fi
3615
3616
3617
3618#
3619# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3621#
3622# This code is free software; you can redistribute it and/or modify it
3623# under the terms of the GNU General Public License version 2 only, as
3624# published by the Free Software Foundation.  Oracle designates this
3625# particular file as subject to the "Classpath" exception as provided
3626# by Oracle in the LICENSE file that accompanied this code.
3627#
3628# This code is distributed in the hope that it will be useful, but WITHOUT
3629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3631# version 2 for more details (a copy is included in the LICENSE file that
3632# accompanied this code).
3633#
3634# You should have received a copy of the GNU General Public License version
3635# 2 along with this work; if not, write to the Free Software Foundation,
3636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3637#
3638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3639# or visit www.oracle.com if you need additional information or have any
3640# questions.
3641#
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659#
3660# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3661# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3662#
3663# This code is free software; you can redistribute it and/or modify it
3664# under the terms of the GNU General Public License version 2 only, as
3665# published by the Free Software Foundation.  Oracle designates this
3666# particular file as subject to the "Classpath" exception as provided
3667# by Oracle in the LICENSE file that accompanied this code.
3668#
3669# This code is distributed in the hope that it will be useful, but WITHOUT
3670# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3671# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3672# version 2 for more details (a copy is included in the LICENSE file that
3673# accompanied this code).
3674#
3675# You should have received a copy of the GNU General Public License version
3676# 2 along with this work; if not, write to the Free Software Foundation,
3677# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3678#
3679# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3680# or visit www.oracle.com if you need additional information or have any
3681# questions.
3682#
3683
3684# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3685# Converts autoconf style CPU name to OpenJDK style, into
3686# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3687
3688
3689# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3690# Converts autoconf style OS name to OpenJDK style, into
3691# VAR_OS and VAR_OS_API.
3692
3693
3694# Expects $host_os $host_cpu $build_os and $build_cpu
3695# and $with_target_bits to have been setup!
3696#
3697# Translate the standard triplet(quadruplet) definition
3698# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3699# OPENJDK_BUILD_OS, etc.
3700
3701
3702# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3703# accordingly. Must be done after setting up build and target system, but before
3704# doing anything else with these values.
3705
3706
3707# Setup the legacy variables, for controlling the old makefiles.
3708#
3709
3710
3711
3712
3713#%%% Build and target systems %%%
3714
3715
3716
3717
3718# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3719# Add -mX to various FLAGS variables.
3720
3721
3722
3723
3724
3725
3726#
3727# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3728# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3729#
3730# This code is free software; you can redistribute it and/or modify it
3731# under the terms of the GNU General Public License version 2 only, as
3732# published by the Free Software Foundation.  Oracle designates this
3733# particular file as subject to the "Classpath" exception as provided
3734# by Oracle in the LICENSE file that accompanied this code.
3735#
3736# This code is distributed in the hope that it will be useful, but WITHOUT
3737# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3738# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3739# version 2 for more details (a copy is included in the LICENSE file that
3740# accompanied this code).
3741#
3742# You should have received a copy of the GNU General Public License version
3743# 2 along with this work; if not, write to the Free Software Foundation,
3744# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3745#
3746# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3747# or visit www.oracle.com if you need additional information or have any
3748# questions.
3749#
3750
3751
3752
3753
3754
3755
3756
3757
3758#
3759# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3760# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3761#
3762# This code is free software; you can redistribute it and/or modify it
3763# under the terms of the GNU General Public License version 2 only, as
3764# published by the Free Software Foundation.  Oracle designates this
3765# particular file as subject to the "Classpath" exception as provided
3766# by Oracle in the LICENSE file that accompanied this code.
3767#
3768# This code is distributed in the hope that it will be useful, but WITHOUT
3769# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3770# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3771# version 2 for more details (a copy is included in the LICENSE file that
3772# accompanied this code).
3773#
3774# You should have received a copy of the GNU General Public License version
3775# 2 along with this work; if not, write to the Free Software Foundation,
3776# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3777#
3778# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3779# or visit www.oracle.com if you need additional information or have any
3780# questions.
3781#
3782
3783# $1 = compiler to test (CC or CXX)
3784# $2 = human readable name of compiler (C or C++)
3785
3786
3787
3788
3789
3790# $1 = compiler to test (CC or CXX)
3791# $2 = human readable name of compiler (C or C++)
3792# $3 = list of compiler names to search for
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3807#                                   [RUN-IF-FALSE])
3808# ------------------------------------------------------------
3809# Check that the c and c++ compilers support an argument
3810
3811
3812
3813
3814# Setup the JTREG paths
3815
3816
3817#
3818# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3819# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3820#
3821# This code is free software; you can redistribute it and/or modify it
3822# under the terms of the GNU General Public License version 2 only, as
3823# published by the Free Software Foundation.  Oracle designates this
3824# particular file as subject to the "Classpath" exception as provided
3825# by Oracle in the LICENSE file that accompanied this code.
3826#
3827# This code is distributed in the hope that it will be useful, but WITHOUT
3828# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3829# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3830# version 2 for more details (a copy is included in the LICENSE file that
3831# accompanied this code).
3832#
3833# You should have received a copy of the GNU General Public License version
3834# 2 along with this work; if not, write to the Free Software Foundation,
3835# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3836#
3837# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3838# or visit www.oracle.com if you need additional information or have any
3839# questions.
3840#
3841
3842
3843
3844
3845
3846
3847
3848# Check if the VS env variables were setup prior to running configure.
3849# If not, then find vcvarsall.bat and run it automatically, and integrate
3850# the set env variables into the spec file.
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861# This line needs to be here, verbatim, after all includes and the dummy hook
3862# definitions. It is replaced with custom functionality when building
3863# custom sources.
3864#CUSTOM_AUTOCONF_INCLUDE
3865
3866# Do not change or remove the following line, it is needed for consistency checks:
3867DATE_WHEN_GENERATED=1383151988
3868
3869###############################################################################
3870#
3871# Initialization / Boot-strapping
3872#
3873# The bootstrapping process needs to solve the "chicken or the egg" problem,
3874# thus it jumps back and forth, each time gaining something needed later on.
3875#
3876###############################################################################
3877
3878# Basic initialization that must happen first of all
3879
3880  # Save the original command line. This is passed to us by the wrapper configure script.
3881
3882  DATE_WHEN_CONFIGURED=`LANG=C date`
3883
3884  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3885$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3886  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3887$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3888
3889
3890
3891  # Start with tools that do not need have cross compilation support
3892  # and can be expected to be found in the default PATH. These tools are
3893  # used by configure. Nor are these tools expected to be found in the
3894  # devkit from the builddeps server either, since they are
3895  # needed to download the devkit.
3896
3897  # First are all the simple required tools.
3898
3899  for ac_prog in basename
3900do
3901  # Extract the first word of "$ac_prog", so it can be a program name with args.
3902set dummy $ac_prog; ac_word=$2
3903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3904$as_echo_n "checking for $ac_word... " >&6; }
3905if ${ac_cv_path_BASENAME+:} false; then :
3906  $as_echo_n "(cached) " >&6
3907else
3908  case $BASENAME in
3909  [\\/]* | ?:[\\/]*)
3910  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3911  ;;
3912  *)
3913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3914for as_dir in $PATH
3915do
3916  IFS=$as_save_IFS
3917  test -z "$as_dir" && as_dir=.
3918    for ac_exec_ext in '' $ac_executable_extensions; do
3919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3920    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3922    break 2
3923  fi
3924done
3925  done
3926IFS=$as_save_IFS
3927
3928  ;;
3929esac
3930fi
3931BASENAME=$ac_cv_path_BASENAME
3932if test -n "$BASENAME"; then
3933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3934$as_echo "$BASENAME" >&6; }
3935else
3936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3937$as_echo "no" >&6; }
3938fi
3939
3940
3941  test -n "$BASENAME" && break
3942done
3943
3944
3945  if test "x$BASENAME" = x; then
3946    if test "xbasename" = x; then
3947      PROG_NAME=basename
3948    else
3949      PROG_NAME=basename
3950    fi
3951    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3952$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3953    as_fn_error $? "Cannot continue" "$LINENO" 5
3954  fi
3955
3956
3957
3958  for ac_prog in bash
3959do
3960  # Extract the first word of "$ac_prog", so it can be a program name with args.
3961set dummy $ac_prog; ac_word=$2
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3963$as_echo_n "checking for $ac_word... " >&6; }
3964if ${ac_cv_path_BASH+:} false; then :
3965  $as_echo_n "(cached) " >&6
3966else
3967  case $BASH in
3968  [\\/]* | ?:[\\/]*)
3969  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3970  ;;
3971  *)
3972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973for as_dir in $PATH
3974do
3975  IFS=$as_save_IFS
3976  test -z "$as_dir" && as_dir=.
3977    for ac_exec_ext in '' $ac_executable_extensions; do
3978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3979    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3981    break 2
3982  fi
3983done
3984  done
3985IFS=$as_save_IFS
3986
3987  ;;
3988esac
3989fi
3990BASH=$ac_cv_path_BASH
3991if test -n "$BASH"; then
3992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3993$as_echo "$BASH" >&6; }
3994else
3995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3996$as_echo "no" >&6; }
3997fi
3998
3999
4000  test -n "$BASH" && break
4001done
4002
4003
4004  if test "x$BASH" = x; then
4005    if test "xbash" = x; then
4006      PROG_NAME=bash
4007    else
4008      PROG_NAME=bash
4009    fi
4010    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4011$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4012    as_fn_error $? "Cannot continue" "$LINENO" 5
4013  fi
4014
4015
4016
4017  for ac_prog in cat
4018do
4019  # Extract the first word of "$ac_prog", so it can be a program name with args.
4020set dummy $ac_prog; ac_word=$2
4021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4022$as_echo_n "checking for $ac_word... " >&6; }
4023if ${ac_cv_path_CAT+:} false; then :
4024  $as_echo_n "(cached) " >&6
4025else
4026  case $CAT in
4027  [\\/]* | ?:[\\/]*)
4028  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4029  ;;
4030  *)
4031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4032for as_dir in $PATH
4033do
4034  IFS=$as_save_IFS
4035  test -z "$as_dir" && as_dir=.
4036    for ac_exec_ext in '' $ac_executable_extensions; do
4037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4038    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4040    break 2
4041  fi
4042done
4043  done
4044IFS=$as_save_IFS
4045
4046  ;;
4047esac
4048fi
4049CAT=$ac_cv_path_CAT
4050if test -n "$CAT"; then
4051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4052$as_echo "$CAT" >&6; }
4053else
4054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4055$as_echo "no" >&6; }
4056fi
4057
4058
4059  test -n "$CAT" && break
4060done
4061
4062
4063  if test "x$CAT" = x; then
4064    if test "xcat" = x; then
4065      PROG_NAME=cat
4066    else
4067      PROG_NAME=cat
4068    fi
4069    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4070$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4071    as_fn_error $? "Cannot continue" "$LINENO" 5
4072  fi
4073
4074
4075
4076  for ac_prog in chmod
4077do
4078  # Extract the first word of "$ac_prog", so it can be a program name with args.
4079set dummy $ac_prog; ac_word=$2
4080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4081$as_echo_n "checking for $ac_word... " >&6; }
4082if ${ac_cv_path_CHMOD+:} false; then :
4083  $as_echo_n "(cached) " >&6
4084else
4085  case $CHMOD in
4086  [\\/]* | ?:[\\/]*)
4087  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4088  ;;
4089  *)
4090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4091for as_dir in $PATH
4092do
4093  IFS=$as_save_IFS
4094  test -z "$as_dir" && as_dir=.
4095    for ac_exec_ext in '' $ac_executable_extensions; do
4096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4097    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4099    break 2
4100  fi
4101done
4102  done
4103IFS=$as_save_IFS
4104
4105  ;;
4106esac
4107fi
4108CHMOD=$ac_cv_path_CHMOD
4109if test -n "$CHMOD"; then
4110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4111$as_echo "$CHMOD" >&6; }
4112else
4113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4114$as_echo "no" >&6; }
4115fi
4116
4117
4118  test -n "$CHMOD" && break
4119done
4120
4121
4122  if test "x$CHMOD" = x; then
4123    if test "xchmod" = x; then
4124      PROG_NAME=chmod
4125    else
4126      PROG_NAME=chmod
4127    fi
4128    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4129$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4130    as_fn_error $? "Cannot continue" "$LINENO" 5
4131  fi
4132
4133
4134
4135  for ac_prog in cmp
4136do
4137  # Extract the first word of "$ac_prog", so it can be a program name with args.
4138set dummy $ac_prog; ac_word=$2
4139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4140$as_echo_n "checking for $ac_word... " >&6; }
4141if ${ac_cv_path_CMP+:} false; then :
4142  $as_echo_n "(cached) " >&6
4143else
4144  case $CMP in
4145  [\\/]* | ?:[\\/]*)
4146  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4147  ;;
4148  *)
4149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4150for as_dir in $PATH
4151do
4152  IFS=$as_save_IFS
4153  test -z "$as_dir" && as_dir=.
4154    for ac_exec_ext in '' $ac_executable_extensions; do
4155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4156    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4158    break 2
4159  fi
4160done
4161  done
4162IFS=$as_save_IFS
4163
4164  ;;
4165esac
4166fi
4167CMP=$ac_cv_path_CMP
4168if test -n "$CMP"; then
4169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4170$as_echo "$CMP" >&6; }
4171else
4172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4173$as_echo "no" >&6; }
4174fi
4175
4176
4177  test -n "$CMP" && break
4178done
4179
4180
4181  if test "x$CMP" = x; then
4182    if test "xcmp" = x; then
4183      PROG_NAME=cmp
4184    else
4185      PROG_NAME=cmp
4186    fi
4187    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4188$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4189    as_fn_error $? "Cannot continue" "$LINENO" 5
4190  fi
4191
4192
4193
4194  for ac_prog in comm
4195do
4196  # Extract the first word of "$ac_prog", so it can be a program name with args.
4197set dummy $ac_prog; ac_word=$2
4198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4199$as_echo_n "checking for $ac_word... " >&6; }
4200if ${ac_cv_path_COMM+:} false; then :
4201  $as_echo_n "(cached) " >&6
4202else
4203  case $COMM in
4204  [\\/]* | ?:[\\/]*)
4205  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4206  ;;
4207  *)
4208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4209for as_dir in $PATH
4210do
4211  IFS=$as_save_IFS
4212  test -z "$as_dir" && as_dir=.
4213    for ac_exec_ext in '' $ac_executable_extensions; do
4214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4215    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4217    break 2
4218  fi
4219done
4220  done
4221IFS=$as_save_IFS
4222
4223  ;;
4224esac
4225fi
4226COMM=$ac_cv_path_COMM
4227if test -n "$COMM"; then
4228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4229$as_echo "$COMM" >&6; }
4230else
4231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4232$as_echo "no" >&6; }
4233fi
4234
4235
4236  test -n "$COMM" && break
4237done
4238
4239
4240  if test "x$COMM" = x; then
4241    if test "xcomm" = x; then
4242      PROG_NAME=comm
4243    else
4244      PROG_NAME=comm
4245    fi
4246    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4247$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4248    as_fn_error $? "Cannot continue" "$LINENO" 5
4249  fi
4250
4251
4252
4253  for ac_prog in cp
4254do
4255  # Extract the first word of "$ac_prog", so it can be a program name with args.
4256set dummy $ac_prog; ac_word=$2
4257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4258$as_echo_n "checking for $ac_word... " >&6; }
4259if ${ac_cv_path_CP+:} false; then :
4260  $as_echo_n "(cached) " >&6
4261else
4262  case $CP in
4263  [\\/]* | ?:[\\/]*)
4264  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4265  ;;
4266  *)
4267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4268for as_dir in $PATH
4269do
4270  IFS=$as_save_IFS
4271  test -z "$as_dir" && as_dir=.
4272    for ac_exec_ext in '' $ac_executable_extensions; do
4273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4274    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4276    break 2
4277  fi
4278done
4279  done
4280IFS=$as_save_IFS
4281
4282  ;;
4283esac
4284fi
4285CP=$ac_cv_path_CP
4286if test -n "$CP"; then
4287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4288$as_echo "$CP" >&6; }
4289else
4290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4291$as_echo "no" >&6; }
4292fi
4293
4294
4295  test -n "$CP" && break
4296done
4297
4298
4299  if test "x$CP" = x; then
4300    if test "xcp" = x; then
4301      PROG_NAME=cp
4302    else
4303      PROG_NAME=cp
4304    fi
4305    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4306$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4307    as_fn_error $? "Cannot continue" "$LINENO" 5
4308  fi
4309
4310
4311
4312  for ac_prog in cpio
4313do
4314  # Extract the first word of "$ac_prog", so it can be a program name with args.
4315set dummy $ac_prog; ac_word=$2
4316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4317$as_echo_n "checking for $ac_word... " >&6; }
4318if ${ac_cv_path_CPIO+:} false; then :
4319  $as_echo_n "(cached) " >&6
4320else
4321  case $CPIO in
4322  [\\/]* | ?:[\\/]*)
4323  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4324  ;;
4325  *)
4326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4327for as_dir in $PATH
4328do
4329  IFS=$as_save_IFS
4330  test -z "$as_dir" && as_dir=.
4331    for ac_exec_ext in '' $ac_executable_extensions; do
4332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4333    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4335    break 2
4336  fi
4337done
4338  done
4339IFS=$as_save_IFS
4340
4341  ;;
4342esac
4343fi
4344CPIO=$ac_cv_path_CPIO
4345if test -n "$CPIO"; then
4346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4347$as_echo "$CPIO" >&6; }
4348else
4349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4350$as_echo "no" >&6; }
4351fi
4352
4353
4354  test -n "$CPIO" && break
4355done
4356
4357
4358  if test "x$CPIO" = x; then
4359    if test "xcpio" = x; then
4360      PROG_NAME=cpio
4361    else
4362      PROG_NAME=cpio
4363    fi
4364    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4365$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4366    as_fn_error $? "Cannot continue" "$LINENO" 5
4367  fi
4368
4369
4370
4371  for ac_prog in cut
4372do
4373  # Extract the first word of "$ac_prog", so it can be a program name with args.
4374set dummy $ac_prog; ac_word=$2
4375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4376$as_echo_n "checking for $ac_word... " >&6; }
4377if ${ac_cv_path_CUT+:} false; then :
4378  $as_echo_n "(cached) " >&6
4379else
4380  case $CUT in
4381  [\\/]* | ?:[\\/]*)
4382  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4383  ;;
4384  *)
4385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4386for as_dir in $PATH
4387do
4388  IFS=$as_save_IFS
4389  test -z "$as_dir" && as_dir=.
4390    for ac_exec_ext in '' $ac_executable_extensions; do
4391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4392    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4394    break 2
4395  fi
4396done
4397  done
4398IFS=$as_save_IFS
4399
4400  ;;
4401esac
4402fi
4403CUT=$ac_cv_path_CUT
4404if test -n "$CUT"; then
4405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4406$as_echo "$CUT" >&6; }
4407else
4408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4409$as_echo "no" >&6; }
4410fi
4411
4412
4413  test -n "$CUT" && break
4414done
4415
4416
4417  if test "x$CUT" = x; then
4418    if test "xcut" = x; then
4419      PROG_NAME=cut
4420    else
4421      PROG_NAME=cut
4422    fi
4423    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4424$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4425    as_fn_error $? "Cannot continue" "$LINENO" 5
4426  fi
4427
4428
4429
4430  for ac_prog in date
4431do
4432  # Extract the first word of "$ac_prog", so it can be a program name with args.
4433set dummy $ac_prog; ac_word=$2
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4435$as_echo_n "checking for $ac_word... " >&6; }
4436if ${ac_cv_path_DATE+:} false; then :
4437  $as_echo_n "(cached) " >&6
4438else
4439  case $DATE in
4440  [\\/]* | ?:[\\/]*)
4441  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4442  ;;
4443  *)
4444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4445for as_dir in $PATH
4446do
4447  IFS=$as_save_IFS
4448  test -z "$as_dir" && as_dir=.
4449    for ac_exec_ext in '' $ac_executable_extensions; do
4450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4451    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4453    break 2
4454  fi
4455done
4456  done
4457IFS=$as_save_IFS
4458
4459  ;;
4460esac
4461fi
4462DATE=$ac_cv_path_DATE
4463if test -n "$DATE"; then
4464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4465$as_echo "$DATE" >&6; }
4466else
4467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4468$as_echo "no" >&6; }
4469fi
4470
4471
4472  test -n "$DATE" && break
4473done
4474
4475
4476  if test "x$DATE" = x; then
4477    if test "xdate" = x; then
4478      PROG_NAME=date
4479    else
4480      PROG_NAME=date
4481    fi
4482    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4483$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4484    as_fn_error $? "Cannot continue" "$LINENO" 5
4485  fi
4486
4487
4488
4489  for ac_prog in gdiff diff
4490do
4491  # Extract the first word of "$ac_prog", so it can be a program name with args.
4492set dummy $ac_prog; ac_word=$2
4493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4494$as_echo_n "checking for $ac_word... " >&6; }
4495if ${ac_cv_path_DIFF+:} false; then :
4496  $as_echo_n "(cached) " >&6
4497else
4498  case $DIFF in
4499  [\\/]* | ?:[\\/]*)
4500  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4501  ;;
4502  *)
4503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4504for as_dir in $PATH
4505do
4506  IFS=$as_save_IFS
4507  test -z "$as_dir" && as_dir=.
4508    for ac_exec_ext in '' $ac_executable_extensions; do
4509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4510    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4512    break 2
4513  fi
4514done
4515  done
4516IFS=$as_save_IFS
4517
4518  ;;
4519esac
4520fi
4521DIFF=$ac_cv_path_DIFF
4522if test -n "$DIFF"; then
4523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4524$as_echo "$DIFF" >&6; }
4525else
4526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4527$as_echo "no" >&6; }
4528fi
4529
4530
4531  test -n "$DIFF" && break
4532done
4533
4534
4535  if test "x$DIFF" = x; then
4536    if test "xgdiff diff" = x; then
4537      PROG_NAME=diff
4538    else
4539      PROG_NAME=gdiff diff
4540    fi
4541    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4542$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4543    as_fn_error $? "Cannot continue" "$LINENO" 5
4544  fi
4545
4546
4547
4548  for ac_prog in dirname
4549do
4550  # Extract the first word of "$ac_prog", so it can be a program name with args.
4551set dummy $ac_prog; ac_word=$2
4552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4553$as_echo_n "checking for $ac_word... " >&6; }
4554if ${ac_cv_path_DIRNAME+:} false; then :
4555  $as_echo_n "(cached) " >&6
4556else
4557  case $DIRNAME in
4558  [\\/]* | ?:[\\/]*)
4559  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4560  ;;
4561  *)
4562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4563for as_dir in $PATH
4564do
4565  IFS=$as_save_IFS
4566  test -z "$as_dir" && as_dir=.
4567    for ac_exec_ext in '' $ac_executable_extensions; do
4568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4569    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4571    break 2
4572  fi
4573done
4574  done
4575IFS=$as_save_IFS
4576
4577  ;;
4578esac
4579fi
4580DIRNAME=$ac_cv_path_DIRNAME
4581if test -n "$DIRNAME"; then
4582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4583$as_echo "$DIRNAME" >&6; }
4584else
4585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4586$as_echo "no" >&6; }
4587fi
4588
4589
4590  test -n "$DIRNAME" && break
4591done
4592
4593
4594  if test "x$DIRNAME" = x; then
4595    if test "xdirname" = x; then
4596      PROG_NAME=dirname
4597    else
4598      PROG_NAME=dirname
4599    fi
4600    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4601$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4602    as_fn_error $? "Cannot continue" "$LINENO" 5
4603  fi
4604
4605
4606
4607  for ac_prog in echo
4608do
4609  # Extract the first word of "$ac_prog", so it can be a program name with args.
4610set dummy $ac_prog; ac_word=$2
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612$as_echo_n "checking for $ac_word... " >&6; }
4613if ${ac_cv_path_ECHO+:} false; then :
4614  $as_echo_n "(cached) " >&6
4615else
4616  case $ECHO in
4617  [\\/]* | ?:[\\/]*)
4618  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4619  ;;
4620  *)
4621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622for as_dir in $PATH
4623do
4624  IFS=$as_save_IFS
4625  test -z "$as_dir" && as_dir=.
4626    for ac_exec_ext in '' $ac_executable_extensions; do
4627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4628    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630    break 2
4631  fi
4632done
4633  done
4634IFS=$as_save_IFS
4635
4636  ;;
4637esac
4638fi
4639ECHO=$ac_cv_path_ECHO
4640if test -n "$ECHO"; then
4641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4642$as_echo "$ECHO" >&6; }
4643else
4644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4645$as_echo "no" >&6; }
4646fi
4647
4648
4649  test -n "$ECHO" && break
4650done
4651
4652
4653  if test "x$ECHO" = x; then
4654    if test "xecho" = x; then
4655      PROG_NAME=echo
4656    else
4657      PROG_NAME=echo
4658    fi
4659    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4660$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4661    as_fn_error $? "Cannot continue" "$LINENO" 5
4662  fi
4663
4664
4665
4666  for ac_prog in expr
4667do
4668  # Extract the first word of "$ac_prog", so it can be a program name with args.
4669set dummy $ac_prog; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_EXPR+:} false; then :
4673  $as_echo_n "(cached) " >&6
4674else
4675  case $EXPR in
4676  [\\/]* | ?:[\\/]*)
4677  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4678  ;;
4679  *)
4680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in $PATH
4682do
4683  IFS=$as_save_IFS
4684  test -z "$as_dir" && as_dir=.
4685    for ac_exec_ext in '' $ac_executable_extensions; do
4686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4687    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689    break 2
4690  fi
4691done
4692  done
4693IFS=$as_save_IFS
4694
4695  ;;
4696esac
4697fi
4698EXPR=$ac_cv_path_EXPR
4699if test -n "$EXPR"; then
4700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4701$as_echo "$EXPR" >&6; }
4702else
4703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707
4708  test -n "$EXPR" && break
4709done
4710
4711
4712  if test "x$EXPR" = x; then
4713    if test "xexpr" = x; then
4714      PROG_NAME=expr
4715    else
4716      PROG_NAME=expr
4717    fi
4718    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4719$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4720    as_fn_error $? "Cannot continue" "$LINENO" 5
4721  fi
4722
4723
4724
4725  for ac_prog in file
4726do
4727  # Extract the first word of "$ac_prog", so it can be a program name with args.
4728set dummy $ac_prog; ac_word=$2
4729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4730$as_echo_n "checking for $ac_word... " >&6; }
4731if ${ac_cv_path_FILE+:} false; then :
4732  $as_echo_n "(cached) " >&6
4733else
4734  case $FILE in
4735  [\\/]* | ?:[\\/]*)
4736  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4737  ;;
4738  *)
4739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4740for as_dir in $PATH
4741do
4742  IFS=$as_save_IFS
4743  test -z "$as_dir" && as_dir=.
4744    for ac_exec_ext in '' $ac_executable_extensions; do
4745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4746    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4748    break 2
4749  fi
4750done
4751  done
4752IFS=$as_save_IFS
4753
4754  ;;
4755esac
4756fi
4757FILE=$ac_cv_path_FILE
4758if test -n "$FILE"; then
4759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4760$as_echo "$FILE" >&6; }
4761else
4762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
4764fi
4765
4766
4767  test -n "$FILE" && break
4768done
4769
4770
4771  if test "x$FILE" = x; then
4772    if test "xfile" = x; then
4773      PROG_NAME=file
4774    else
4775      PROG_NAME=file
4776    fi
4777    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4778$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4779    as_fn_error $? "Cannot continue" "$LINENO" 5
4780  fi
4781
4782
4783
4784  for ac_prog in find
4785do
4786  # Extract the first word of "$ac_prog", so it can be a program name with args.
4787set dummy $ac_prog; ac_word=$2
4788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
4790if ${ac_cv_path_FIND+:} false; then :
4791  $as_echo_n "(cached) " >&6
4792else
4793  case $FIND in
4794  [\\/]* | ?:[\\/]*)
4795  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4796  ;;
4797  *)
4798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in $PATH
4800do
4801  IFS=$as_save_IFS
4802  test -z "$as_dir" && as_dir=.
4803    for ac_exec_ext in '' $ac_executable_extensions; do
4804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4805    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4807    break 2
4808  fi
4809done
4810  done
4811IFS=$as_save_IFS
4812
4813  ;;
4814esac
4815fi
4816FIND=$ac_cv_path_FIND
4817if test -n "$FIND"; then
4818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4819$as_echo "$FIND" >&6; }
4820else
4821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4822$as_echo "no" >&6; }
4823fi
4824
4825
4826  test -n "$FIND" && break
4827done
4828
4829
4830  if test "x$FIND" = x; then
4831    if test "xfind" = x; then
4832      PROG_NAME=find
4833    else
4834      PROG_NAME=find
4835    fi
4836    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4837$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4838    as_fn_error $? "Cannot continue" "$LINENO" 5
4839  fi
4840
4841
4842
4843  for ac_prog in head
4844do
4845  # Extract the first word of "$ac_prog", so it can be a program name with args.
4846set dummy $ac_prog; ac_word=$2
4847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4848$as_echo_n "checking for $ac_word... " >&6; }
4849if ${ac_cv_path_HEAD+:} false; then :
4850  $as_echo_n "(cached) " >&6
4851else
4852  case $HEAD in
4853  [\\/]* | ?:[\\/]*)
4854  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4855  ;;
4856  *)
4857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4858for as_dir in $PATH
4859do
4860  IFS=$as_save_IFS
4861  test -z "$as_dir" && as_dir=.
4862    for ac_exec_ext in '' $ac_executable_extensions; do
4863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4864    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4866    break 2
4867  fi
4868done
4869  done
4870IFS=$as_save_IFS
4871
4872  ;;
4873esac
4874fi
4875HEAD=$ac_cv_path_HEAD
4876if test -n "$HEAD"; then
4877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4878$as_echo "$HEAD" >&6; }
4879else
4880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4881$as_echo "no" >&6; }
4882fi
4883
4884
4885  test -n "$HEAD" && break
4886done
4887
4888
4889  if test "x$HEAD" = x; then
4890    if test "xhead" = x; then
4891      PROG_NAME=head
4892    else
4893      PROG_NAME=head
4894    fi
4895    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4896$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4897    as_fn_error $? "Cannot continue" "$LINENO" 5
4898  fi
4899
4900
4901
4902  for ac_prog in ln
4903do
4904  # Extract the first word of "$ac_prog", so it can be a program name with args.
4905set dummy $ac_prog; ac_word=$2
4906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4907$as_echo_n "checking for $ac_word... " >&6; }
4908if ${ac_cv_path_LN+:} false; then :
4909  $as_echo_n "(cached) " >&6
4910else
4911  case $LN in
4912  [\\/]* | ?:[\\/]*)
4913  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4914  ;;
4915  *)
4916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4917for as_dir in $PATH
4918do
4919  IFS=$as_save_IFS
4920  test -z "$as_dir" && as_dir=.
4921    for ac_exec_ext in '' $ac_executable_extensions; do
4922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4923    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4925    break 2
4926  fi
4927done
4928  done
4929IFS=$as_save_IFS
4930
4931  ;;
4932esac
4933fi
4934LN=$ac_cv_path_LN
4935if test -n "$LN"; then
4936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4937$as_echo "$LN" >&6; }
4938else
4939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4940$as_echo "no" >&6; }
4941fi
4942
4943
4944  test -n "$LN" && break
4945done
4946
4947
4948  if test "x$LN" = x; then
4949    if test "xln" = x; then
4950      PROG_NAME=ln
4951    else
4952      PROG_NAME=ln
4953    fi
4954    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4955$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4956    as_fn_error $? "Cannot continue" "$LINENO" 5
4957  fi
4958
4959
4960
4961  for ac_prog in ls
4962do
4963  # Extract the first word of "$ac_prog", so it can be a program name with args.
4964set dummy $ac_prog; ac_word=$2
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
4967if ${ac_cv_path_LS+:} false; then :
4968  $as_echo_n "(cached) " >&6
4969else
4970  case $LS in
4971  [\\/]* | ?:[\\/]*)
4972  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4973  ;;
4974  *)
4975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in $PATH
4977do
4978  IFS=$as_save_IFS
4979  test -z "$as_dir" && as_dir=.
4980    for ac_exec_ext in '' $ac_executable_extensions; do
4981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4982    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4984    break 2
4985  fi
4986done
4987  done
4988IFS=$as_save_IFS
4989
4990  ;;
4991esac
4992fi
4993LS=$ac_cv_path_LS
4994if test -n "$LS"; then
4995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4996$as_echo "$LS" >&6; }
4997else
4998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999$as_echo "no" >&6; }
5000fi
5001
5002
5003  test -n "$LS" && break
5004done
5005
5006
5007  if test "x$LS" = x; then
5008    if test "xls" = x; then
5009      PROG_NAME=ls
5010    else
5011      PROG_NAME=ls
5012    fi
5013    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5014$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5015    as_fn_error $? "Cannot continue" "$LINENO" 5
5016  fi
5017
5018
5019
5020  for ac_prog in mkdir
5021do
5022  # Extract the first word of "$ac_prog", so it can be a program name with args.
5023set dummy $ac_prog; ac_word=$2
5024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5025$as_echo_n "checking for $ac_word... " >&6; }
5026if ${ac_cv_path_MKDIR+:} false; then :
5027  $as_echo_n "(cached) " >&6
5028else
5029  case $MKDIR in
5030  [\\/]* | ?:[\\/]*)
5031  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5032  ;;
5033  *)
5034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5035for as_dir in $PATH
5036do
5037  IFS=$as_save_IFS
5038  test -z "$as_dir" && as_dir=.
5039    for ac_exec_ext in '' $ac_executable_extensions; do
5040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5041    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5043    break 2
5044  fi
5045done
5046  done
5047IFS=$as_save_IFS
5048
5049  ;;
5050esac
5051fi
5052MKDIR=$ac_cv_path_MKDIR
5053if test -n "$MKDIR"; then
5054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5055$as_echo "$MKDIR" >&6; }
5056else
5057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5058$as_echo "no" >&6; }
5059fi
5060
5061
5062  test -n "$MKDIR" && break
5063done
5064
5065
5066  if test "x$MKDIR" = x; then
5067    if test "xmkdir" = x; then
5068      PROG_NAME=mkdir
5069    else
5070      PROG_NAME=mkdir
5071    fi
5072    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5073$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5074    as_fn_error $? "Cannot continue" "$LINENO" 5
5075  fi
5076
5077
5078
5079  for ac_prog in mktemp
5080do
5081  # Extract the first word of "$ac_prog", so it can be a program name with args.
5082set dummy $ac_prog; ac_word=$2
5083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
5085if ${ac_cv_path_MKTEMP+:} false; then :
5086  $as_echo_n "(cached) " >&6
5087else
5088  case $MKTEMP in
5089  [\\/]* | ?:[\\/]*)
5090  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5091  ;;
5092  *)
5093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096  IFS=$as_save_IFS
5097  test -z "$as_dir" && as_dir=.
5098    for ac_exec_ext in '' $ac_executable_extensions; do
5099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5100    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5102    break 2
5103  fi
5104done
5105  done
5106IFS=$as_save_IFS
5107
5108  ;;
5109esac
5110fi
5111MKTEMP=$ac_cv_path_MKTEMP
5112if test -n "$MKTEMP"; then
5113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5114$as_echo "$MKTEMP" >&6; }
5115else
5116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117$as_echo "no" >&6; }
5118fi
5119
5120
5121  test -n "$MKTEMP" && break
5122done
5123
5124
5125  if test "x$MKTEMP" = x; then
5126    if test "xmktemp" = x; then
5127      PROG_NAME=mktemp
5128    else
5129      PROG_NAME=mktemp
5130    fi
5131    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5132$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5133    as_fn_error $? "Cannot continue" "$LINENO" 5
5134  fi
5135
5136
5137
5138  for ac_prog in mv
5139do
5140  # Extract the first word of "$ac_prog", so it can be a program name with args.
5141set dummy $ac_prog; ac_word=$2
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143$as_echo_n "checking for $ac_word... " >&6; }
5144if ${ac_cv_path_MV+:} false; then :
5145  $as_echo_n "(cached) " >&6
5146else
5147  case $MV in
5148  [\\/]* | ?:[\\/]*)
5149  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5150  ;;
5151  *)
5152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153for as_dir in $PATH
5154do
5155  IFS=$as_save_IFS
5156  test -z "$as_dir" && as_dir=.
5157    for ac_exec_ext in '' $ac_executable_extensions; do
5158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5159    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5161    break 2
5162  fi
5163done
5164  done
5165IFS=$as_save_IFS
5166
5167  ;;
5168esac
5169fi
5170MV=$ac_cv_path_MV
5171if test -n "$MV"; then
5172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5173$as_echo "$MV" >&6; }
5174else
5175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5176$as_echo "no" >&6; }
5177fi
5178
5179
5180  test -n "$MV" && break
5181done
5182
5183
5184  if test "x$MV" = x; then
5185    if test "xmv" = x; then
5186      PROG_NAME=mv
5187    else
5188      PROG_NAME=mv
5189    fi
5190    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5191$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5192    as_fn_error $? "Cannot continue" "$LINENO" 5
5193  fi
5194
5195
5196
5197  for ac_prog in printf
5198do
5199  # Extract the first word of "$ac_prog", so it can be a program name with args.
5200set dummy $ac_prog; ac_word=$2
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202$as_echo_n "checking for $ac_word... " >&6; }
5203if ${ac_cv_path_PRINTF+:} false; then :
5204  $as_echo_n "(cached) " >&6
5205else
5206  case $PRINTF in
5207  [\\/]* | ?:[\\/]*)
5208  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5209  ;;
5210  *)
5211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214  IFS=$as_save_IFS
5215  test -z "$as_dir" && as_dir=.
5216    for ac_exec_ext in '' $ac_executable_extensions; do
5217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220    break 2
5221  fi
5222done
5223  done
5224IFS=$as_save_IFS
5225
5226  ;;
5227esac
5228fi
5229PRINTF=$ac_cv_path_PRINTF
5230if test -n "$PRINTF"; then
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5232$as_echo "$PRINTF" >&6; }
5233else
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239  test -n "$PRINTF" && break
5240done
5241
5242
5243  if test "x$PRINTF" = x; then
5244    if test "xprintf" = x; then
5245      PROG_NAME=printf
5246    else
5247      PROG_NAME=printf
5248    fi
5249    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5250$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5251    as_fn_error $? "Cannot continue" "$LINENO" 5
5252  fi
5253
5254
5255
5256  for ac_prog in rm
5257do
5258  # Extract the first word of "$ac_prog", so it can be a program name with args.
5259set dummy $ac_prog; ac_word=$2
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261$as_echo_n "checking for $ac_word... " >&6; }
5262if ${ac_cv_path_RM+:} false; then :
5263  $as_echo_n "(cached) " >&6
5264else
5265  case $RM in
5266  [\\/]* | ?:[\\/]*)
5267  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5268  ;;
5269  *)
5270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273  IFS=$as_save_IFS
5274  test -z "$as_dir" && as_dir=.
5275    for ac_exec_ext in '' $ac_executable_extensions; do
5276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5277    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5279    break 2
5280  fi
5281done
5282  done
5283IFS=$as_save_IFS
5284
5285  ;;
5286esac
5287fi
5288RM=$ac_cv_path_RM
5289if test -n "$RM"; then
5290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5291$as_echo "$RM" >&6; }
5292else
5293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294$as_echo "no" >&6; }
5295fi
5296
5297
5298  test -n "$RM" && break
5299done
5300
5301
5302  if test "x$RM" = x; then
5303    if test "xrm" = x; then
5304      PROG_NAME=rm
5305    else
5306      PROG_NAME=rm
5307    fi
5308    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5309$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5310    as_fn_error $? "Cannot continue" "$LINENO" 5
5311  fi
5312
5313
5314
5315  for ac_prog in sh
5316do
5317  # Extract the first word of "$ac_prog", so it can be a program name with args.
5318set dummy $ac_prog; ac_word=$2
5319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320$as_echo_n "checking for $ac_word... " >&6; }
5321if ${ac_cv_path_SH+:} false; then :
5322  $as_echo_n "(cached) " >&6
5323else
5324  case $SH in
5325  [\\/]* | ?:[\\/]*)
5326  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5327  ;;
5328  *)
5329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5330for as_dir in $PATH
5331do
5332  IFS=$as_save_IFS
5333  test -z "$as_dir" && as_dir=.
5334    for ac_exec_ext in '' $ac_executable_extensions; do
5335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5336    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5338    break 2
5339  fi
5340done
5341  done
5342IFS=$as_save_IFS
5343
5344  ;;
5345esac
5346fi
5347SH=$ac_cv_path_SH
5348if test -n "$SH"; then
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5350$as_echo "$SH" >&6; }
5351else
5352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353$as_echo "no" >&6; }
5354fi
5355
5356
5357  test -n "$SH" && break
5358done
5359
5360
5361  if test "x$SH" = x; then
5362    if test "xsh" = x; then
5363      PROG_NAME=sh
5364    else
5365      PROG_NAME=sh
5366    fi
5367    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5368$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5369    as_fn_error $? "Cannot continue" "$LINENO" 5
5370  fi
5371
5372
5373
5374  for ac_prog in sort
5375do
5376  # Extract the first word of "$ac_prog", so it can be a program name with args.
5377set dummy $ac_prog; ac_word=$2
5378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5379$as_echo_n "checking for $ac_word... " >&6; }
5380if ${ac_cv_path_SORT+:} false; then :
5381  $as_echo_n "(cached) " >&6
5382else
5383  case $SORT in
5384  [\\/]* | ?:[\\/]*)
5385  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5386  ;;
5387  *)
5388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5389for as_dir in $PATH
5390do
5391  IFS=$as_save_IFS
5392  test -z "$as_dir" && as_dir=.
5393    for ac_exec_ext in '' $ac_executable_extensions; do
5394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5395    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5397    break 2
5398  fi
5399done
5400  done
5401IFS=$as_save_IFS
5402
5403  ;;
5404esac
5405fi
5406SORT=$ac_cv_path_SORT
5407if test -n "$SORT"; then
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5409$as_echo "$SORT" >&6; }
5410else
5411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5412$as_echo "no" >&6; }
5413fi
5414
5415
5416  test -n "$SORT" && break
5417done
5418
5419
5420  if test "x$SORT" = x; then
5421    if test "xsort" = x; then
5422      PROG_NAME=sort
5423    else
5424      PROG_NAME=sort
5425    fi
5426    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5427$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5428    as_fn_error $? "Cannot continue" "$LINENO" 5
5429  fi
5430
5431
5432
5433  for ac_prog in tail
5434do
5435  # Extract the first word of "$ac_prog", so it can be a program name with args.
5436set dummy $ac_prog; ac_word=$2
5437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5438$as_echo_n "checking for $ac_word... " >&6; }
5439if ${ac_cv_path_TAIL+:} false; then :
5440  $as_echo_n "(cached) " >&6
5441else
5442  case $TAIL in
5443  [\\/]* | ?:[\\/]*)
5444  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5445  ;;
5446  *)
5447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5448for as_dir in $PATH
5449do
5450  IFS=$as_save_IFS
5451  test -z "$as_dir" && as_dir=.
5452    for ac_exec_ext in '' $ac_executable_extensions; do
5453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5454    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5456    break 2
5457  fi
5458done
5459  done
5460IFS=$as_save_IFS
5461
5462  ;;
5463esac
5464fi
5465TAIL=$ac_cv_path_TAIL
5466if test -n "$TAIL"; then
5467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5468$as_echo "$TAIL" >&6; }
5469else
5470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5471$as_echo "no" >&6; }
5472fi
5473
5474
5475  test -n "$TAIL" && break
5476done
5477
5478
5479  if test "x$TAIL" = x; then
5480    if test "xtail" = x; then
5481      PROG_NAME=tail
5482    else
5483      PROG_NAME=tail
5484    fi
5485    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5486$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5487    as_fn_error $? "Cannot continue" "$LINENO" 5
5488  fi
5489
5490
5491
5492  for ac_prog in tar
5493do
5494  # Extract the first word of "$ac_prog", so it can be a program name with args.
5495set dummy $ac_prog; ac_word=$2
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
5498if ${ac_cv_path_TAR+:} false; then :
5499  $as_echo_n "(cached) " >&6
5500else
5501  case $TAR in
5502  [\\/]* | ?:[\\/]*)
5503  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5504  ;;
5505  *)
5506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5507for as_dir in $PATH
5508do
5509  IFS=$as_save_IFS
5510  test -z "$as_dir" && as_dir=.
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5513    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521  ;;
5522esac
5523fi
5524TAR=$ac_cv_path_TAR
5525if test -n "$TAR"; then
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5527$as_echo "$TAR" >&6; }
5528else
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
5531fi
5532
5533
5534  test -n "$TAR" && break
5535done
5536
5537
5538  if test "x$TAR" = x; then
5539    if test "xtar" = x; then
5540      PROG_NAME=tar
5541    else
5542      PROG_NAME=tar
5543    fi
5544    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5545$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5546    as_fn_error $? "Cannot continue" "$LINENO" 5
5547  fi
5548
5549
5550
5551  for ac_prog in tee
5552do
5553  # Extract the first word of "$ac_prog", so it can be a program name with args.
5554set dummy $ac_prog; ac_word=$2
5555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5556$as_echo_n "checking for $ac_word... " >&6; }
5557if ${ac_cv_path_TEE+:} false; then :
5558  $as_echo_n "(cached) " >&6
5559else
5560  case $TEE in
5561  [\\/]* | ?:[\\/]*)
5562  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5563  ;;
5564  *)
5565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5566for as_dir in $PATH
5567do
5568  IFS=$as_save_IFS
5569  test -z "$as_dir" && as_dir=.
5570    for ac_exec_ext in '' $ac_executable_extensions; do
5571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5572    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5574    break 2
5575  fi
5576done
5577  done
5578IFS=$as_save_IFS
5579
5580  ;;
5581esac
5582fi
5583TEE=$ac_cv_path_TEE
5584if test -n "$TEE"; then
5585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5586$as_echo "$TEE" >&6; }
5587else
5588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5589$as_echo "no" >&6; }
5590fi
5591
5592
5593  test -n "$TEE" && break
5594done
5595
5596
5597  if test "x$TEE" = x; then
5598    if test "xtee" = x; then
5599      PROG_NAME=tee
5600    else
5601      PROG_NAME=tee
5602    fi
5603    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5604$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5605    as_fn_error $? "Cannot continue" "$LINENO" 5
5606  fi
5607
5608
5609
5610  for ac_prog in touch
5611do
5612  # Extract the first word of "$ac_prog", so it can be a program name with args.
5613set dummy $ac_prog; ac_word=$2
5614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5615$as_echo_n "checking for $ac_word... " >&6; }
5616if ${ac_cv_path_TOUCH+:} false; then :
5617  $as_echo_n "(cached) " >&6
5618else
5619  case $TOUCH in
5620  [\\/]* | ?:[\\/]*)
5621  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5622  ;;
5623  *)
5624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5625for as_dir in $PATH
5626do
5627  IFS=$as_save_IFS
5628  test -z "$as_dir" && as_dir=.
5629    for ac_exec_ext in '' $ac_executable_extensions; do
5630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5631    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5633    break 2
5634  fi
5635done
5636  done
5637IFS=$as_save_IFS
5638
5639  ;;
5640esac
5641fi
5642TOUCH=$ac_cv_path_TOUCH
5643if test -n "$TOUCH"; then
5644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5645$as_echo "$TOUCH" >&6; }
5646else
5647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5648$as_echo "no" >&6; }
5649fi
5650
5651
5652  test -n "$TOUCH" && break
5653done
5654
5655
5656  if test "x$TOUCH" = x; then
5657    if test "xtouch" = x; then
5658      PROG_NAME=touch
5659    else
5660      PROG_NAME=touch
5661    fi
5662    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5663$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5664    as_fn_error $? "Cannot continue" "$LINENO" 5
5665  fi
5666
5667
5668
5669  for ac_prog in tr
5670do
5671  # Extract the first word of "$ac_prog", so it can be a program name with args.
5672set dummy $ac_prog; ac_word=$2
5673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5674$as_echo_n "checking for $ac_word... " >&6; }
5675if ${ac_cv_path_TR+:} false; then :
5676  $as_echo_n "(cached) " >&6
5677else
5678  case $TR in
5679  [\\/]* | ?:[\\/]*)
5680  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5681  ;;
5682  *)
5683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5684for as_dir in $PATH
5685do
5686  IFS=$as_save_IFS
5687  test -z "$as_dir" && as_dir=.
5688    for ac_exec_ext in '' $ac_executable_extensions; do
5689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5690    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5692    break 2
5693  fi
5694done
5695  done
5696IFS=$as_save_IFS
5697
5698  ;;
5699esac
5700fi
5701TR=$ac_cv_path_TR
5702if test -n "$TR"; then
5703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5704$as_echo "$TR" >&6; }
5705else
5706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5707$as_echo "no" >&6; }
5708fi
5709
5710
5711  test -n "$TR" && break
5712done
5713
5714
5715  if test "x$TR" = x; then
5716    if test "xtr" = x; then
5717      PROG_NAME=tr
5718    else
5719      PROG_NAME=tr
5720    fi
5721    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5722$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5723    as_fn_error $? "Cannot continue" "$LINENO" 5
5724  fi
5725
5726
5727
5728  for ac_prog in uname
5729do
5730  # Extract the first word of "$ac_prog", so it can be a program name with args.
5731set dummy $ac_prog; ac_word=$2
5732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5733$as_echo_n "checking for $ac_word... " >&6; }
5734if ${ac_cv_path_UNAME+:} false; then :
5735  $as_echo_n "(cached) " >&6
5736else
5737  case $UNAME in
5738  [\\/]* | ?:[\\/]*)
5739  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5740  ;;
5741  *)
5742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745  IFS=$as_save_IFS
5746  test -z "$as_dir" && as_dir=.
5747    for ac_exec_ext in '' $ac_executable_extensions; do
5748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5749    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5751    break 2
5752  fi
5753done
5754  done
5755IFS=$as_save_IFS
5756
5757  ;;
5758esac
5759fi
5760UNAME=$ac_cv_path_UNAME
5761if test -n "$UNAME"; then
5762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5763$as_echo "$UNAME" >&6; }
5764else
5765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5766$as_echo "no" >&6; }
5767fi
5768
5769
5770  test -n "$UNAME" && break
5771done
5772
5773
5774  if test "x$UNAME" = x; then
5775    if test "xuname" = x; then
5776      PROG_NAME=uname
5777    else
5778      PROG_NAME=uname
5779    fi
5780    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5781$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5782    as_fn_error $? "Cannot continue" "$LINENO" 5
5783  fi
5784
5785
5786
5787  for ac_prog in uniq
5788do
5789  # Extract the first word of "$ac_prog", so it can be a program name with args.
5790set dummy $ac_prog; ac_word=$2
5791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5792$as_echo_n "checking for $ac_word... " >&6; }
5793if ${ac_cv_path_UNIQ+:} false; then :
5794  $as_echo_n "(cached) " >&6
5795else
5796  case $UNIQ in
5797  [\\/]* | ?:[\\/]*)
5798  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5799  ;;
5800  *)
5801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5802for as_dir in $PATH
5803do
5804  IFS=$as_save_IFS
5805  test -z "$as_dir" && as_dir=.
5806    for ac_exec_ext in '' $ac_executable_extensions; do
5807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5808    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5810    break 2
5811  fi
5812done
5813  done
5814IFS=$as_save_IFS
5815
5816  ;;
5817esac
5818fi
5819UNIQ=$ac_cv_path_UNIQ
5820if test -n "$UNIQ"; then
5821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5822$as_echo "$UNIQ" >&6; }
5823else
5824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5825$as_echo "no" >&6; }
5826fi
5827
5828
5829  test -n "$UNIQ" && break
5830done
5831
5832
5833  if test "x$UNIQ" = x; then
5834    if test "xuniq" = x; then
5835      PROG_NAME=uniq
5836    else
5837      PROG_NAME=uniq
5838    fi
5839    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5840$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5841    as_fn_error $? "Cannot continue" "$LINENO" 5
5842  fi
5843
5844
5845
5846  for ac_prog in wc
5847do
5848  # Extract the first word of "$ac_prog", so it can be a program name with args.
5849set dummy $ac_prog; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_path_WC+:} false; then :
5853  $as_echo_n "(cached) " >&6
5854else
5855  case $WC in
5856  [\\/]* | ?:[\\/]*)
5857  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5858  ;;
5859  *)
5860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861for as_dir in $PATH
5862do
5863  IFS=$as_save_IFS
5864  test -z "$as_dir" && as_dir=.
5865    for ac_exec_ext in '' $ac_executable_extensions; do
5866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5867    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869    break 2
5870  fi
5871done
5872  done
5873IFS=$as_save_IFS
5874
5875  ;;
5876esac
5877fi
5878WC=$ac_cv_path_WC
5879if test -n "$WC"; then
5880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5881$as_echo "$WC" >&6; }
5882else
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5884$as_echo "no" >&6; }
5885fi
5886
5887
5888  test -n "$WC" && break
5889done
5890
5891
5892  if test "x$WC" = x; then
5893    if test "xwc" = x; then
5894      PROG_NAME=wc
5895    else
5896      PROG_NAME=wc
5897    fi
5898    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5899$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5900    as_fn_error $? "Cannot continue" "$LINENO" 5
5901  fi
5902
5903
5904
5905  for ac_prog in which
5906do
5907  # Extract the first word of "$ac_prog", so it can be a program name with args.
5908set dummy $ac_prog; ac_word=$2
5909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5910$as_echo_n "checking for $ac_word... " >&6; }
5911if ${ac_cv_path_WHICH+:} false; then :
5912  $as_echo_n "(cached) " >&6
5913else
5914  case $WHICH in
5915  [\\/]* | ?:[\\/]*)
5916  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5917  ;;
5918  *)
5919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5920for as_dir in $PATH
5921do
5922  IFS=$as_save_IFS
5923  test -z "$as_dir" && as_dir=.
5924    for ac_exec_ext in '' $ac_executable_extensions; do
5925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5926    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5928    break 2
5929  fi
5930done
5931  done
5932IFS=$as_save_IFS
5933
5934  ;;
5935esac
5936fi
5937WHICH=$ac_cv_path_WHICH
5938if test -n "$WHICH"; then
5939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5940$as_echo "$WHICH" >&6; }
5941else
5942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5943$as_echo "no" >&6; }
5944fi
5945
5946
5947  test -n "$WHICH" && break
5948done
5949
5950
5951  if test "x$WHICH" = x; then
5952    if test "xwhich" = x; then
5953      PROG_NAME=which
5954    else
5955      PROG_NAME=which
5956    fi
5957    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5958$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5959    as_fn_error $? "Cannot continue" "$LINENO" 5
5960  fi
5961
5962
5963
5964  for ac_prog in xargs
5965do
5966  # Extract the first word of "$ac_prog", so it can be a program name with args.
5967set dummy $ac_prog; ac_word=$2
5968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5969$as_echo_n "checking for $ac_word... " >&6; }
5970if ${ac_cv_path_XARGS+:} false; then :
5971  $as_echo_n "(cached) " >&6
5972else
5973  case $XARGS in
5974  [\\/]* | ?:[\\/]*)
5975  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5976  ;;
5977  *)
5978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5979for as_dir in $PATH
5980do
5981  IFS=$as_save_IFS
5982  test -z "$as_dir" && as_dir=.
5983    for ac_exec_ext in '' $ac_executable_extensions; do
5984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5985    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5987    break 2
5988  fi
5989done
5990  done
5991IFS=$as_save_IFS
5992
5993  ;;
5994esac
5995fi
5996XARGS=$ac_cv_path_XARGS
5997if test -n "$XARGS"; then
5998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5999$as_echo "$XARGS" >&6; }
6000else
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6002$as_echo "no" >&6; }
6003fi
6004
6005
6006  test -n "$XARGS" && break
6007done
6008
6009
6010  if test "x$XARGS" = x; then
6011    if test "xxargs" = x; then
6012      PROG_NAME=xargs
6013    else
6014      PROG_NAME=xargs
6015    fi
6016    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6017$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6018    as_fn_error $? "Cannot continue" "$LINENO" 5
6019  fi
6020
6021
6022
6023  # Then required tools that require some special treatment.
6024  for ac_prog in gawk mawk nawk awk
6025do
6026  # Extract the first word of "$ac_prog", so it can be a program name with args.
6027set dummy $ac_prog; ac_word=$2
6028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6029$as_echo_n "checking for $ac_word... " >&6; }
6030if ${ac_cv_prog_AWK+:} false; then :
6031  $as_echo_n "(cached) " >&6
6032else
6033  if test -n "$AWK"; then
6034  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6035else
6036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6037for as_dir in $PATH
6038do
6039  IFS=$as_save_IFS
6040  test -z "$as_dir" && as_dir=.
6041    for ac_exec_ext in '' $ac_executable_extensions; do
6042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6043    ac_cv_prog_AWK="$ac_prog"
6044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6045    break 2
6046  fi
6047done
6048  done
6049IFS=$as_save_IFS
6050
6051fi
6052fi
6053AWK=$ac_cv_prog_AWK
6054if test -n "$AWK"; then
6055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6056$as_echo "$AWK" >&6; }
6057else
6058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059$as_echo "no" >&6; }
6060fi
6061
6062
6063  test -n "$AWK" && break
6064done
6065
6066
6067  if test "x$AWK" = x; then
6068    if test "x" = x; then
6069      PROG_NAME=awk
6070    else
6071      PROG_NAME=
6072    fi
6073    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6074$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6075    as_fn_error $? "Cannot continue" "$LINENO" 5
6076  fi
6077
6078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6079$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6080if ${ac_cv_path_GREP+:} false; then :
6081  $as_echo_n "(cached) " >&6
6082else
6083  if test -z "$GREP"; then
6084  ac_path_GREP_found=false
6085  # Loop through the user's path and test for each of PROGNAME-LIST
6086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6087for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6088do
6089  IFS=$as_save_IFS
6090  test -z "$as_dir" && as_dir=.
6091    for ac_prog in grep ggrep; do
6092    for ac_exec_ext in '' $ac_executable_extensions; do
6093      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6094      as_fn_executable_p "$ac_path_GREP" || continue
6095# Check for GNU ac_path_GREP and select it if it is found.
6096  # Check for GNU $ac_path_GREP
6097case `"$ac_path_GREP" --version 2>&1` in
6098*GNU*)
6099  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6100*)
6101  ac_count=0
6102  $as_echo_n 0123456789 >"conftest.in"
6103  while :
6104  do
6105    cat "conftest.in" "conftest.in" >"conftest.tmp"
6106    mv "conftest.tmp" "conftest.in"
6107    cp "conftest.in" "conftest.nl"
6108    $as_echo 'GREP' >> "conftest.nl"
6109    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6110    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6111    as_fn_arith $ac_count + 1 && ac_count=$as_val
6112    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6113      # Best one so far, save it but keep looking for a better one
6114      ac_cv_path_GREP="$ac_path_GREP"
6115      ac_path_GREP_max=$ac_count
6116    fi
6117    # 10*(2^10) chars as input seems more than enough
6118    test $ac_count -gt 10 && break
6119  done
6120  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6121esac
6122
6123      $ac_path_GREP_found && break 3
6124    done
6125  done
6126  done
6127IFS=$as_save_IFS
6128  if test -z "$ac_cv_path_GREP"; then
6129    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6130  fi
6131else
6132  ac_cv_path_GREP=$GREP
6133fi
6134
6135fi
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6137$as_echo "$ac_cv_path_GREP" >&6; }
6138 GREP="$ac_cv_path_GREP"
6139
6140
6141
6142  if test "x$GREP" = x; then
6143    if test "x" = x; then
6144      PROG_NAME=grep
6145    else
6146      PROG_NAME=
6147    fi
6148    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6149$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6150    as_fn_error $? "Cannot continue" "$LINENO" 5
6151  fi
6152
6153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6154$as_echo_n "checking for egrep... " >&6; }
6155if ${ac_cv_path_EGREP+:} false; then :
6156  $as_echo_n "(cached) " >&6
6157else
6158  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6159   then ac_cv_path_EGREP="$GREP -E"
6160   else
6161     if test -z "$EGREP"; then
6162  ac_path_EGREP_found=false
6163  # Loop through the user's path and test for each of PROGNAME-LIST
6164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6165for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6166do
6167  IFS=$as_save_IFS
6168  test -z "$as_dir" && as_dir=.
6169    for ac_prog in egrep; do
6170    for ac_exec_ext in '' $ac_executable_extensions; do
6171      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6172      as_fn_executable_p "$ac_path_EGREP" || continue
6173# Check for GNU ac_path_EGREP and select it if it is found.
6174  # Check for GNU $ac_path_EGREP
6175case `"$ac_path_EGREP" --version 2>&1` in
6176*GNU*)
6177  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6178*)
6179  ac_count=0
6180  $as_echo_n 0123456789 >"conftest.in"
6181  while :
6182  do
6183    cat "conftest.in" "conftest.in" >"conftest.tmp"
6184    mv "conftest.tmp" "conftest.in"
6185    cp "conftest.in" "conftest.nl"
6186    $as_echo 'EGREP' >> "conftest.nl"
6187    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6188    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6189    as_fn_arith $ac_count + 1 && ac_count=$as_val
6190    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6191      # Best one so far, save it but keep looking for a better one
6192      ac_cv_path_EGREP="$ac_path_EGREP"
6193      ac_path_EGREP_max=$ac_count
6194    fi
6195    # 10*(2^10) chars as input seems more than enough
6196    test $ac_count -gt 10 && break
6197  done
6198  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6199esac
6200
6201      $ac_path_EGREP_found && break 3
6202    done
6203  done
6204  done
6205IFS=$as_save_IFS
6206  if test -z "$ac_cv_path_EGREP"; then
6207    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6208  fi
6209else
6210  ac_cv_path_EGREP=$EGREP
6211fi
6212
6213   fi
6214fi
6215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6216$as_echo "$ac_cv_path_EGREP" >&6; }
6217 EGREP="$ac_cv_path_EGREP"
6218
6219
6220
6221  if test "x$EGREP" = x; then
6222    if test "x" = x; then
6223      PROG_NAME=egrep
6224    else
6225      PROG_NAME=
6226    fi
6227    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6228$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6229    as_fn_error $? "Cannot continue" "$LINENO" 5
6230  fi
6231
6232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6233$as_echo_n "checking for fgrep... " >&6; }
6234if ${ac_cv_path_FGREP+:} false; then :
6235  $as_echo_n "(cached) " >&6
6236else
6237  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6238   then ac_cv_path_FGREP="$GREP -F"
6239   else
6240     if test -z "$FGREP"; then
6241  ac_path_FGREP_found=false
6242  # Loop through the user's path and test for each of PROGNAME-LIST
6243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6245do
6246  IFS=$as_save_IFS
6247  test -z "$as_dir" && as_dir=.
6248    for ac_prog in fgrep; do
6249    for ac_exec_ext in '' $ac_executable_extensions; do
6250      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6251      as_fn_executable_p "$ac_path_FGREP" || continue
6252# Check for GNU ac_path_FGREP and select it if it is found.
6253  # Check for GNU $ac_path_FGREP
6254case `"$ac_path_FGREP" --version 2>&1` in
6255*GNU*)
6256  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6257*)
6258  ac_count=0
6259  $as_echo_n 0123456789 >"conftest.in"
6260  while :
6261  do
6262    cat "conftest.in" "conftest.in" >"conftest.tmp"
6263    mv "conftest.tmp" "conftest.in"
6264    cp "conftest.in" "conftest.nl"
6265    $as_echo 'FGREP' >> "conftest.nl"
6266    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6267    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6268    as_fn_arith $ac_count + 1 && ac_count=$as_val
6269    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6270      # Best one so far, save it but keep looking for a better one
6271      ac_cv_path_FGREP="$ac_path_FGREP"
6272      ac_path_FGREP_max=$ac_count
6273    fi
6274    # 10*(2^10) chars as input seems more than enough
6275    test $ac_count -gt 10 && break
6276  done
6277  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6278esac
6279
6280      $ac_path_FGREP_found && break 3
6281    done
6282  done
6283  done
6284IFS=$as_save_IFS
6285  if test -z "$ac_cv_path_FGREP"; then
6286    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6287  fi
6288else
6289  ac_cv_path_FGREP=$FGREP
6290fi
6291
6292   fi
6293fi
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6295$as_echo "$ac_cv_path_FGREP" >&6; }
6296 FGREP="$ac_cv_path_FGREP"
6297
6298
6299
6300  if test "x$FGREP" = x; then
6301    if test "x" = x; then
6302      PROG_NAME=fgrep
6303    else
6304      PROG_NAME=
6305    fi
6306    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6307$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6308    as_fn_error $? "Cannot continue" "$LINENO" 5
6309  fi
6310
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6312$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6313if ${ac_cv_path_SED+:} false; then :
6314  $as_echo_n "(cached) " >&6
6315else
6316            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6317     for ac_i in 1 2 3 4 5 6 7; do
6318       ac_script="$ac_script$as_nl$ac_script"
6319     done
6320     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6321     { ac_script=; unset ac_script;}
6322     if test -z "$SED"; then
6323  ac_path_SED_found=false
6324  # Loop through the user's path and test for each of PROGNAME-LIST
6325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326for as_dir in $PATH
6327do
6328  IFS=$as_save_IFS
6329  test -z "$as_dir" && as_dir=.
6330    for ac_prog in sed gsed; do
6331    for ac_exec_ext in '' $ac_executable_extensions; do
6332      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6333      as_fn_executable_p "$ac_path_SED" || continue
6334# Check for GNU ac_path_SED and select it if it is found.
6335  # Check for GNU $ac_path_SED
6336case `"$ac_path_SED" --version 2>&1` in
6337*GNU*)
6338  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6339*)
6340  ac_count=0
6341  $as_echo_n 0123456789 >"conftest.in"
6342  while :
6343  do
6344    cat "conftest.in" "conftest.in" >"conftest.tmp"
6345    mv "conftest.tmp" "conftest.in"
6346    cp "conftest.in" "conftest.nl"
6347    $as_echo '' >> "conftest.nl"
6348    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6349    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6350    as_fn_arith $ac_count + 1 && ac_count=$as_val
6351    if test $ac_count -gt ${ac_path_SED_max-0}; then
6352      # Best one so far, save it but keep looking for a better one
6353      ac_cv_path_SED="$ac_path_SED"
6354      ac_path_SED_max=$ac_count
6355    fi
6356    # 10*(2^10) chars as input seems more than enough
6357    test $ac_count -gt 10 && break
6358  done
6359  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6360esac
6361
6362      $ac_path_SED_found && break 3
6363    done
6364  done
6365  done
6366IFS=$as_save_IFS
6367  if test -z "$ac_cv_path_SED"; then
6368    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6369  fi
6370else
6371  ac_cv_path_SED=$SED
6372fi
6373
6374fi
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6376$as_echo "$ac_cv_path_SED" >&6; }
6377 SED="$ac_cv_path_SED"
6378  rm -f conftest.sed
6379
6380
6381  if test "x$SED" = x; then
6382    if test "x" = x; then
6383      PROG_NAME=sed
6384    else
6385      PROG_NAME=
6386    fi
6387    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6388$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6389    as_fn_error $? "Cannot continue" "$LINENO" 5
6390  fi
6391
6392
6393  for ac_prog in nawk gawk awk
6394do
6395  # Extract the first word of "$ac_prog", so it can be a program name with args.
6396set dummy $ac_prog; ac_word=$2
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6398$as_echo_n "checking for $ac_word... " >&6; }
6399if ${ac_cv_path_NAWK+:} false; then :
6400  $as_echo_n "(cached) " >&6
6401else
6402  case $NAWK in
6403  [\\/]* | ?:[\\/]*)
6404  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6405  ;;
6406  *)
6407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6408for as_dir in $PATH
6409do
6410  IFS=$as_save_IFS
6411  test -z "$as_dir" && as_dir=.
6412    for ac_exec_ext in '' $ac_executable_extensions; do
6413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6414    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6416    break 2
6417  fi
6418done
6419  done
6420IFS=$as_save_IFS
6421
6422  ;;
6423esac
6424fi
6425NAWK=$ac_cv_path_NAWK
6426if test -n "$NAWK"; then
6427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6428$as_echo "$NAWK" >&6; }
6429else
6430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6431$as_echo "no" >&6; }
6432fi
6433
6434
6435  test -n "$NAWK" && break
6436done
6437
6438
6439  if test "x$NAWK" = x; then
6440    if test "x" = x; then
6441      PROG_NAME=nawk
6442    else
6443      PROG_NAME=
6444    fi
6445    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6446$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6447    as_fn_error $? "Cannot continue" "$LINENO" 5
6448  fi
6449
6450
6451  # Always force rm.
6452  RM="$RM -f"
6453
6454  # pwd behaves differently on various platforms and some don't support the -L flag.
6455  # Always use the bash builtin pwd to get uniform behavior.
6456  THEPWDCMD=pwd
6457
6458  # These are not required on all platforms
6459  # Extract the first word of "cygpath", so it can be a program name with args.
6460set dummy cygpath; ac_word=$2
6461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6462$as_echo_n "checking for $ac_word... " >&6; }
6463if ${ac_cv_path_CYGPATH+:} false; then :
6464  $as_echo_n "(cached) " >&6
6465else
6466  case $CYGPATH in
6467  [\\/]* | ?:[\\/]*)
6468  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6469  ;;
6470  *)
6471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6472for as_dir in $PATH
6473do
6474  IFS=$as_save_IFS
6475  test -z "$as_dir" && as_dir=.
6476    for ac_exec_ext in '' $ac_executable_extensions; do
6477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6478    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6480    break 2
6481  fi
6482done
6483  done
6484IFS=$as_save_IFS
6485
6486  ;;
6487esac
6488fi
6489CYGPATH=$ac_cv_path_CYGPATH
6490if test -n "$CYGPATH"; then
6491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6492$as_echo "$CYGPATH" >&6; }
6493else
6494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6495$as_echo "no" >&6; }
6496fi
6497
6498
6499  # Extract the first word of "readlink", so it can be a program name with args.
6500set dummy readlink; ac_word=$2
6501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6502$as_echo_n "checking for $ac_word... " >&6; }
6503if ${ac_cv_path_READLINK+:} false; then :
6504  $as_echo_n "(cached) " >&6
6505else
6506  case $READLINK in
6507  [\\/]* | ?:[\\/]*)
6508  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6509  ;;
6510  *)
6511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6512for as_dir in $PATH
6513do
6514  IFS=$as_save_IFS
6515  test -z "$as_dir" && as_dir=.
6516    for ac_exec_ext in '' $ac_executable_extensions; do
6517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6518    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6520    break 2
6521  fi
6522done
6523  done
6524IFS=$as_save_IFS
6525
6526  ;;
6527esac
6528fi
6529READLINK=$ac_cv_path_READLINK
6530if test -n "$READLINK"; then
6531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6532$as_echo "$READLINK" >&6; }
6533else
6534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6535$as_echo "no" >&6; }
6536fi
6537
6538
6539  # Extract the first word of "df", so it can be a program name with args.
6540set dummy df; ac_word=$2
6541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6542$as_echo_n "checking for $ac_word... " >&6; }
6543if ${ac_cv_path_DF+:} false; then :
6544  $as_echo_n "(cached) " >&6
6545else
6546  case $DF in
6547  [\\/]* | ?:[\\/]*)
6548  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6549  ;;
6550  *)
6551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6552for as_dir in $PATH
6553do
6554  IFS=$as_save_IFS
6555  test -z "$as_dir" && as_dir=.
6556    for ac_exec_ext in '' $ac_executable_extensions; do
6557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6558    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6560    break 2
6561  fi
6562done
6563  done
6564IFS=$as_save_IFS
6565
6566  ;;
6567esac
6568fi
6569DF=$ac_cv_path_DF
6570if test -n "$DF"; then
6571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6572$as_echo "$DF" >&6; }
6573else
6574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6575$as_echo "no" >&6; }
6576fi
6577
6578
6579  # Extract the first word of "SetFile", so it can be a program name with args.
6580set dummy SetFile; ac_word=$2
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6582$as_echo_n "checking for $ac_word... " >&6; }
6583if ${ac_cv_path_SETFILE+:} false; then :
6584  $as_echo_n "(cached) " >&6
6585else
6586  case $SETFILE in
6587  [\\/]* | ?:[\\/]*)
6588  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6589  ;;
6590  *)
6591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6592for as_dir in $PATH
6593do
6594  IFS=$as_save_IFS
6595  test -z "$as_dir" && as_dir=.
6596    for ac_exec_ext in '' $ac_executable_extensions; do
6597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6598    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6600    break 2
6601  fi
6602done
6603  done
6604IFS=$as_save_IFS
6605
6606  ;;
6607esac
6608fi
6609SETFILE=$ac_cv_path_SETFILE
6610if test -n "$SETFILE"; then
6611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6612$as_echo "$SETFILE" >&6; }
6613else
6614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6615$as_echo "no" >&6; }
6616fi
6617
6618
6619
6620
6621# Now we can determine OpenJDK build and target platforms. This is required to
6622# have early on.
6623# Make sure we can run config.sub.
6624$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6625  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6626
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6628$as_echo_n "checking build system type... " >&6; }
6629if ${ac_cv_build+:} false; then :
6630  $as_echo_n "(cached) " >&6
6631else
6632  ac_build_alias=$build_alias
6633test "x$ac_build_alias" = x &&
6634  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6635test "x$ac_build_alias" = x &&
6636  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6637ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6638  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6639
6640fi
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6642$as_echo "$ac_cv_build" >&6; }
6643case $ac_cv_build in
6644*-*-*) ;;
6645*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6646esac
6647build=$ac_cv_build
6648ac_save_IFS=$IFS; IFS='-'
6649set x $ac_cv_build
6650shift
6651build_cpu=$1
6652build_vendor=$2
6653shift; shift
6654# Remember, the first character of IFS is used to create $*,
6655# except with old shells:
6656build_os=$*
6657IFS=$ac_save_IFS
6658case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6659
6660
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6662$as_echo_n "checking host system type... " >&6; }
6663if ${ac_cv_host+:} false; then :
6664  $as_echo_n "(cached) " >&6
6665else
6666  if test "x$host_alias" = x; then
6667  ac_cv_host=$ac_cv_build
6668else
6669  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6670    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6671fi
6672
6673fi
6674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6675$as_echo "$ac_cv_host" >&6; }
6676case $ac_cv_host in
6677*-*-*) ;;
6678*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6679esac
6680host=$ac_cv_host
6681ac_save_IFS=$IFS; IFS='-'
6682set x $ac_cv_host
6683shift
6684host_cpu=$1
6685host_vendor=$2
6686shift; shift
6687# Remember, the first character of IFS is used to create $*,
6688# except with old shells:
6689host_os=$*
6690IFS=$ac_save_IFS
6691case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6692
6693
6694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6695$as_echo_n "checking target system type... " >&6; }
6696if ${ac_cv_target+:} false; then :
6697  $as_echo_n "(cached) " >&6
6698else
6699  if test "x$target_alias" = x; then
6700  ac_cv_target=$ac_cv_host
6701else
6702  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6703    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6704fi
6705
6706fi
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6708$as_echo "$ac_cv_target" >&6; }
6709case $ac_cv_target in
6710*-*-*) ;;
6711*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6712esac
6713target=$ac_cv_target
6714ac_save_IFS=$IFS; IFS='-'
6715set x $ac_cv_target
6716shift
6717target_cpu=$1
6718target_vendor=$2
6719shift; shift
6720# Remember, the first character of IFS is used to create $*,
6721# except with old shells:
6722target_os=$*
6723IFS=$ac_save_IFS
6724case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6725
6726
6727# The aliases save the names the user supplied, while $host etc.
6728# will get canonicalized.
6729test -n "$target_alias" &&
6730  test "$program_prefix$program_suffix$program_transform_name" = \
6731    NONENONEs,x,x, &&
6732  program_prefix=${target_alias}-
6733
6734  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6735  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6736  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6737  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6738  # to use the configure naming style.
6739
6740
6741
6742
6743
6744  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6745  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6746  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6747  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6748  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6749  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6750
6751
6752
6753  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6754
6755  case "$build_os" in
6756    *linux*)
6757      VAR_OS=linux
6758      VAR_OS_API=posix
6759      VAR_OS_ENV=linux
6760      ;;
6761    *solaris*)
6762      VAR_OS=solaris
6763      VAR_OS_API=posix
6764      VAR_OS_ENV=solaris
6765      ;;
6766    *darwin*)
6767      VAR_OS=macosx
6768      VAR_OS_API=posix
6769      VAR_OS_ENV=macosx
6770      ;;
6771    *bsd*)
6772      VAR_OS=bsd
6773      VAR_OS_API=posix
6774      VAR_OS_ENV=bsd
6775      ;;
6776    *cygwin*)
6777      VAR_OS=windows
6778      VAR_OS_API=winapi
6779      VAR_OS_ENV=windows.cygwin
6780      ;;
6781    *mingw*)
6782      VAR_OS=windows
6783      VAR_OS_API=winapi
6784      VAR_OS_ENV=windows.msys
6785      ;;
6786    *)
6787      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6788      ;;
6789  esac
6790
6791
6792  # First argument is the cpu name from the trip/quad
6793  case "$build_cpu" in
6794    x86_64)
6795      VAR_CPU=x86_64
6796      VAR_CPU_ARCH=x86
6797      VAR_CPU_BITS=64
6798      VAR_CPU_ENDIAN=little
6799      ;;
6800    i?86)
6801      VAR_CPU=x86
6802      VAR_CPU_ARCH=x86
6803      VAR_CPU_BITS=32
6804      VAR_CPU_ENDIAN=little
6805      ;;
6806    arm*)
6807      VAR_CPU=arm
6808      VAR_CPU_ARCH=arm
6809      VAR_CPU_BITS=32
6810      VAR_CPU_ENDIAN=little
6811      ;;
6812    powerpc)
6813      VAR_CPU=ppc
6814      VAR_CPU_ARCH=ppc
6815      VAR_CPU_BITS=32
6816      VAR_CPU_ENDIAN=big
6817      ;;
6818    powerpc64)
6819      VAR_CPU=ppc64
6820      VAR_CPU_ARCH=ppc
6821      VAR_CPU_BITS=64
6822      VAR_CPU_ENDIAN=big
6823      ;;
6824    s390)
6825      VAR_CPU=s390
6826      VAR_CPU_ARCH=s390
6827      VAR_CPU_BITS=32
6828      VAR_CPU_ENDIAN=big
6829      ;;
6830    s390x)
6831      VAR_CPU=s390x
6832      VAR_CPU_ARCH=s390
6833      VAR_CPU_BITS=64
6834      VAR_CPU_ENDIAN=big
6835      ;;
6836    sparc)
6837      VAR_CPU=sparc
6838      VAR_CPU_ARCH=sparc
6839      VAR_CPU_BITS=32
6840      VAR_CPU_ENDIAN=big
6841      ;;
6842    sparcv9)
6843      VAR_CPU=sparcv9
6844      VAR_CPU_ARCH=sparc
6845      VAR_CPU_BITS=64
6846      VAR_CPU_ENDIAN=big
6847      ;;
6848    *)
6849      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6850      ;;
6851  esac
6852
6853  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6854  OPENJDK_BUILD_OS="$VAR_OS"
6855  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6856  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6857  OPENJDK_BUILD_CPU="$VAR_CPU"
6858  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6859  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6860  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6861
6862
6863
6864
6865
6866
6867
6868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6869$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6871$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6872
6873  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6874
6875  case "$host_os" in
6876    *linux*)
6877      VAR_OS=linux
6878      VAR_OS_API=posix
6879      VAR_OS_ENV=linux
6880      ;;
6881    *solaris*)
6882      VAR_OS=solaris
6883      VAR_OS_API=posix
6884      VAR_OS_ENV=solaris
6885      ;;
6886    *darwin*)
6887      VAR_OS=macosx
6888      VAR_OS_API=posix
6889      VAR_OS_ENV=macosx
6890      ;;
6891    *bsd*)
6892      VAR_OS=bsd
6893      VAR_OS_API=posix
6894      VAR_OS_ENV=bsd
6895      ;;
6896    *cygwin*)
6897      VAR_OS=windows
6898      VAR_OS_API=winapi
6899      VAR_OS_ENV=windows.cygwin
6900      ;;
6901    *mingw*)
6902      VAR_OS=windows
6903      VAR_OS_API=winapi
6904      VAR_OS_ENV=windows.msys
6905      ;;
6906    *)
6907      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6908      ;;
6909  esac
6910
6911
6912  # First argument is the cpu name from the trip/quad
6913  case "$host_cpu" in
6914    x86_64)
6915      VAR_CPU=x86_64
6916      VAR_CPU_ARCH=x86
6917      VAR_CPU_BITS=64
6918      VAR_CPU_ENDIAN=little
6919      ;;
6920    i?86)
6921      VAR_CPU=x86
6922      VAR_CPU_ARCH=x86
6923      VAR_CPU_BITS=32
6924      VAR_CPU_ENDIAN=little
6925      ;;
6926    arm*)
6927      VAR_CPU=arm
6928      VAR_CPU_ARCH=arm
6929      VAR_CPU_BITS=32
6930      VAR_CPU_ENDIAN=little
6931      ;;
6932    powerpc)
6933      VAR_CPU=ppc
6934      VAR_CPU_ARCH=ppc
6935      VAR_CPU_BITS=32
6936      VAR_CPU_ENDIAN=big
6937      ;;
6938    powerpc64)
6939      VAR_CPU=ppc64
6940      VAR_CPU_ARCH=ppc
6941      VAR_CPU_BITS=64
6942      VAR_CPU_ENDIAN=big
6943      ;;
6944    s390)
6945      VAR_CPU=s390
6946      VAR_CPU_ARCH=s390
6947      VAR_CPU_BITS=32
6948      VAR_CPU_ENDIAN=big
6949      ;;
6950    s390x)
6951      VAR_CPU=s390x
6952      VAR_CPU_ARCH=s390
6953      VAR_CPU_BITS=64
6954      VAR_CPU_ENDIAN=big
6955      ;;
6956    sparc)
6957      VAR_CPU=sparc
6958      VAR_CPU_ARCH=sparc
6959      VAR_CPU_BITS=32
6960      VAR_CPU_ENDIAN=big
6961      ;;
6962    sparcv9)
6963      VAR_CPU=sparcv9
6964      VAR_CPU_ARCH=sparc
6965      VAR_CPU_BITS=64
6966      VAR_CPU_ENDIAN=big
6967      ;;
6968    *)
6969      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6970      ;;
6971  esac
6972
6973  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6974  OPENJDK_TARGET_OS="$VAR_OS"
6975  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6976  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6977  OPENJDK_TARGET_CPU="$VAR_CPU"
6978  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6979  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6980  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6981
6982
6983
6984
6985
6986
6987
6988  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6989$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6991$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6992
6993
6994
6995# Check whether --with-target-bits was given.
6996if test "${with_target_bits+set}" = set; then :
6997  withval=$with_target_bits;
6998fi
6999
7000
7001  # We have three types of compiles:
7002  # native  == normal compilation, target system == build system
7003  # cross   == traditional cross compilation, target system != build system; special toolchain needed
7004  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7005  #
7006  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7007    # We're doing a proper cross-compilation
7008    COMPILE_TYPE="cross"
7009  else
7010    COMPILE_TYPE="native"
7011  fi
7012
7013  if test "x$with_target_bits" != x; then
7014    if test "x$COMPILE_TYPE" = "xcross"; then
7015      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7016    fi
7017
7018    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7019      # A reduced build is requested
7020      COMPILE_TYPE="reduced"
7021      OPENJDK_TARGET_CPU_BITS=32
7022      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7023        OPENJDK_TARGET_CPU=x86
7024      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7025        OPENJDK_TARGET_CPU=sparc
7026      else
7027        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7028      fi
7029    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7030      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
7031    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7032      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7033$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7034    else
7035      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7036    fi
7037  fi
7038
7039
7040  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7041$as_echo_n "checking compilation type... " >&6; }
7042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7043$as_echo "$COMPILE_TYPE" >&6; }
7044
7045
7046  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7047    REQUIRED_OS_NAME=SunOS
7048    REQUIRED_OS_VERSION=5.10
7049  fi
7050  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7051    REQUIRED_OS_NAME=Linux
7052    REQUIRED_OS_VERSION=2.6
7053  fi
7054  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7055    REQUIRED_OS_NAME=Windows
7056    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7057      REQUIRED_OS_VERSION=5.2
7058    else
7059      REQUIRED_OS_VERSION=5.1
7060    fi
7061  fi
7062  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7063    REQUIRED_OS_NAME=Darwin
7064    REQUIRED_OS_VERSION=11.2
7065  fi
7066
7067
7068
7069
7070
7071  # Also store the legacy naming of the cpu.
7072  # Ie i586 and amd64 instead of x86 and x86_64
7073  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7074  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7075    OPENJDK_TARGET_CPU_LEGACY="i586"
7076  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7077    # On all platforms except MacOSX replace x86_64 with amd64.
7078    OPENJDK_TARGET_CPU_LEGACY="amd64"
7079  fi
7080
7081
7082  # And the second legacy naming of the cpu.
7083  # Ie i386 and amd64 instead of x86 and x86_64.
7084  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7085  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7086    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7087  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7088    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7089  fi
7090
7091
7092  # This is the name of the cpu (but using i386 and amd64 instead of
7093  # x86 and x86_64, respectively), preceeded by a /, to be used when
7094  # locating libraries. On macosx, it's empty, though.
7095  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7096  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7097    OPENJDK_TARGET_CPU_LIBDIR=""
7098  fi
7099
7100
7101  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7102  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7103  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7104  OPENJDK_TARGET_CPU_ISADIR=""
7105  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7106    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7107      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7108    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7109      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7110    fi
7111  fi
7112
7113
7114  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7115  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7116  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7117    # On linux only, we replace x86 with i386.
7118    OPENJDK_TARGET_CPU_OSARCH="i386"
7119  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7120    # On all platforms except macosx, we replace x86_64 with amd64.
7121    OPENJDK_TARGET_CPU_OSARCH="amd64"
7122  fi
7123
7124
7125  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7126  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7127    OPENJDK_TARGET_CPU_JLI="i386"
7128  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7129    # On all platforms except macosx, we replace x86_64 with amd64.
7130    OPENJDK_TARGET_CPU_JLI="amd64"
7131  fi
7132  # Now setup the -D flags for building libjli.
7133  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7134  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7135    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7136      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7137    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7138      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7139    fi
7140  fi
7141
7142
7143  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7144  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7145    OPENJDK_TARGET_OS_API_DIR="solaris"
7146  fi
7147  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7148    OPENJDK_TARGET_OS_API_DIR="windows"
7149  fi
7150
7151
7152  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7153    A_LP64="LP64:="
7154    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7155    # unpack200.exe
7156    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7157      ADD_LP64="-D_LP64=1"
7158    fi
7159  fi
7160  LP64=$A_LP64
7161
7162
7163  if test "x$COMPILE_TYPE" = "xcross"; then
7164    # FIXME: ... or should this include reduced builds..?
7165    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7166  else
7167    DEFINE_CROSS_COMPILE_ARCH=""
7168  fi
7169
7170
7171  # ZERO_ARCHDEF is used to enable architecture-specific code
7172  case "${OPENJDK_TARGET_CPU}" in
7173    ppc*)    ZERO_ARCHDEF=PPC   ;;
7174    s390*)   ZERO_ARCHDEF=S390  ;;
7175    sparc*)  ZERO_ARCHDEF=SPARC ;;
7176    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7177    x86)     ZERO_ARCHDEF=IA32  ;;
7178    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7179  esac
7180
7181
7182
7183
7184# Continue setting up basic stuff. Most remaining code require fundamental tools.
7185
7186  # Locate the directory of this script.
7187  SCRIPT="$0"
7188  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7189
7190  # Where is the source? It is located two levels above the configure script.
7191  CURDIR="$PWD"
7192  cd "$AUTOCONF_DIR/../.."
7193  SRC_ROOT="`$THEPWDCMD -L`"
7194
7195  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7196    PATH_SEP=";"
7197
7198  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7199  if test $SRC_ROOT_LENGTH -gt 100; then
7200    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7201  fi
7202
7203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7205$as_echo_n "checking cygwin release... " >&6; }
7206    CYGWIN_VERSION=`$UNAME -r`
7207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7208$as_echo "$CYGWIN_VERSION" >&6; }
7209    WINDOWS_ENV_VENDOR='cygwin'
7210    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7211
7212    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7213    if test "x$CYGWIN_VERSION_OK" = x; then
7214      { $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
7215$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;}
7216      as_fn_error $? "Cannot continue" "$LINENO" 5
7217    fi
7218    if test "x$CYGPATH" = x; then
7219      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7220    fi
7221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7222$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7223    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7224    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7225    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7226    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7228$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7229    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7230    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7231    if test "x$test_cygdrive_prefix" = x; then
7232      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7233    fi
7234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7236$as_echo_n "checking msys release... " >&6; }
7237    MSYS_VERSION=`$UNAME -r`
7238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7239$as_echo "$MSYS_VERSION" >&6; }
7240
7241    WINDOWS_ENV_VENDOR='msys'
7242    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7243
7244    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7245$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7246    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7247    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7248
7249  windows_path="$MSYS_ROOT_PATH"
7250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7251    unix_path=`$CYGPATH -u "$windows_path"`
7252    MSYS_ROOT_PATH="$unix_path"
7253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7255    MSYS_ROOT_PATH="$unix_path"
7256  fi
7257
7258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7259$as_echo "$MSYS_ROOT_PATH" >&6; }
7260    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7261  else
7262    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7263  fi
7264
7265  # Test if windows or unix (cygwin/msys) find is first in path.
7266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7267$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7268  FIND_BINARY_OUTPUT=`find --version 2>&1`
7269  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7271$as_echo "unix style" >&6; }
7272  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7274$as_echo "Windows" >&6; }
7275    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7276$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7277    { $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
7278$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7279    as_fn_error $? "Cannot continue" "$LINENO" 5
7280  else
7281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7282$as_echo "unknown" >&6; }
7283    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7284$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7285  fi
7286
7287  else
7288    PATH_SEP=":"
7289  fi
7290
7291
7292
7293  cd "$CURDIR"
7294
7295
7296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7297
7298  # Input might be given as Windows format, start by converting to
7299  # unix format.
7300  path="$SRC_ROOT"
7301  new_path=`$CYGPATH -u "$path"`
7302
7303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7306  # "foo.exe" is OK but "foo" is an error.
7307  #
7308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7309  # It is also a way to make sure we got the proper file name for the real test later on.
7310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7311  if test "x$test_shortpath" = x; then
7312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7313$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7314    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7315  fi
7316
7317  # Call helper function which possibly converts this using DOS-style short mode.
7318  # If so, the updated path is stored in $new_path.
7319
7320  input_path="$new_path"
7321  # Check if we need to convert this using DOS-style short mode. If the path
7322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7323  # take no chances and rewrite it.
7324  # Note: m4 eats our [], so we need to use [ and ] instead.
7325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7326  if test "x$has_forbidden_chars" != x; then
7327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7331      # Going to short mode and back again did indeed matter. Since short mode is
7332      # case insensitive, let's make it lowercase to improve readability.
7333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7334      # Now convert it back to Unix-stile (cygpath)
7335      input_path=`$CYGPATH -u "$shortmode_path"`
7336      new_path="$input_path"
7337    fi
7338  fi
7339
7340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7341  if test "x$test_cygdrive_prefix" = x; then
7342    # As a simple fix, exclude /usr/bin since it's not a real path.
7343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7345      # a path prefixed by /cygdrive for fixpath to work.
7346      new_path="$CYGWIN_ROOT_PATH$input_path"
7347    fi
7348  fi
7349
7350
7351  if test "x$path" != "x$new_path"; then
7352    SRC_ROOT="$new_path"
7353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7354$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7355  fi
7356
7357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7358
7359  path="$SRC_ROOT"
7360  has_colon=`$ECHO $path | $GREP ^.:`
7361  new_path="$path"
7362  if test "x$has_colon" = x; then
7363    # Not in mixed or Windows style, start by that.
7364    new_path=`cmd //c echo $path`
7365  fi
7366
7367
7368  input_path="$new_path"
7369  # Check if we need to convert this using DOS-style short mode. If the path
7370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7371  # take no chances and rewrite it.
7372  # Note: m4 eats our [], so we need to use [ and ] instead.
7373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7374  if test "x$has_forbidden_chars" != x; then
7375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7377  fi
7378
7379
7380  windows_path="$new_path"
7381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7382    unix_path=`$CYGPATH -u "$windows_path"`
7383    new_path="$unix_path"
7384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7386    new_path="$unix_path"
7387  fi
7388
7389  if test "x$path" != "x$new_path"; then
7390    SRC_ROOT="$new_path"
7391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7392$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7393  fi
7394
7395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7397
7398  else
7399    # We're on a posix platform. Hooray! :)
7400    path="$SRC_ROOT"
7401    has_space=`$ECHO "$path" | $GREP " "`
7402    if test "x$has_space" != x; then
7403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7404$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7405      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7406    fi
7407
7408    # Use eval to expand a potential ~
7409    eval path="$path"
7410    if test ! -f "$path" && test ! -d "$path"; then
7411      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7412    fi
7413
7414    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7415  fi
7416
7417
7418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7419
7420  # Input might be given as Windows format, start by converting to
7421  # unix format.
7422  path="$CURDIR"
7423  new_path=`$CYGPATH -u "$path"`
7424
7425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7428  # "foo.exe" is OK but "foo" is an error.
7429  #
7430  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7431  # It is also a way to make sure we got the proper file name for the real test later on.
7432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7433  if test "x$test_shortpath" = x; then
7434    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7435$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7436    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7437  fi
7438
7439  # Call helper function which possibly converts this using DOS-style short mode.
7440  # If so, the updated path is stored in $new_path.
7441
7442  input_path="$new_path"
7443  # Check if we need to convert this using DOS-style short mode. If the path
7444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7445  # take no chances and rewrite it.
7446  # Note: m4 eats our [], so we need to use [ and ] instead.
7447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7448  if test "x$has_forbidden_chars" != x; then
7449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7453      # Going to short mode and back again did indeed matter. Since short mode is
7454      # case insensitive, let's make it lowercase to improve readability.
7455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7456      # Now convert it back to Unix-stile (cygpath)
7457      input_path=`$CYGPATH -u "$shortmode_path"`
7458      new_path="$input_path"
7459    fi
7460  fi
7461
7462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7463  if test "x$test_cygdrive_prefix" = x; then
7464    # As a simple fix, exclude /usr/bin since it's not a real path.
7465    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7467      # a path prefixed by /cygdrive for fixpath to work.
7468      new_path="$CYGWIN_ROOT_PATH$input_path"
7469    fi
7470  fi
7471
7472
7473  if test "x$path" != "x$new_path"; then
7474    CURDIR="$new_path"
7475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7476$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7477  fi
7478
7479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7480
7481  path="$CURDIR"
7482  has_colon=`$ECHO $path | $GREP ^.:`
7483  new_path="$path"
7484  if test "x$has_colon" = x; then
7485    # Not in mixed or Windows style, start by that.
7486    new_path=`cmd //c echo $path`
7487  fi
7488
7489
7490  input_path="$new_path"
7491  # Check if we need to convert this using DOS-style short mode. If the path
7492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7493  # take no chances and rewrite it.
7494  # Note: m4 eats our [], so we need to use [ and ] instead.
7495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7496  if test "x$has_forbidden_chars" != x; then
7497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7499  fi
7500
7501
7502  windows_path="$new_path"
7503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7504    unix_path=`$CYGPATH -u "$windows_path"`
7505    new_path="$unix_path"
7506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7508    new_path="$unix_path"
7509  fi
7510
7511  if test "x$path" != "x$new_path"; then
7512    CURDIR="$new_path"
7513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7514$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7515  fi
7516
7517  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7518  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7519
7520  else
7521    # We're on a posix platform. Hooray! :)
7522    path="$CURDIR"
7523    has_space=`$ECHO "$path" | $GREP " "`
7524    if test "x$has_space" != x; then
7525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7526$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7527      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7528    fi
7529
7530    # Use eval to expand a potential ~
7531    eval path="$path"
7532    if test ! -f "$path" && test ! -d "$path"; then
7533      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7534    fi
7535
7536    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7537  fi
7538
7539
7540  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7541    # Add extra search paths on solaris for utilities like ar and as etc...
7542    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7543  fi
7544
7545  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7546  # is not correct.
7547
7548# Check whether --with-sys-root was given.
7549if test "${with_sys_root+set}" = set; then :
7550  withval=$with_sys_root;
7551fi
7552
7553
7554  if test "x$with_sys_root" != x; then
7555    SYS_ROOT=$with_sys_root
7556  else
7557    SYS_ROOT=/
7558  fi
7559
7560
7561
7562# Check whether --with-tools-dir was given.
7563if test "${with_tools_dir+set}" = set; then :
7564  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7565
7566fi
7567
7568
7569
7570# Check whether --with-devkit was given.
7571if test "${with_devkit+set}" = set; then :
7572  withval=$with_devkit;
7573        if test "x$with_sys_root" != x; then
7574          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7575        fi
7576
7577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7578
7579  # Input might be given as Windows format, start by converting to
7580  # unix format.
7581  path="$with_devkit"
7582  new_path=`$CYGPATH -u "$path"`
7583
7584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7587  # "foo.exe" is OK but "foo" is an error.
7588  #
7589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7590  # It is also a way to make sure we got the proper file name for the real test later on.
7591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7592  if test "x$test_shortpath" = x; then
7593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7594$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7595    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7596  fi
7597
7598  # Call helper function which possibly converts this using DOS-style short mode.
7599  # If so, the updated path is stored in $new_path.
7600
7601  input_path="$new_path"
7602  # Check if we need to convert this using DOS-style short mode. If the path
7603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7604  # take no chances and rewrite it.
7605  # Note: m4 eats our [], so we need to use [ and ] instead.
7606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7607  if test "x$has_forbidden_chars" != x; then
7608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7612      # Going to short mode and back again did indeed matter. Since short mode is
7613      # case insensitive, let's make it lowercase to improve readability.
7614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7615      # Now convert it back to Unix-stile (cygpath)
7616      input_path=`$CYGPATH -u "$shortmode_path"`
7617      new_path="$input_path"
7618    fi
7619  fi
7620
7621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7622  if test "x$test_cygdrive_prefix" = x; then
7623    # As a simple fix, exclude /usr/bin since it's not a real path.
7624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7626      # a path prefixed by /cygdrive for fixpath to work.
7627      new_path="$CYGWIN_ROOT_PATH$input_path"
7628    fi
7629  fi
7630
7631
7632  if test "x$path" != "x$new_path"; then
7633    with_devkit="$new_path"
7634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7635$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7636  fi
7637
7638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7639
7640  path="$with_devkit"
7641  has_colon=`$ECHO $path | $GREP ^.:`
7642  new_path="$path"
7643  if test "x$has_colon" = x; then
7644    # Not in mixed or Windows style, start by that.
7645    new_path=`cmd //c echo $path`
7646  fi
7647
7648
7649  input_path="$new_path"
7650  # Check if we need to convert this using DOS-style short mode. If the path
7651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7652  # take no chances and rewrite it.
7653  # Note: m4 eats our [], so we need to use [ and ] instead.
7654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7655  if test "x$has_forbidden_chars" != x; then
7656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7658  fi
7659
7660
7661  windows_path="$new_path"
7662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7663    unix_path=`$CYGPATH -u "$windows_path"`
7664    new_path="$unix_path"
7665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7667    new_path="$unix_path"
7668  fi
7669
7670  if test "x$path" != "x$new_path"; then
7671    with_devkit="$new_path"
7672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7673$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7674  fi
7675
7676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7678
7679  else
7680    # We're on a posix platform. Hooray! :)
7681    path="$with_devkit"
7682    has_space=`$ECHO "$path" | $GREP " "`
7683    if test "x$has_space" != x; then
7684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7685$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7686      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7687    fi
7688
7689    # Use eval to expand a potential ~
7690    eval path="$path"
7691    if test ! -f "$path" && test ! -d "$path"; then
7692      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7693    fi
7694
7695    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7696  fi
7697
7698
7699  if test "x$TOOLS_DIR" = x; then
7700    TOOLS_DIR="$with_devkit/bin"
7701  else
7702    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7703  fi
7704
7705        if test -d "$with_devkit/$host_alias/libc"; then
7706          SYS_ROOT=$with_devkit/$host_alias/libc
7707        elif test -d "$with_devkit/$host/sys-root"; then
7708          SYS_ROOT=$with_devkit/$host/sys-root
7709        fi
7710
7711fi
7712
7713
7714
7715  # Setup default logging of stdout and stderr to build.log in the output root.
7716  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7717  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7718  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7719
7720
7721
7722
7723
7724# Check if it's a pure open build or if custom sources are to be used.
7725
7726  # Check whether --enable-openjdk-only was given.
7727if test "${enable_openjdk_only+set}" = set; then :
7728  enableval=$enable_openjdk_only;
7729else
7730  enable_openjdk_only="no"
7731fi
7732
7733
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7735$as_echo_n "checking for presence of closed sources... " >&6; }
7736  if test -d "$SRC_ROOT/jdk/src/closed"; then
7737    CLOSED_SOURCE_PRESENT=yes
7738  else
7739    CLOSED_SOURCE_PRESENT=no
7740  fi
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7742$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7743
7744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7745$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7746  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7748$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7749
7750  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7751    OPENJDK=true
7752    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7753      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7754$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7755    fi
7756  else
7757    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7758      OPENJDK=true
7759    else
7760      OPENJDK=false
7761    fi
7762  fi
7763
7764  if test "x$OPENJDK" = "xtrue"; then
7765    SET_OPENJDK="OPENJDK=true"
7766  fi
7767
7768
7769
7770
7771# These are needed to be able to create a configuration name (and thus the output directory)
7772
7773  ###############################################################################
7774  #
7775  # Check which variant of the JDK that we want to build.
7776  # Currently we have:
7777  #    normal:   standard edition
7778  # but the custom make system may add other variants
7779  #
7780  # Effectively the JDK variant gives a name to a specific set of
7781  # modules to compile into the JDK. In the future, these modules
7782  # might even be Jigsaw modules.
7783  #
7784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7785$as_echo_n "checking which variant of the JDK to build... " >&6; }
7786
7787# Check whether --with-jdk-variant was given.
7788if test "${with_jdk_variant+set}" = set; then :
7789  withval=$with_jdk_variant;
7790fi
7791
7792
7793  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7794    JDK_VARIANT="normal"
7795  else
7796    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7797  fi
7798
7799
7800
7801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7802$as_echo "$JDK_VARIANT" >&6; }
7803
7804
7805
7806  ###############################################################################
7807  #
7808  # Check which variants of the JVM that we want to build.
7809  # Currently we have:
7810  #    server: normal interpreter and a tiered C1/C2 compiler
7811  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7812  #    minimal1: reduced form of client with optional VM services and features stripped out
7813  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7814  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7815  #    zero: no machine code interpreter, no compiler
7816  #    zeroshark: zero interpreter and shark/llvm compiler backend
7817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7818$as_echo_n "checking which variants of the JVM to build... " >&6; }
7819
7820# Check whether --with-jvm-variants was given.
7821if test "${with_jvm_variants+set}" = set; then :
7822  withval=$with_jvm_variants;
7823fi
7824
7825
7826  if test "x$with_jvm_variants" = x; then
7827    with_jvm_variants="server"
7828  fi
7829
7830  JVM_VARIANTS=",$with_jvm_variants,"
7831  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7832
7833  if test "x$TEST_VARIANTS" != "x,"; then
7834    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7835  fi
7836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7837$as_echo "$with_jvm_variants" >&6; }
7838
7839  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7840  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7841  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7842  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7843  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7844  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7845
7846  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7847    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7848      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7849    fi
7850  fi
7851  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7852    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7853      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7854    fi
7855  fi
7856  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7857    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7858      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7859    fi
7860  fi
7861
7862  # Replace the commas with AND for use in the build directory name.
7863  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7864  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/'`
7865  if test "x$COUNT_VARIANTS" != "x,1"; then
7866    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7867  else
7868    BUILDING_MULTIPLE_JVM_VARIANTS=no
7869  fi
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879  INCLUDE_SA=true
7880  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7881    INCLUDE_SA=false
7882  fi
7883  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7884    INCLUDE_SA=false
7885  fi
7886
7887
7888  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7889    MACOSX_UNIVERSAL="true"
7890  fi
7891
7892
7893
7894
7895  ###############################################################################
7896  #
7897  # Set the debug level
7898  #    release: no debug information, all optimizations, no asserts.
7899  #    fastdebug: debug information (-g), all optimizations, all asserts
7900  #    slowdebug: debug information (-g), no optimizations, all asserts
7901  #
7902  DEBUG_LEVEL="release"
7903  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7904$as_echo_n "checking which debug level to use... " >&6; }
7905  # Check whether --enable-debug was given.
7906if test "${enable_debug+set}" = set; then :
7907  enableval=$enable_debug;
7908        ENABLE_DEBUG="${enableval}"
7909        DEBUG_LEVEL="fastdebug"
7910
7911else
7912  ENABLE_DEBUG="no"
7913fi
7914
7915
7916
7917# Check whether --with-debug-level was given.
7918if test "${with_debug_level+set}" = set; then :
7919  withval=$with_debug_level;
7920        DEBUG_LEVEL="${withval}"
7921        if test "x$ENABLE_DEBUG" = xyes; then
7922          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7923        fi
7924
7925fi
7926
7927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7928$as_echo "$DEBUG_LEVEL" >&6; }
7929
7930  if test "x$DEBUG_LEVEL" != xrelease && \
7931      test "x$DEBUG_LEVEL" != xfastdebug && \
7932      test "x$DEBUG_LEVEL" != xslowdebug; then
7933    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7934  fi
7935
7936
7937  ###############################################################################
7938  #
7939  # Setup legacy vars/targets and new vars to deal with different debug levels.
7940  #
7941
7942  case $DEBUG_LEVEL in
7943    release )
7944      VARIANT="OPT"
7945      FASTDEBUG="false"
7946      DEBUG_CLASSFILES="false"
7947      BUILD_VARIANT_RELEASE=""
7948      HOTSPOT_DEBUG_LEVEL="product"
7949      HOTSPOT_EXPORT="product"
7950      ;;
7951    fastdebug )
7952      VARIANT="DBG"
7953      FASTDEBUG="true"
7954      DEBUG_CLASSFILES="true"
7955      BUILD_VARIANT_RELEASE="-fastdebug"
7956      HOTSPOT_DEBUG_LEVEL="fastdebug"
7957      HOTSPOT_EXPORT="fastdebug"
7958      ;;
7959    slowdebug )
7960      VARIANT="DBG"
7961      FASTDEBUG="false"
7962      DEBUG_CLASSFILES="true"
7963      BUILD_VARIANT_RELEASE="-debug"
7964      HOTSPOT_DEBUG_LEVEL="jvmg"
7965      HOTSPOT_EXPORT="debug"
7966      ;;
7967  esac
7968
7969  #####
7970  # Generate the legacy makefile targets for hotspot.
7971  # The hotspot api for selecting the build artifacts, really, needs to be improved.
7972  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7973  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7974  # But until then ...
7975  HOTSPOT_TARGET=""
7976
7977  if test "x$JVM_VARIANT_SERVER" = xtrue; then
7978    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7979  fi
7980
7981  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7982    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7983  fi
7984
7985  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7986    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7987  fi
7988
7989  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7990    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7991  fi
7992
7993  if test "x$JVM_VARIANT_ZERO" = xtrue; then
7994    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7995  fi
7996
7997  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7998    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7999  fi
8000
8001  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8002
8003  # On Macosx universal binaries are produced, but they only contain
8004  # 64 bit intel. This invalidates control of which jvms are built
8005  # from configure, but only server is valid anyway. Fix this
8006  # when hotspot makefiles are rewritten.
8007  if test "x$MACOSX_UNIVERSAL" = xtrue; then
8008    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8009  fi
8010
8011  #####
8012
8013
8014
8015
8016
8017
8018
8019
8020# With basic setup done, call the custom early hook.
8021
8022
8023# To properly create a configuration name, we need to have the OpenJDK target
8024# and options (variants and debug level) parsed.
8025
8026
8027
8028# Check whether --with-conf-name was given.
8029if test "${with_conf_name+set}" = set; then :
8030  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8031fi
8032
8033
8034  # Test from where we are running configure, in or outside of src root.
8035  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8036      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8037      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8038    # We are running configure from the src root.
8039    # Create a default ./build/target-variant-debuglevel output root.
8040    if test "x${CONF_NAME}" = x; then
8041      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8042    fi
8043    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8044    $MKDIR -p "$OUTPUT_ROOT"
8045    if test ! -d "$OUTPUT_ROOT"; then
8046      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8047    fi
8048  else
8049    # We are running configure from outside of the src dir.
8050    # Then use the current directory as output dir!
8051    # If configuration is situated in normal build directory, just use the build
8052    # directory name as configuration name, otherwise use the complete path.
8053    if test "x${CONF_NAME}" = x; then
8054      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8055    fi
8056    OUTPUT_ROOT="$CURDIR"
8057
8058    # WARNING: This might be a bad thing to do. You need to be sure you want to
8059    # have a configuration in this directory. Do some sanity checks!
8060
8061    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8062      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8063      # other files
8064      files_present=`$LS $OUTPUT_ROOT`
8065      # Configure has already touched config.log and confdefs.h in the current dir when this check
8066      # is performed.
8067      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8068      | $TR -d '\n'`
8069      if test "x$filtered_files" != x; then
8070        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8071$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8073$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8074        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8075$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8076        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8077$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8078        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8079$as_echo "$as_me: seriously mess up just about everything." >&6;}
8080        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8081$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8082        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8083$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8084        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8085      fi
8086    fi
8087  fi
8088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8089$as_echo_n "checking what configuration name to use... " >&6; }
8090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8091$as_echo "$CONF_NAME" >&6; }
8092
8093
8094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8095
8096  # Input might be given as Windows format, start by converting to
8097  # unix format.
8098  path="$OUTPUT_ROOT"
8099  new_path=`$CYGPATH -u "$path"`
8100
8101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8104  # "foo.exe" is OK but "foo" is an error.
8105  #
8106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8107  # It is also a way to make sure we got the proper file name for the real test later on.
8108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8109  if test "x$test_shortpath" = x; then
8110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8111$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8112    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8113  fi
8114
8115  # Call helper function which possibly converts this using DOS-style short mode.
8116  # If so, the updated path is stored in $new_path.
8117
8118  input_path="$new_path"
8119  # Check if we need to convert this using DOS-style short mode. If the path
8120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8121  # take no chances and rewrite it.
8122  # Note: m4 eats our [], so we need to use [ and ] instead.
8123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8124  if test "x$has_forbidden_chars" != x; then
8125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8129      # Going to short mode and back again did indeed matter. Since short mode is
8130      # case insensitive, let's make it lowercase to improve readability.
8131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8132      # Now convert it back to Unix-stile (cygpath)
8133      input_path=`$CYGPATH -u "$shortmode_path"`
8134      new_path="$input_path"
8135    fi
8136  fi
8137
8138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8139  if test "x$test_cygdrive_prefix" = x; then
8140    # As a simple fix, exclude /usr/bin since it's not a real path.
8141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8143      # a path prefixed by /cygdrive for fixpath to work.
8144      new_path="$CYGWIN_ROOT_PATH$input_path"
8145    fi
8146  fi
8147
8148
8149  if test "x$path" != "x$new_path"; then
8150    OUTPUT_ROOT="$new_path"
8151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8152$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8153  fi
8154
8155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8156
8157  path="$OUTPUT_ROOT"
8158  has_colon=`$ECHO $path | $GREP ^.:`
8159  new_path="$path"
8160  if test "x$has_colon" = x; then
8161    # Not in mixed or Windows style, start by that.
8162    new_path=`cmd //c echo $path`
8163  fi
8164
8165
8166  input_path="$new_path"
8167  # Check if we need to convert this using DOS-style short mode. If the path
8168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8169  # take no chances and rewrite it.
8170  # Note: m4 eats our [], so we need to use [ and ] instead.
8171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8172  if test "x$has_forbidden_chars" != x; then
8173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8175  fi
8176
8177
8178  windows_path="$new_path"
8179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8180    unix_path=`$CYGPATH -u "$windows_path"`
8181    new_path="$unix_path"
8182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8184    new_path="$unix_path"
8185  fi
8186
8187  if test "x$path" != "x$new_path"; then
8188    OUTPUT_ROOT="$new_path"
8189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8190$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8191  fi
8192
8193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8195
8196  else
8197    # We're on a posix platform. Hooray! :)
8198    path="$OUTPUT_ROOT"
8199    has_space=`$ECHO "$path" | $GREP " "`
8200    if test "x$has_space" != x; then
8201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8202$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8203      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8204    fi
8205
8206    # Use eval to expand a potential ~
8207    eval path="$path"
8208    if test ! -f "$path" && test ! -d "$path"; then
8209      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8210    fi
8211
8212    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8213  fi
8214
8215
8216  SPEC=$OUTPUT_ROOT/spec.gmk
8217
8218  CONF_NAME=$CONF_NAME
8219
8220  OUTPUT_ROOT=$OUTPUT_ROOT
8221
8222
8223  # Most of the probed defines are put into config.h
8224  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8225
8226  # The spec.gmk file contains all variables for the make system.
8227  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8228
8229  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8230  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8231
8232  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8233  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8234
8235  # The compare.sh is used to compare the build output to other builds.
8236  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8237
8238  # Spec.sh is currently used by compare-objects.sh
8239  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8240
8241  # The generated Makefile knows where the spec.gmk is and where the source is.
8242  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8243  # which will look for generated configurations
8244  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8245
8246
8247  # Save the arguments given to us
8248  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8249
8250
8251# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8252
8253  for ac_prog in apt-get yum port pkgutil pkgadd
8254do
8255  # Extract the first word of "$ac_prog", so it can be a program name with args.
8256set dummy $ac_prog; ac_word=$2
8257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8258$as_echo_n "checking for $ac_word... " >&6; }
8259if ${ac_cv_prog_PKGHANDLER+:} false; then :
8260  $as_echo_n "(cached) " >&6
8261else
8262  if test -n "$PKGHANDLER"; then
8263  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8264else
8265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8266for as_dir in $PATH
8267do
8268  IFS=$as_save_IFS
8269  test -z "$as_dir" && as_dir=.
8270    for ac_exec_ext in '' $ac_executable_extensions; do
8271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8272    ac_cv_prog_PKGHANDLER="$ac_prog"
8273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8274    break 2
8275  fi
8276done
8277  done
8278IFS=$as_save_IFS
8279
8280fi
8281fi
8282PKGHANDLER=$ac_cv_prog_PKGHANDLER
8283if test -n "$PKGHANDLER"; then
8284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8285$as_echo "$PKGHANDLER" >&6; }
8286else
8287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8288$as_echo "no" >&6; }
8289fi
8290
8291
8292  test -n "$PKGHANDLER" && break
8293done
8294
8295
8296
8297# Setup tools that requires more complex handling, or that is not needed by the configure script.
8298
8299
8300  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8301  if test "x$MAKE" != x; then
8302    # User has supplied a make, test it.
8303    if test ! -f "$MAKE"; then
8304      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8305    fi
8306
8307  MAKE_CANDIDATE=""$MAKE""
8308  DESCRIPTION="user supplied MAKE=$MAKE"
8309  if test "x$MAKE_CANDIDATE" != x; then
8310    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8311$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8312    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8313    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8314    if test "x$IS_GNU_MAKE" = x; then
8315      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8316$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8317    else
8318      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8319      if test "x$IS_MODERN_MAKE" = x; then
8320        { $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
8321$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;}
8322      else
8323        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8324          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8325            MAKE_EXPECTED_ENV='cygwin'
8326          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8327            MAKE_EXPECTED_ENV='msys'
8328          else
8329            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8330          fi
8331          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8332          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8333        else
8334          # Not relevant for non-Windows
8335          IS_MAKE_CORRECT_ENV=true
8336        fi
8337        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8338          { $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
8339$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;}
8340        else
8341          FOUND_MAKE=$MAKE_CANDIDATE
8342
8343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8344
8345  # First separate the path from the arguments. This will split at the first
8346  # space.
8347  complete="$FOUND_MAKE"
8348  path="${complete%% *}"
8349  tmp="$complete EOL"
8350  arguments="${tmp#* }"
8351
8352  # Input might be given as Windows format, start by converting to
8353  # unix format.
8354  new_path=`$CYGPATH -u "$path"`
8355
8356  # Now try to locate executable using which
8357  new_path=`$WHICH "$new_path" 2> /dev/null`
8358  # bat and cmd files are not always considered executable in cygwin causing which
8359  # to not find them
8360  if test "x$new_path" = x \
8361      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8362      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8363    new_path=`$CYGPATH -u "$path"`
8364  fi
8365  if test "x$new_path" = x; then
8366    # Oops. Which didn't find the executable.
8367    # The splitting of arguments from the executable at a space might have been incorrect,
8368    # since paths with space are more likely in Windows. Give it another try with the whole
8369    # argument.
8370    path="$complete"
8371    arguments="EOL"
8372    new_path=`$CYGPATH -u "$path"`
8373    new_path=`$WHICH "$new_path" 2> /dev/null`
8374    # bat and cmd files are not always considered executable in cygwin causing which
8375    # to not find them
8376    if test "x$new_path" = x \
8377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8379      new_path=`$CYGPATH -u "$path"`
8380    fi
8381    if test "x$new_path" = x; then
8382      # It's still not found. Now this is an unrecoverable error.
8383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8384$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8385      has_space=`$ECHO "$complete" | $GREP " "`
8386      if test "x$has_space" != x; then
8387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8389      fi
8390      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8391    fi
8392  fi
8393
8394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8397  # "foo.exe" is OK but "foo" is an error.
8398  #
8399  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8400  # It is also a way to make sure we got the proper file name for the real test later on.
8401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8402  if test "x$test_shortpath" = x; then
8403    # Short path failed, file does not exist as specified.
8404    # Try adding .exe or .cmd
8405    if test -f "${new_path}.exe"; then
8406      input_to_shortpath="${new_path}.exe"
8407    elif test -f "${new_path}.cmd"; then
8408      input_to_shortpath="${new_path}.cmd"
8409    else
8410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8412      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8413$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8414      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8415    fi
8416  else
8417    input_to_shortpath="$new_path"
8418  fi
8419
8420  # Call helper function which possibly converts this using DOS-style short mode.
8421  # If so, the updated path is stored in $new_path.
8422  new_path="$input_to_shortpath"
8423
8424  input_path="$input_to_shortpath"
8425  # Check if we need to convert this using DOS-style short mode. If the path
8426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8427  # take no chances and rewrite it.
8428  # Note: m4 eats our [], so we need to use [ and ] instead.
8429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8430  if test "x$has_forbidden_chars" != x; then
8431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8435      # Going to short mode and back again did indeed matter. Since short mode is
8436      # case insensitive, let's make it lowercase to improve readability.
8437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8438      # Now convert it back to Unix-stile (cygpath)
8439      input_path=`$CYGPATH -u "$shortmode_path"`
8440      new_path="$input_path"
8441    fi
8442  fi
8443
8444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8445  if test "x$test_cygdrive_prefix" = x; then
8446    # As a simple fix, exclude /usr/bin since it's not a real path.
8447    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8449      # a path prefixed by /cygdrive for fixpath to work.
8450      new_path="$CYGWIN_ROOT_PATH$input_path"
8451    fi
8452  fi
8453
8454  # remove trailing .exe if any
8455  new_path="${new_path/%.exe/}"
8456
8457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8458
8459  # First separate the path from the arguments. This will split at the first
8460  # space.
8461  complete="$FOUND_MAKE"
8462  path="${complete%% *}"
8463  tmp="$complete EOL"
8464  arguments="${tmp#* }"
8465
8466  # Input might be given as Windows format, start by converting to
8467  # unix format.
8468  new_path="$path"
8469
8470  windows_path="$new_path"
8471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8472    unix_path=`$CYGPATH -u "$windows_path"`
8473    new_path="$unix_path"
8474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8476    new_path="$unix_path"
8477  fi
8478
8479
8480  # Now try to locate executable using which
8481  new_path=`$WHICH "$new_path" 2> /dev/null`
8482
8483  if test "x$new_path" = x; then
8484    # Oops. Which didn't find the executable.
8485    # The splitting of arguments from the executable at a space might have been incorrect,
8486    # since paths with space are more likely in Windows. Give it another try with the whole
8487    # argument.
8488    path="$complete"
8489    arguments="EOL"
8490    new_path="$path"
8491
8492  windows_path="$new_path"
8493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8494    unix_path=`$CYGPATH -u "$windows_path"`
8495    new_path="$unix_path"
8496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8498    new_path="$unix_path"
8499  fi
8500
8501
8502    new_path=`$WHICH "$new_path" 2> /dev/null`
8503
8504    if test "x$new_path" = x; then
8505      # It's still not found. Now this is an unrecoverable error.
8506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8507$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8508      has_space=`$ECHO "$complete" | $GREP " "`
8509      if test "x$has_space" != x; then
8510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8512      fi
8513      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8514    fi
8515  fi
8516
8517  # Now new_path has a complete unix path to the binary
8518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8519    # Keep paths in /bin as-is, but remove trailing .exe if any
8520    new_path="${new_path/%.exe/}"
8521    # Do not save /bin paths to all_fixpath_prefixes!
8522  else
8523    # Not in mixed or Windows style, start by that.
8524    new_path=`cmd //c echo $new_path`
8525
8526  input_path="$new_path"
8527  # Check if we need to convert this using DOS-style short mode. If the path
8528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8529  # take no chances and rewrite it.
8530  # Note: m4 eats our [], so we need to use [ and ] instead.
8531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8532  if test "x$has_forbidden_chars" != x; then
8533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8535  fi
8536
8537    # Output is in $new_path
8538
8539  windows_path="$new_path"
8540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8541    unix_path=`$CYGPATH -u "$windows_path"`
8542    new_path="$unix_path"
8543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8545    new_path="$unix_path"
8546  fi
8547
8548    # remove trailing .exe if any
8549    new_path="${new_path/%.exe/}"
8550
8551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8553  fi
8554
8555  else
8556    # We're on a posix platform. Hooray! :)
8557    # First separate the path from the arguments. This will split at the first
8558    # space.
8559    complete="$FOUND_MAKE"
8560    path="${complete%% *}"
8561    tmp="$complete EOL"
8562    arguments="${tmp#* }"
8563
8564    # Cannot rely on the command "which" here since it doesn't always work.
8565    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8566    if test -z "$is_absolute_path"; then
8567      # Path to executable is not absolute. Find it.
8568      IFS_save="$IFS"
8569      IFS=:
8570      for p in $PATH; do
8571        if test -f "$p/$path" && test -x "$p/$path"; then
8572          new_path="$p/$path"
8573          break
8574        fi
8575      done
8576      IFS="$IFS_save"
8577    else
8578      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8579$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8580      new_path="$path"
8581    fi
8582
8583    if test "x$new_path" = x; then
8584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8585$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8586      has_space=`$ECHO "$complete" | $GREP " "`
8587      if test "x$has_space" != x; then
8588        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8589$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8590      fi
8591      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8592    fi
8593  fi
8594
8595  # Now join together the path and the arguments once again
8596  if test "x$arguments" != xEOL; then
8597    new_complete="$new_path ${arguments% *}"
8598  else
8599    new_complete="$new_path"
8600  fi
8601
8602  if test "x$complete" != "x$new_complete"; then
8603    FOUND_MAKE="$new_complete"
8604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8605$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8606  fi
8607
8608        fi
8609      fi
8610    fi
8611  fi
8612
8613    if test "x$FOUND_MAKE" = x; then
8614      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8615    fi
8616  else
8617    # Try our hardest to locate a correct version of GNU make
8618    for ac_prog in gmake
8619do
8620  # Extract the first word of "$ac_prog", so it can be a program name with args.
8621set dummy $ac_prog; ac_word=$2
8622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8623$as_echo_n "checking for $ac_word... " >&6; }
8624if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8625  $as_echo_n "(cached) " >&6
8626else
8627  case $CHECK_GMAKE in
8628  [\\/]* | ?:[\\/]*)
8629  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8630  ;;
8631  *)
8632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8633for as_dir in $PATH
8634do
8635  IFS=$as_save_IFS
8636  test -z "$as_dir" && as_dir=.
8637    for ac_exec_ext in '' $ac_executable_extensions; do
8638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8639    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8641    break 2
8642  fi
8643done
8644  done
8645IFS=$as_save_IFS
8646
8647  ;;
8648esac
8649fi
8650CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8651if test -n "$CHECK_GMAKE"; then
8652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8653$as_echo "$CHECK_GMAKE" >&6; }
8654else
8655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8656$as_echo "no" >&6; }
8657fi
8658
8659
8660  test -n "$CHECK_GMAKE" && break
8661done
8662
8663
8664  MAKE_CANDIDATE=""$CHECK_GMAKE""
8665  DESCRIPTION="gmake in PATH"
8666  if test "x$MAKE_CANDIDATE" != x; then
8667    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8668$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8669    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8670    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8671    if test "x$IS_GNU_MAKE" = x; then
8672      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8673$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8674    else
8675      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8676      if test "x$IS_MODERN_MAKE" = x; then
8677        { $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
8678$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;}
8679      else
8680        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8681          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8682            MAKE_EXPECTED_ENV='cygwin'
8683          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8684            MAKE_EXPECTED_ENV='msys'
8685          else
8686            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8687          fi
8688          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8689          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8690        else
8691          # Not relevant for non-Windows
8692          IS_MAKE_CORRECT_ENV=true
8693        fi
8694        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8695          { $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
8696$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;}
8697        else
8698          FOUND_MAKE=$MAKE_CANDIDATE
8699
8700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8701
8702  # First separate the path from the arguments. This will split at the first
8703  # space.
8704  complete="$FOUND_MAKE"
8705  path="${complete%% *}"
8706  tmp="$complete EOL"
8707  arguments="${tmp#* }"
8708
8709  # Input might be given as Windows format, start by converting to
8710  # unix format.
8711  new_path=`$CYGPATH -u "$path"`
8712
8713  # Now try to locate executable using which
8714  new_path=`$WHICH "$new_path" 2> /dev/null`
8715  # bat and cmd files are not always considered executable in cygwin causing which
8716  # to not find them
8717  if test "x$new_path" = x \
8718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8720    new_path=`$CYGPATH -u "$path"`
8721  fi
8722  if test "x$new_path" = x; then
8723    # Oops. Which didn't find the executable.
8724    # The splitting of arguments from the executable at a space might have been incorrect,
8725    # since paths with space are more likely in Windows. Give it another try with the whole
8726    # argument.
8727    path="$complete"
8728    arguments="EOL"
8729    new_path=`$CYGPATH -u "$path"`
8730    new_path=`$WHICH "$new_path" 2> /dev/null`
8731    # bat and cmd files are not always considered executable in cygwin causing which
8732    # to not find them
8733    if test "x$new_path" = x \
8734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8736      new_path=`$CYGPATH -u "$path"`
8737    fi
8738    if test "x$new_path" = x; then
8739      # It's still not found. Now this is an unrecoverable error.
8740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8741$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8742      has_space=`$ECHO "$complete" | $GREP " "`
8743      if test "x$has_space" != x; then
8744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8746      fi
8747      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8748    fi
8749  fi
8750
8751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8754  # "foo.exe" is OK but "foo" is an error.
8755  #
8756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8757  # It is also a way to make sure we got the proper file name for the real test later on.
8758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8759  if test "x$test_shortpath" = x; then
8760    # Short path failed, file does not exist as specified.
8761    # Try adding .exe or .cmd
8762    if test -f "${new_path}.exe"; then
8763      input_to_shortpath="${new_path}.exe"
8764    elif test -f "${new_path}.cmd"; then
8765      input_to_shortpath="${new_path}.cmd"
8766    else
8767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8768$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8772    fi
8773  else
8774    input_to_shortpath="$new_path"
8775  fi
8776
8777  # Call helper function which possibly converts this using DOS-style short mode.
8778  # If so, the updated path is stored in $new_path.
8779  new_path="$input_to_shortpath"
8780
8781  input_path="$input_to_shortpath"
8782  # Check if we need to convert this using DOS-style short mode. If the path
8783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8784  # take no chances and rewrite it.
8785  # Note: m4 eats our [], so we need to use [ and ] instead.
8786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8787  if test "x$has_forbidden_chars" != x; then
8788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8792      # Going to short mode and back again did indeed matter. Since short mode is
8793      # case insensitive, let's make it lowercase to improve readability.
8794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8795      # Now convert it back to Unix-stile (cygpath)
8796      input_path=`$CYGPATH -u "$shortmode_path"`
8797      new_path="$input_path"
8798    fi
8799  fi
8800
8801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8802  if test "x$test_cygdrive_prefix" = x; then
8803    # As a simple fix, exclude /usr/bin since it's not a real path.
8804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8806      # a path prefixed by /cygdrive for fixpath to work.
8807      new_path="$CYGWIN_ROOT_PATH$input_path"
8808    fi
8809  fi
8810
8811  # remove trailing .exe if any
8812  new_path="${new_path/%.exe/}"
8813
8814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8815
8816  # First separate the path from the arguments. This will split at the first
8817  # space.
8818  complete="$FOUND_MAKE"
8819  path="${complete%% *}"
8820  tmp="$complete EOL"
8821  arguments="${tmp#* }"
8822
8823  # Input might be given as Windows format, start by converting to
8824  # unix format.
8825  new_path="$path"
8826
8827  windows_path="$new_path"
8828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8829    unix_path=`$CYGPATH -u "$windows_path"`
8830    new_path="$unix_path"
8831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8833    new_path="$unix_path"
8834  fi
8835
8836
8837  # Now try to locate executable using which
8838  new_path=`$WHICH "$new_path" 2> /dev/null`
8839
8840  if test "x$new_path" = x; then
8841    # Oops. Which didn't find the executable.
8842    # The splitting of arguments from the executable at a space might have been incorrect,
8843    # since paths with space are more likely in Windows. Give it another try with the whole
8844    # argument.
8845    path="$complete"
8846    arguments="EOL"
8847    new_path="$path"
8848
8849  windows_path="$new_path"
8850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8851    unix_path=`$CYGPATH -u "$windows_path"`
8852    new_path="$unix_path"
8853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8855    new_path="$unix_path"
8856  fi
8857
8858
8859    new_path=`$WHICH "$new_path" 2> /dev/null`
8860
8861    if test "x$new_path" = x; then
8862      # It's still not found. Now this is an unrecoverable error.
8863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8864$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8865      has_space=`$ECHO "$complete" | $GREP " "`
8866      if test "x$has_space" != x; then
8867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8869      fi
8870      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8871    fi
8872  fi
8873
8874  # Now new_path has a complete unix path to the binary
8875  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8876    # Keep paths in /bin as-is, but remove trailing .exe if any
8877    new_path="${new_path/%.exe/}"
8878    # Do not save /bin paths to all_fixpath_prefixes!
8879  else
8880    # Not in mixed or Windows style, start by that.
8881    new_path=`cmd //c echo $new_path`
8882
8883  input_path="$new_path"
8884  # Check if we need to convert this using DOS-style short mode. If the path
8885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8886  # take no chances and rewrite it.
8887  # Note: m4 eats our [], so we need to use [ and ] instead.
8888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8889  if test "x$has_forbidden_chars" != x; then
8890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8892  fi
8893
8894    # Output is in $new_path
8895
8896  windows_path="$new_path"
8897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8898    unix_path=`$CYGPATH -u "$windows_path"`
8899    new_path="$unix_path"
8900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8902    new_path="$unix_path"
8903  fi
8904
8905    # remove trailing .exe if any
8906    new_path="${new_path/%.exe/}"
8907
8908    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8909    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8910  fi
8911
8912  else
8913    # We're on a posix platform. Hooray! :)
8914    # First separate the path from the arguments. This will split at the first
8915    # space.
8916    complete="$FOUND_MAKE"
8917    path="${complete%% *}"
8918    tmp="$complete EOL"
8919    arguments="${tmp#* }"
8920
8921    # Cannot rely on the command "which" here since it doesn't always work.
8922    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8923    if test -z "$is_absolute_path"; then
8924      # Path to executable is not absolute. Find it.
8925      IFS_save="$IFS"
8926      IFS=:
8927      for p in $PATH; do
8928        if test -f "$p/$path" && test -x "$p/$path"; then
8929          new_path="$p/$path"
8930          break
8931        fi
8932      done
8933      IFS="$IFS_save"
8934    else
8935      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8936$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8937      new_path="$path"
8938    fi
8939
8940    if test "x$new_path" = x; then
8941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8942$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8943      has_space=`$ECHO "$complete" | $GREP " "`
8944      if test "x$has_space" != x; then
8945        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8947      fi
8948      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8949    fi
8950  fi
8951
8952  # Now join together the path and the arguments once again
8953  if test "x$arguments" != xEOL; then
8954    new_complete="$new_path ${arguments% *}"
8955  else
8956    new_complete="$new_path"
8957  fi
8958
8959  if test "x$complete" != "x$new_complete"; then
8960    FOUND_MAKE="$new_complete"
8961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8962$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8963  fi
8964
8965        fi
8966      fi
8967    fi
8968  fi
8969
8970
8971    if test "x$FOUND_MAKE" = x; then
8972      for ac_prog in make
8973do
8974  # Extract the first word of "$ac_prog", so it can be a program name with args.
8975set dummy $ac_prog; ac_word=$2
8976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8977$as_echo_n "checking for $ac_word... " >&6; }
8978if ${ac_cv_path_CHECK_MAKE+:} false; then :
8979  $as_echo_n "(cached) " >&6
8980else
8981  case $CHECK_MAKE in
8982  [\\/]* | ?:[\\/]*)
8983  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8984  ;;
8985  *)
8986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8987for as_dir in $PATH
8988do
8989  IFS=$as_save_IFS
8990  test -z "$as_dir" && as_dir=.
8991    for ac_exec_ext in '' $ac_executable_extensions; do
8992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8993    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8995    break 2
8996  fi
8997done
8998  done
8999IFS=$as_save_IFS
9000
9001  ;;
9002esac
9003fi
9004CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9005if test -n "$CHECK_MAKE"; then
9006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9007$as_echo "$CHECK_MAKE" >&6; }
9008else
9009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9010$as_echo "no" >&6; }
9011fi
9012
9013
9014  test -n "$CHECK_MAKE" && break
9015done
9016
9017
9018  MAKE_CANDIDATE=""$CHECK_MAKE""
9019  DESCRIPTION="make in PATH"
9020  if test "x$MAKE_CANDIDATE" != x; then
9021    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9022$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9023    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9024    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9025    if test "x$IS_GNU_MAKE" = x; then
9026      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9027$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9028    else
9029      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9030      if test "x$IS_MODERN_MAKE" = x; then
9031        { $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
9032$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;}
9033      else
9034        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9035          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9036            MAKE_EXPECTED_ENV='cygwin'
9037          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9038            MAKE_EXPECTED_ENV='msys'
9039          else
9040            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9041          fi
9042          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9043          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9044        else
9045          # Not relevant for non-Windows
9046          IS_MAKE_CORRECT_ENV=true
9047        fi
9048        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9049          { $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
9050$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;}
9051        else
9052          FOUND_MAKE=$MAKE_CANDIDATE
9053
9054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9055
9056  # First separate the path from the arguments. This will split at the first
9057  # space.
9058  complete="$FOUND_MAKE"
9059  path="${complete%% *}"
9060  tmp="$complete EOL"
9061  arguments="${tmp#* }"
9062
9063  # Input might be given as Windows format, start by converting to
9064  # unix format.
9065  new_path=`$CYGPATH -u "$path"`
9066
9067  # Now try to locate executable using which
9068  new_path=`$WHICH "$new_path" 2> /dev/null`
9069  # bat and cmd files are not always considered executable in cygwin causing which
9070  # to not find them
9071  if test "x$new_path" = x \
9072      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9073      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9074    new_path=`$CYGPATH -u "$path"`
9075  fi
9076  if test "x$new_path" = x; then
9077    # Oops. Which didn't find the executable.
9078    # The splitting of arguments from the executable at a space might have been incorrect,
9079    # since paths with space are more likely in Windows. Give it another try with the whole
9080    # argument.
9081    path="$complete"
9082    arguments="EOL"
9083    new_path=`$CYGPATH -u "$path"`
9084    new_path=`$WHICH "$new_path" 2> /dev/null`
9085    # bat and cmd files are not always considered executable in cygwin causing which
9086    # to not find them
9087    if test "x$new_path" = x \
9088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9090      new_path=`$CYGPATH -u "$path"`
9091    fi
9092    if test "x$new_path" = x; then
9093      # It's still not found. Now this is an unrecoverable error.
9094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9095$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9096      has_space=`$ECHO "$complete" | $GREP " "`
9097      if test "x$has_space" != x; then
9098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9100      fi
9101      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9102    fi
9103  fi
9104
9105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9108  # "foo.exe" is OK but "foo" is an error.
9109  #
9110  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9111  # It is also a way to make sure we got the proper file name for the real test later on.
9112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9113  if test "x$test_shortpath" = x; then
9114    # Short path failed, file does not exist as specified.
9115    # Try adding .exe or .cmd
9116    if test -f "${new_path}.exe"; then
9117      input_to_shortpath="${new_path}.exe"
9118    elif test -f "${new_path}.cmd"; then
9119      input_to_shortpath="${new_path}.cmd"
9120    else
9121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9122$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9123      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9124$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9125      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9126    fi
9127  else
9128    input_to_shortpath="$new_path"
9129  fi
9130
9131  # Call helper function which possibly converts this using DOS-style short mode.
9132  # If so, the updated path is stored in $new_path.
9133  new_path="$input_to_shortpath"
9134
9135  input_path="$input_to_shortpath"
9136  # Check if we need to convert this using DOS-style short mode. If the path
9137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9138  # take no chances and rewrite it.
9139  # Note: m4 eats our [], so we need to use [ and ] instead.
9140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9141  if test "x$has_forbidden_chars" != x; then
9142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9146      # Going to short mode and back again did indeed matter. Since short mode is
9147      # case insensitive, let's make it lowercase to improve readability.
9148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9149      # Now convert it back to Unix-stile (cygpath)
9150      input_path=`$CYGPATH -u "$shortmode_path"`
9151      new_path="$input_path"
9152    fi
9153  fi
9154
9155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9156  if test "x$test_cygdrive_prefix" = x; then
9157    # As a simple fix, exclude /usr/bin since it's not a real path.
9158    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9160      # a path prefixed by /cygdrive for fixpath to work.
9161      new_path="$CYGWIN_ROOT_PATH$input_path"
9162    fi
9163  fi
9164
9165  # remove trailing .exe if any
9166  new_path="${new_path/%.exe/}"
9167
9168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9169
9170  # First separate the path from the arguments. This will split at the first
9171  # space.
9172  complete="$FOUND_MAKE"
9173  path="${complete%% *}"
9174  tmp="$complete EOL"
9175  arguments="${tmp#* }"
9176
9177  # Input might be given as Windows format, start by converting to
9178  # unix format.
9179  new_path="$path"
9180
9181  windows_path="$new_path"
9182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9183    unix_path=`$CYGPATH -u "$windows_path"`
9184    new_path="$unix_path"
9185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9187    new_path="$unix_path"
9188  fi
9189
9190
9191  # Now try to locate executable using which
9192  new_path=`$WHICH "$new_path" 2> /dev/null`
9193
9194  if test "x$new_path" = x; then
9195    # Oops. Which didn't find the executable.
9196    # The splitting of arguments from the executable at a space might have been incorrect,
9197    # since paths with space are more likely in Windows. Give it another try with the whole
9198    # argument.
9199    path="$complete"
9200    arguments="EOL"
9201    new_path="$path"
9202
9203  windows_path="$new_path"
9204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9205    unix_path=`$CYGPATH -u "$windows_path"`
9206    new_path="$unix_path"
9207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9209    new_path="$unix_path"
9210  fi
9211
9212
9213    new_path=`$WHICH "$new_path" 2> /dev/null`
9214
9215    if test "x$new_path" = x; then
9216      # It's still not found. Now this is an unrecoverable error.
9217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9218$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9219      has_space=`$ECHO "$complete" | $GREP " "`
9220      if test "x$has_space" != x; then
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9223      fi
9224      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9225    fi
9226  fi
9227
9228  # Now new_path has a complete unix path to the binary
9229  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9230    # Keep paths in /bin as-is, but remove trailing .exe if any
9231    new_path="${new_path/%.exe/}"
9232    # Do not save /bin paths to all_fixpath_prefixes!
9233  else
9234    # Not in mixed or Windows style, start by that.
9235    new_path=`cmd //c echo $new_path`
9236
9237  input_path="$new_path"
9238  # Check if we need to convert this using DOS-style short mode. If the path
9239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9240  # take no chances and rewrite it.
9241  # Note: m4 eats our [], so we need to use [ and ] instead.
9242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9243  if test "x$has_forbidden_chars" != x; then
9244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9246  fi
9247
9248    # Output is in $new_path
9249
9250  windows_path="$new_path"
9251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9252    unix_path=`$CYGPATH -u "$windows_path"`
9253    new_path="$unix_path"
9254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9256    new_path="$unix_path"
9257  fi
9258
9259    # remove trailing .exe if any
9260    new_path="${new_path/%.exe/}"
9261
9262    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9263    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9264  fi
9265
9266  else
9267    # We're on a posix platform. Hooray! :)
9268    # First separate the path from the arguments. This will split at the first
9269    # space.
9270    complete="$FOUND_MAKE"
9271    path="${complete%% *}"
9272    tmp="$complete EOL"
9273    arguments="${tmp#* }"
9274
9275    # Cannot rely on the command "which" here since it doesn't always work.
9276    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9277    if test -z "$is_absolute_path"; then
9278      # Path to executable is not absolute. Find it.
9279      IFS_save="$IFS"
9280      IFS=:
9281      for p in $PATH; do
9282        if test -f "$p/$path" && test -x "$p/$path"; then
9283          new_path="$p/$path"
9284          break
9285        fi
9286      done
9287      IFS="$IFS_save"
9288    else
9289      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9290$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9291      new_path="$path"
9292    fi
9293
9294    if test "x$new_path" = x; then
9295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9296$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9297      has_space=`$ECHO "$complete" | $GREP " "`
9298      if test "x$has_space" != x; then
9299        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9300$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9301      fi
9302      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9303    fi
9304  fi
9305
9306  # Now join together the path and the arguments once again
9307  if test "x$arguments" != xEOL; then
9308    new_complete="$new_path ${arguments% *}"
9309  else
9310    new_complete="$new_path"
9311  fi
9312
9313  if test "x$complete" != "x$new_complete"; then
9314    FOUND_MAKE="$new_complete"
9315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9316$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9317  fi
9318
9319        fi
9320      fi
9321    fi
9322  fi
9323
9324    fi
9325
9326    if test "x$FOUND_MAKE" = x; then
9327      if test "x$TOOLS_DIR" != x; then
9328        # We have a tools-dir, check that as well before giving up.
9329        OLD_PATH=$PATH
9330        PATH=$TOOLS_DIR:$PATH
9331        for ac_prog in gmake
9332do
9333  # Extract the first word of "$ac_prog", so it can be a program name with args.
9334set dummy $ac_prog; ac_word=$2
9335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9336$as_echo_n "checking for $ac_word... " >&6; }
9337if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9338  $as_echo_n "(cached) " >&6
9339else
9340  case $CHECK_TOOLSDIR_GMAKE in
9341  [\\/]* | ?:[\\/]*)
9342  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9343  ;;
9344  *)
9345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9346for as_dir in $PATH
9347do
9348  IFS=$as_save_IFS
9349  test -z "$as_dir" && as_dir=.
9350    for ac_exec_ext in '' $ac_executable_extensions; do
9351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9352    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9354    break 2
9355  fi
9356done
9357  done
9358IFS=$as_save_IFS
9359
9360  ;;
9361esac
9362fi
9363CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9364if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9366$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9367else
9368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9369$as_echo "no" >&6; }
9370fi
9371
9372
9373  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9374done
9375
9376
9377  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9378  DESCRIPTION="gmake in tools-dir"
9379  if test "x$MAKE_CANDIDATE" != x; then
9380    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9381$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9382    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9383    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9384    if test "x$IS_GNU_MAKE" = x; then
9385      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9386$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9387    else
9388      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9389      if test "x$IS_MODERN_MAKE" = x; then
9390        { $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
9391$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;}
9392      else
9393        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9394          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9395            MAKE_EXPECTED_ENV='cygwin'
9396          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9397            MAKE_EXPECTED_ENV='msys'
9398          else
9399            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9400          fi
9401          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9402          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9403        else
9404          # Not relevant for non-Windows
9405          IS_MAKE_CORRECT_ENV=true
9406        fi
9407        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9408          { $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
9409$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;}
9410        else
9411          FOUND_MAKE=$MAKE_CANDIDATE
9412
9413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9414
9415  # First separate the path from the arguments. This will split at the first
9416  # space.
9417  complete="$FOUND_MAKE"
9418  path="${complete%% *}"
9419  tmp="$complete EOL"
9420  arguments="${tmp#* }"
9421
9422  # Input might be given as Windows format, start by converting to
9423  # unix format.
9424  new_path=`$CYGPATH -u "$path"`
9425
9426  # Now try to locate executable using which
9427  new_path=`$WHICH "$new_path" 2> /dev/null`
9428  # bat and cmd files are not always considered executable in cygwin causing which
9429  # to not find them
9430  if test "x$new_path" = x \
9431      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9432      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9433    new_path=`$CYGPATH -u "$path"`
9434  fi
9435  if test "x$new_path" = x; then
9436    # Oops. Which didn't find the executable.
9437    # The splitting of arguments from the executable at a space might have been incorrect,
9438    # since paths with space are more likely in Windows. Give it another try with the whole
9439    # argument.
9440    path="$complete"
9441    arguments="EOL"
9442    new_path=`$CYGPATH -u "$path"`
9443    new_path=`$WHICH "$new_path" 2> /dev/null`
9444    # bat and cmd files are not always considered executable in cygwin causing which
9445    # to not find them
9446    if test "x$new_path" = x \
9447        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9448        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9449      new_path=`$CYGPATH -u "$path"`
9450    fi
9451    if test "x$new_path" = x; then
9452      # It's still not found. Now this is an unrecoverable error.
9453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9454$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9455      has_space=`$ECHO "$complete" | $GREP " "`
9456      if test "x$has_space" != x; then
9457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9459      fi
9460      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9461    fi
9462  fi
9463
9464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9467  # "foo.exe" is OK but "foo" is an error.
9468  #
9469  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9470  # It is also a way to make sure we got the proper file name for the real test later on.
9471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9472  if test "x$test_shortpath" = x; then
9473    # Short path failed, file does not exist as specified.
9474    # Try adding .exe or .cmd
9475    if test -f "${new_path}.exe"; then
9476      input_to_shortpath="${new_path}.exe"
9477    elif test -f "${new_path}.cmd"; then
9478      input_to_shortpath="${new_path}.cmd"
9479    else
9480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9481$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9482      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9483$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9484      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9485    fi
9486  else
9487    input_to_shortpath="$new_path"
9488  fi
9489
9490  # Call helper function which possibly converts this using DOS-style short mode.
9491  # If so, the updated path is stored in $new_path.
9492  new_path="$input_to_shortpath"
9493
9494  input_path="$input_to_shortpath"
9495  # Check if we need to convert this using DOS-style short mode. If the path
9496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9497  # take no chances and rewrite it.
9498  # Note: m4 eats our [], so we need to use [ and ] instead.
9499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9500  if test "x$has_forbidden_chars" != x; then
9501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9505      # Going to short mode and back again did indeed matter. Since short mode is
9506      # case insensitive, let's make it lowercase to improve readability.
9507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9508      # Now convert it back to Unix-stile (cygpath)
9509      input_path=`$CYGPATH -u "$shortmode_path"`
9510      new_path="$input_path"
9511    fi
9512  fi
9513
9514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9515  if test "x$test_cygdrive_prefix" = x; then
9516    # As a simple fix, exclude /usr/bin since it's not a real path.
9517    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9519      # a path prefixed by /cygdrive for fixpath to work.
9520      new_path="$CYGWIN_ROOT_PATH$input_path"
9521    fi
9522  fi
9523
9524  # remove trailing .exe if any
9525  new_path="${new_path/%.exe/}"
9526
9527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9528
9529  # First separate the path from the arguments. This will split at the first
9530  # space.
9531  complete="$FOUND_MAKE"
9532  path="${complete%% *}"
9533  tmp="$complete EOL"
9534  arguments="${tmp#* }"
9535
9536  # Input might be given as Windows format, start by converting to
9537  # unix format.
9538  new_path="$path"
9539
9540  windows_path="$new_path"
9541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9542    unix_path=`$CYGPATH -u "$windows_path"`
9543    new_path="$unix_path"
9544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9546    new_path="$unix_path"
9547  fi
9548
9549
9550  # Now try to locate executable using which
9551  new_path=`$WHICH "$new_path" 2> /dev/null`
9552
9553  if test "x$new_path" = x; then
9554    # Oops. Which didn't find the executable.
9555    # The splitting of arguments from the executable at a space might have been incorrect,
9556    # since paths with space are more likely in Windows. Give it another try with the whole
9557    # argument.
9558    path="$complete"
9559    arguments="EOL"
9560    new_path="$path"
9561
9562  windows_path="$new_path"
9563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9564    unix_path=`$CYGPATH -u "$windows_path"`
9565    new_path="$unix_path"
9566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9568    new_path="$unix_path"
9569  fi
9570
9571
9572    new_path=`$WHICH "$new_path" 2> /dev/null`
9573
9574    if test "x$new_path" = x; then
9575      # It's still not found. Now this is an unrecoverable error.
9576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9577$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9578      has_space=`$ECHO "$complete" | $GREP " "`
9579      if test "x$has_space" != x; then
9580        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9581$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9582      fi
9583      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9584    fi
9585  fi
9586
9587  # Now new_path has a complete unix path to the binary
9588  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9589    # Keep paths in /bin as-is, but remove trailing .exe if any
9590    new_path="${new_path/%.exe/}"
9591    # Do not save /bin paths to all_fixpath_prefixes!
9592  else
9593    # Not in mixed or Windows style, start by that.
9594    new_path=`cmd //c echo $new_path`
9595
9596  input_path="$new_path"
9597  # Check if we need to convert this using DOS-style short mode. If the path
9598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9599  # take no chances and rewrite it.
9600  # Note: m4 eats our [], so we need to use [ and ] instead.
9601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9602  if test "x$has_forbidden_chars" != x; then
9603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9605  fi
9606
9607    # Output is in $new_path
9608
9609  windows_path="$new_path"
9610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9611    unix_path=`$CYGPATH -u "$windows_path"`
9612    new_path="$unix_path"
9613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9615    new_path="$unix_path"
9616  fi
9617
9618    # remove trailing .exe if any
9619    new_path="${new_path/%.exe/}"
9620
9621    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9622    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9623  fi
9624
9625  else
9626    # We're on a posix platform. Hooray! :)
9627    # First separate the path from the arguments. This will split at the first
9628    # space.
9629    complete="$FOUND_MAKE"
9630    path="${complete%% *}"
9631    tmp="$complete EOL"
9632    arguments="${tmp#* }"
9633
9634    # Cannot rely on the command "which" here since it doesn't always work.
9635    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9636    if test -z "$is_absolute_path"; then
9637      # Path to executable is not absolute. Find it.
9638      IFS_save="$IFS"
9639      IFS=:
9640      for p in $PATH; do
9641        if test -f "$p/$path" && test -x "$p/$path"; then
9642          new_path="$p/$path"
9643          break
9644        fi
9645      done
9646      IFS="$IFS_save"
9647    else
9648      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9649$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9650      new_path="$path"
9651    fi
9652
9653    if test "x$new_path" = x; then
9654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9655$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9656      has_space=`$ECHO "$complete" | $GREP " "`
9657      if test "x$has_space" != x; then
9658        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9659$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9660      fi
9661      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9662    fi
9663  fi
9664
9665  # Now join together the path and the arguments once again
9666  if test "x$arguments" != xEOL; then
9667    new_complete="$new_path ${arguments% *}"
9668  else
9669    new_complete="$new_path"
9670  fi
9671
9672  if test "x$complete" != "x$new_complete"; then
9673    FOUND_MAKE="$new_complete"
9674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9675$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9676  fi
9677
9678        fi
9679      fi
9680    fi
9681  fi
9682
9683        if test "x$FOUND_MAKE" = x; then
9684          for ac_prog in make
9685do
9686  # Extract the first word of "$ac_prog", so it can be a program name with args.
9687set dummy $ac_prog; ac_word=$2
9688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9689$as_echo_n "checking for $ac_word... " >&6; }
9690if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9691  $as_echo_n "(cached) " >&6
9692else
9693  case $CHECK_TOOLSDIR_MAKE in
9694  [\\/]* | ?:[\\/]*)
9695  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9696  ;;
9697  *)
9698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9699for as_dir in $PATH
9700do
9701  IFS=$as_save_IFS
9702  test -z "$as_dir" && as_dir=.
9703    for ac_exec_ext in '' $ac_executable_extensions; do
9704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9705    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9707    break 2
9708  fi
9709done
9710  done
9711IFS=$as_save_IFS
9712
9713  ;;
9714esac
9715fi
9716CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9717if test -n "$CHECK_TOOLSDIR_MAKE"; then
9718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9719$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9720else
9721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9722$as_echo "no" >&6; }
9723fi
9724
9725
9726  test -n "$CHECK_TOOLSDIR_MAKE" && break
9727done
9728
9729
9730  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9731  DESCRIPTION="make in tools-dir"
9732  if test "x$MAKE_CANDIDATE" != x; then
9733    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9734$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9735    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9736    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9737    if test "x$IS_GNU_MAKE" = x; then
9738      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9739$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9740    else
9741      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9742      if test "x$IS_MODERN_MAKE" = x; then
9743        { $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
9744$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;}
9745      else
9746        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9747          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9748            MAKE_EXPECTED_ENV='cygwin'
9749          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9750            MAKE_EXPECTED_ENV='msys'
9751          else
9752            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9753          fi
9754          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9755          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9756        else
9757          # Not relevant for non-Windows
9758          IS_MAKE_CORRECT_ENV=true
9759        fi
9760        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9761          { $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
9762$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;}
9763        else
9764          FOUND_MAKE=$MAKE_CANDIDATE
9765
9766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9767
9768  # First separate the path from the arguments. This will split at the first
9769  # space.
9770  complete="$FOUND_MAKE"
9771  path="${complete%% *}"
9772  tmp="$complete EOL"
9773  arguments="${tmp#* }"
9774
9775  # Input might be given as Windows format, start by converting to
9776  # unix format.
9777  new_path=`$CYGPATH -u "$path"`
9778
9779  # Now try to locate executable using which
9780  new_path=`$WHICH "$new_path" 2> /dev/null`
9781  # bat and cmd files are not always considered executable in cygwin causing which
9782  # to not find them
9783  if test "x$new_path" = x \
9784      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9785      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9786    new_path=`$CYGPATH -u "$path"`
9787  fi
9788  if test "x$new_path" = x; then
9789    # Oops. Which didn't find the executable.
9790    # The splitting of arguments from the executable at a space might have been incorrect,
9791    # since paths with space are more likely in Windows. Give it another try with the whole
9792    # argument.
9793    path="$complete"
9794    arguments="EOL"
9795    new_path=`$CYGPATH -u "$path"`
9796    new_path=`$WHICH "$new_path" 2> /dev/null`
9797    # bat and cmd files are not always considered executable in cygwin causing which
9798    # to not find them
9799    if test "x$new_path" = x \
9800        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9801        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9802      new_path=`$CYGPATH -u "$path"`
9803    fi
9804    if test "x$new_path" = x; then
9805      # It's still not found. Now this is an unrecoverable error.
9806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9808      has_space=`$ECHO "$complete" | $GREP " "`
9809      if test "x$has_space" != x; then
9810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9812      fi
9813      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9814    fi
9815  fi
9816
9817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9820  # "foo.exe" is OK but "foo" is an error.
9821  #
9822  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9823  # It is also a way to make sure we got the proper file name for the real test later on.
9824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9825  if test "x$test_shortpath" = x; then
9826    # Short path failed, file does not exist as specified.
9827    # Try adding .exe or .cmd
9828    if test -f "${new_path}.exe"; then
9829      input_to_shortpath="${new_path}.exe"
9830    elif test -f "${new_path}.cmd"; then
9831      input_to_shortpath="${new_path}.cmd"
9832    else
9833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9834$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9835      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9836$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9837      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9838    fi
9839  else
9840    input_to_shortpath="$new_path"
9841  fi
9842
9843  # Call helper function which possibly converts this using DOS-style short mode.
9844  # If so, the updated path is stored in $new_path.
9845  new_path="$input_to_shortpath"
9846
9847  input_path="$input_to_shortpath"
9848  # Check if we need to convert this using DOS-style short mode. If the path
9849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9850  # take no chances and rewrite it.
9851  # Note: m4 eats our [], so we need to use [ and ] instead.
9852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9853  if test "x$has_forbidden_chars" != x; then
9854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9858      # Going to short mode and back again did indeed matter. Since short mode is
9859      # case insensitive, let's make it lowercase to improve readability.
9860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9861      # Now convert it back to Unix-stile (cygpath)
9862      input_path=`$CYGPATH -u "$shortmode_path"`
9863      new_path="$input_path"
9864    fi
9865  fi
9866
9867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9868  if test "x$test_cygdrive_prefix" = x; then
9869    # As a simple fix, exclude /usr/bin since it's not a real path.
9870    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9872      # a path prefixed by /cygdrive for fixpath to work.
9873      new_path="$CYGWIN_ROOT_PATH$input_path"
9874    fi
9875  fi
9876
9877  # remove trailing .exe if any
9878  new_path="${new_path/%.exe/}"
9879
9880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9881
9882  # First separate the path from the arguments. This will split at the first
9883  # space.
9884  complete="$FOUND_MAKE"
9885  path="${complete%% *}"
9886  tmp="$complete EOL"
9887  arguments="${tmp#* }"
9888
9889  # Input might be given as Windows format, start by converting to
9890  # unix format.
9891  new_path="$path"
9892
9893  windows_path="$new_path"
9894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9895    unix_path=`$CYGPATH -u "$windows_path"`
9896    new_path="$unix_path"
9897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9899    new_path="$unix_path"
9900  fi
9901
9902
9903  # Now try to locate executable using which
9904  new_path=`$WHICH "$new_path" 2> /dev/null`
9905
9906  if test "x$new_path" = x; then
9907    # Oops. Which didn't find the executable.
9908    # The splitting of arguments from the executable at a space might have been incorrect,
9909    # since paths with space are more likely in Windows. Give it another try with the whole
9910    # argument.
9911    path="$complete"
9912    arguments="EOL"
9913    new_path="$path"
9914
9915  windows_path="$new_path"
9916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9917    unix_path=`$CYGPATH -u "$windows_path"`
9918    new_path="$unix_path"
9919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9921    new_path="$unix_path"
9922  fi
9923
9924
9925    new_path=`$WHICH "$new_path" 2> /dev/null`
9926
9927    if test "x$new_path" = x; then
9928      # It's still not found. Now this is an unrecoverable error.
9929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9930$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9931      has_space=`$ECHO "$complete" | $GREP " "`
9932      if test "x$has_space" != x; then
9933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9935      fi
9936      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9937    fi
9938  fi
9939
9940  # Now new_path has a complete unix path to the binary
9941  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9942    # Keep paths in /bin as-is, but remove trailing .exe if any
9943    new_path="${new_path/%.exe/}"
9944    # Do not save /bin paths to all_fixpath_prefixes!
9945  else
9946    # Not in mixed or Windows style, start by that.
9947    new_path=`cmd //c echo $new_path`
9948
9949  input_path="$new_path"
9950  # Check if we need to convert this using DOS-style short mode. If the path
9951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9952  # take no chances and rewrite it.
9953  # Note: m4 eats our [], so we need to use [ and ] instead.
9954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9955  if test "x$has_forbidden_chars" != x; then
9956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9958  fi
9959
9960    # Output is in $new_path
9961
9962  windows_path="$new_path"
9963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9964    unix_path=`$CYGPATH -u "$windows_path"`
9965    new_path="$unix_path"
9966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9968    new_path="$unix_path"
9969  fi
9970
9971    # remove trailing .exe if any
9972    new_path="${new_path/%.exe/}"
9973
9974    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9975    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9976  fi
9977
9978  else
9979    # We're on a posix platform. Hooray! :)
9980    # First separate the path from the arguments. This will split at the first
9981    # space.
9982    complete="$FOUND_MAKE"
9983    path="${complete%% *}"
9984    tmp="$complete EOL"
9985    arguments="${tmp#* }"
9986
9987    # Cannot rely on the command "which" here since it doesn't always work.
9988    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9989    if test -z "$is_absolute_path"; then
9990      # Path to executable is not absolute. Find it.
9991      IFS_save="$IFS"
9992      IFS=:
9993      for p in $PATH; do
9994        if test -f "$p/$path" && test -x "$p/$path"; then
9995          new_path="$p/$path"
9996          break
9997        fi
9998      done
9999      IFS="$IFS_save"
10000    else
10001      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10002$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10003      new_path="$path"
10004    fi
10005
10006    if test "x$new_path" = x; then
10007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10008$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10009      has_space=`$ECHO "$complete" | $GREP " "`
10010      if test "x$has_space" != x; then
10011        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10012$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10013      fi
10014      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10015    fi
10016  fi
10017
10018  # Now join together the path and the arguments once again
10019  if test "x$arguments" != xEOL; then
10020    new_complete="$new_path ${arguments% *}"
10021  else
10022    new_complete="$new_path"
10023  fi
10024
10025  if test "x$complete" != "x$new_complete"; then
10026    FOUND_MAKE="$new_complete"
10027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10028$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10029  fi
10030
10031        fi
10032      fi
10033    fi
10034  fi
10035
10036        fi
10037        PATH=$OLD_PATH
10038      fi
10039    fi
10040
10041    if test "x$FOUND_MAKE" = x; then
10042      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
10043    fi
10044  fi
10045
10046  MAKE=$FOUND_MAKE
10047
10048  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10049$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10050
10051
10052
10053  # Test if find supports -delete
10054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10055$as_echo_n "checking if find supports -delete... " >&6; }
10056  FIND_DELETE="-delete"
10057
10058  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10059
10060  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10061
10062  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10063  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10064    # No, it does not.
10065    rm $DELETEDIR/TestIfFindSupportsDelete
10066    FIND_DELETE="-exec rm \{\} \+"
10067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10068$as_echo "no" >&6; }
10069  else
10070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10071$as_echo "yes" >&6; }
10072  fi
10073  rmdir $DELETEDIR
10074
10075
10076
10077  # These tools might not be installed by default,
10078  # need hint on how to install them.
10079
10080  for ac_prog in unzip
10081do
10082  # Extract the first word of "$ac_prog", so it can be a program name with args.
10083set dummy $ac_prog; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if ${ac_cv_path_UNZIP+:} false; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  case $UNZIP in
10090  [\\/]* | ?:[\\/]*)
10091  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10092  ;;
10093  *)
10094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109  ;;
10110esac
10111fi
10112UNZIP=$ac_cv_path_UNZIP
10113if test -n "$UNZIP"; then
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10115$as_echo "$UNZIP" >&6; }
10116else
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122  test -n "$UNZIP" && break
10123done
10124
10125
10126  if test "x$UNZIP" = x; then
10127    if test "xunzip" = x; then
10128      PROG_NAME=unzip
10129    else
10130      PROG_NAME=unzip
10131    fi
10132    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10133$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10134    as_fn_error $? "Cannot continue" "$LINENO" 5
10135  fi
10136
10137
10138
10139  for ac_prog in zip
10140do
10141  # Extract the first word of "$ac_prog", so it can be a program name with args.
10142set dummy $ac_prog; ac_word=$2
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144$as_echo_n "checking for $ac_word... " >&6; }
10145if ${ac_cv_path_ZIP+:} false; then :
10146  $as_echo_n "(cached) " >&6
10147else
10148  case $ZIP in
10149  [\\/]* | ?:[\\/]*)
10150  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10151  ;;
10152  *)
10153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154for as_dir in $PATH
10155do
10156  IFS=$as_save_IFS
10157  test -z "$as_dir" && as_dir=.
10158    for ac_exec_ext in '' $ac_executable_extensions; do
10159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10160    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162    break 2
10163  fi
10164done
10165  done
10166IFS=$as_save_IFS
10167
10168  ;;
10169esac
10170fi
10171ZIP=$ac_cv_path_ZIP
10172if test -n "$ZIP"; then
10173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10174$as_echo "$ZIP" >&6; }
10175else
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178fi
10179
10180
10181  test -n "$ZIP" && break
10182done
10183
10184
10185  if test "x$ZIP" = x; then
10186    if test "xzip" = x; then
10187      PROG_NAME=zip
10188    else
10189      PROG_NAME=zip
10190    fi
10191    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10192$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10193    as_fn_error $? "Cannot continue" "$LINENO" 5
10194  fi
10195
10196
10197
10198  # Non-required basic tools
10199
10200  # Extract the first word of "ldd", so it can be a program name with args.
10201set dummy ldd; ac_word=$2
10202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10203$as_echo_n "checking for $ac_word... " >&6; }
10204if ${ac_cv_path_LDD+:} false; then :
10205  $as_echo_n "(cached) " >&6
10206else
10207  case $LDD in
10208  [\\/]* | ?:[\\/]*)
10209  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10210  ;;
10211  *)
10212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10213for as_dir in $PATH
10214do
10215  IFS=$as_save_IFS
10216  test -z "$as_dir" && as_dir=.
10217    for ac_exec_ext in '' $ac_executable_extensions; do
10218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10219    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10221    break 2
10222  fi
10223done
10224  done
10225IFS=$as_save_IFS
10226
10227  ;;
10228esac
10229fi
10230LDD=$ac_cv_path_LDD
10231if test -n "$LDD"; then
10232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10233$as_echo "$LDD" >&6; }
10234else
10235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236$as_echo "no" >&6; }
10237fi
10238
10239
10240  if test "x$LDD" = "x"; then
10241    # List shared lib dependencies is used for
10242    # debug output and checking for forbidden dependencies.
10243    # We can build without it.
10244    LDD="true"
10245  fi
10246  # Extract the first word of "otool", so it can be a program name with args.
10247set dummy otool; ac_word=$2
10248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10249$as_echo_n "checking for $ac_word... " >&6; }
10250if ${ac_cv_path_OTOOL+:} false; then :
10251  $as_echo_n "(cached) " >&6
10252else
10253  case $OTOOL in
10254  [\\/]* | ?:[\\/]*)
10255  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10256  ;;
10257  *)
10258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10259for as_dir in $PATH
10260do
10261  IFS=$as_save_IFS
10262  test -z "$as_dir" && as_dir=.
10263    for ac_exec_ext in '' $ac_executable_extensions; do
10264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10265    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10267    break 2
10268  fi
10269done
10270  done
10271IFS=$as_save_IFS
10272
10273  ;;
10274esac
10275fi
10276OTOOL=$ac_cv_path_OTOOL
10277if test -n "$OTOOL"; then
10278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10279$as_echo "$OTOOL" >&6; }
10280else
10281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282$as_echo "no" >&6; }
10283fi
10284
10285
10286  if test "x$OTOOL" = "x"; then
10287    OTOOL="true"
10288  fi
10289  for ac_prog in readelf greadelf
10290do
10291  # Extract the first word of "$ac_prog", so it can be a program name with args.
10292set dummy $ac_prog; ac_word=$2
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10294$as_echo_n "checking for $ac_word... " >&6; }
10295if ${ac_cv_path_READELF+:} false; then :
10296  $as_echo_n "(cached) " >&6
10297else
10298  case $READELF in
10299  [\\/]* | ?:[\\/]*)
10300  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10301  ;;
10302  *)
10303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10304for as_dir in $PATH
10305do
10306  IFS=$as_save_IFS
10307  test -z "$as_dir" && as_dir=.
10308    for ac_exec_ext in '' $ac_executable_extensions; do
10309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10310    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10312    break 2
10313  fi
10314done
10315  done
10316IFS=$as_save_IFS
10317
10318  ;;
10319esac
10320fi
10321READELF=$ac_cv_path_READELF
10322if test -n "$READELF"; then
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10324$as_echo "$READELF" >&6; }
10325else
10326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10327$as_echo "no" >&6; }
10328fi
10329
10330
10331  test -n "$READELF" && break
10332done
10333
10334  # Extract the first word of "hg", so it can be a program name with args.
10335set dummy hg; ac_word=$2
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10337$as_echo_n "checking for $ac_word... " >&6; }
10338if ${ac_cv_path_HG+:} false; then :
10339  $as_echo_n "(cached) " >&6
10340else
10341  case $HG in
10342  [\\/]* | ?:[\\/]*)
10343  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10344  ;;
10345  *)
10346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10347for as_dir in $PATH
10348do
10349  IFS=$as_save_IFS
10350  test -z "$as_dir" && as_dir=.
10351    for ac_exec_ext in '' $ac_executable_extensions; do
10352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10353    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10355    break 2
10356  fi
10357done
10358  done
10359IFS=$as_save_IFS
10360
10361  ;;
10362esac
10363fi
10364HG=$ac_cv_path_HG
10365if test -n "$HG"; then
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10367$as_echo "$HG" >&6; }
10368else
10369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370$as_echo "no" >&6; }
10371fi
10372
10373
10374  # Extract the first word of "stat", so it can be a program name with args.
10375set dummy stat; ac_word=$2
10376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10377$as_echo_n "checking for $ac_word... " >&6; }
10378if ${ac_cv_path_STAT+:} false; then :
10379  $as_echo_n "(cached) " >&6
10380else
10381  case $STAT in
10382  [\\/]* | ?:[\\/]*)
10383  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10384  ;;
10385  *)
10386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10387for as_dir in $PATH
10388do
10389  IFS=$as_save_IFS
10390  test -z "$as_dir" && as_dir=.
10391    for ac_exec_ext in '' $ac_executable_extensions; do
10392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10393    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10395    break 2
10396  fi
10397done
10398  done
10399IFS=$as_save_IFS
10400
10401  ;;
10402esac
10403fi
10404STAT=$ac_cv_path_STAT
10405if test -n "$STAT"; then
10406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10407$as_echo "$STAT" >&6; }
10408else
10409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10410$as_echo "no" >&6; }
10411fi
10412
10413
10414  # Extract the first word of "time", so it can be a program name with args.
10415set dummy time; ac_word=$2
10416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10417$as_echo_n "checking for $ac_word... " >&6; }
10418if ${ac_cv_path_TIME+:} false; then :
10419  $as_echo_n "(cached) " >&6
10420else
10421  case $TIME in
10422  [\\/]* | ?:[\\/]*)
10423  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10424  ;;
10425  *)
10426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10427for as_dir in $PATH
10428do
10429  IFS=$as_save_IFS
10430  test -z "$as_dir" && as_dir=.
10431    for ac_exec_ext in '' $ac_executable_extensions; do
10432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10433    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10435    break 2
10436  fi
10437done
10438  done
10439IFS=$as_save_IFS
10440
10441  ;;
10442esac
10443fi
10444TIME=$ac_cv_path_TIME
10445if test -n "$TIME"; then
10446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10447$as_echo "$TIME" >&6; }
10448else
10449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10450$as_echo "no" >&6; }
10451fi
10452
10453
10454  # Check if it's GNU time
10455  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10456  if test "x$IS_GNU_TIME" != x; then
10457    IS_GNU_TIME=yes
10458  else
10459    IS_GNU_TIME=no
10460  fi
10461
10462
10463  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10464
10465  for ac_prog in comm
10466do
10467  # Extract the first word of "$ac_prog", so it can be a program name with args.
10468set dummy $ac_prog; ac_word=$2
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10470$as_echo_n "checking for $ac_word... " >&6; }
10471if ${ac_cv_path_COMM+:} false; then :
10472  $as_echo_n "(cached) " >&6
10473else
10474  case $COMM in
10475  [\\/]* | ?:[\\/]*)
10476  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10477  ;;
10478  *)
10479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10480for as_dir in $PATH
10481do
10482  IFS=$as_save_IFS
10483  test -z "$as_dir" && as_dir=.
10484    for ac_exec_ext in '' $ac_executable_extensions; do
10485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10486    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10488    break 2
10489  fi
10490done
10491  done
10492IFS=$as_save_IFS
10493
10494  ;;
10495esac
10496fi
10497COMM=$ac_cv_path_COMM
10498if test -n "$COMM"; then
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10500$as_echo "$COMM" >&6; }
10501else
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10503$as_echo "no" >&6; }
10504fi
10505
10506
10507  test -n "$COMM" && break
10508done
10509
10510
10511  if test "x$COMM" = x; then
10512    if test "xcomm" = x; then
10513      PROG_NAME=comm
10514    else
10515      PROG_NAME=comm
10516    fi
10517    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10518$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10519    as_fn_error $? "Cannot continue" "$LINENO" 5
10520  fi
10521
10522
10523  fi
10524
10525  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10526
10527  for ac_prog in dsymutil
10528do
10529  # Extract the first word of "$ac_prog", so it can be a program name with args.
10530set dummy $ac_prog; ac_word=$2
10531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10532$as_echo_n "checking for $ac_word... " >&6; }
10533if ${ac_cv_path_DSYMUTIL+:} false; then :
10534  $as_echo_n "(cached) " >&6
10535else
10536  case $DSYMUTIL in
10537  [\\/]* | ?:[\\/]*)
10538  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10539  ;;
10540  *)
10541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10542for as_dir in $PATH
10543do
10544  IFS=$as_save_IFS
10545  test -z "$as_dir" && as_dir=.
10546    for ac_exec_ext in '' $ac_executable_extensions; do
10547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10548    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10550    break 2
10551  fi
10552done
10553  done
10554IFS=$as_save_IFS
10555
10556  ;;
10557esac
10558fi
10559DSYMUTIL=$ac_cv_path_DSYMUTIL
10560if test -n "$DSYMUTIL"; then
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10562$as_echo "$DSYMUTIL" >&6; }
10563else
10564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10565$as_echo "no" >&6; }
10566fi
10567
10568
10569  test -n "$DSYMUTIL" && break
10570done
10571
10572
10573  if test "x$DSYMUTIL" = x; then
10574    if test "xdsymutil" = x; then
10575      PROG_NAME=dsymutil
10576    else
10577      PROG_NAME=dsymutil
10578    fi
10579    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10580$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10581    as_fn_error $? "Cannot continue" "$LINENO" 5
10582  fi
10583
10584
10585
10586  for ac_prog in xattr
10587do
10588  # Extract the first word of "$ac_prog", so it can be a program name with args.
10589set dummy $ac_prog; ac_word=$2
10590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10591$as_echo_n "checking for $ac_word... " >&6; }
10592if ${ac_cv_path_XATTR+:} false; then :
10593  $as_echo_n "(cached) " >&6
10594else
10595  case $XATTR in
10596  [\\/]* | ?:[\\/]*)
10597  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10598  ;;
10599  *)
10600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10601for as_dir in $PATH
10602do
10603  IFS=$as_save_IFS
10604  test -z "$as_dir" && as_dir=.
10605    for ac_exec_ext in '' $ac_executable_extensions; do
10606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10607    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10609    break 2
10610  fi
10611done
10612  done
10613IFS=$as_save_IFS
10614
10615  ;;
10616esac
10617fi
10618XATTR=$ac_cv_path_XATTR
10619if test -n "$XATTR"; then
10620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10621$as_echo "$XATTR" >&6; }
10622else
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
10625fi
10626
10627
10628  test -n "$XATTR" && break
10629done
10630
10631
10632  if test "x$XATTR" = x; then
10633    if test "xxattr" = x; then
10634      PROG_NAME=xattr
10635    else
10636      PROG_NAME=xattr
10637    fi
10638    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10639$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10640    as_fn_error $? "Cannot continue" "$LINENO" 5
10641  fi
10642
10643
10644    # Extract the first word of "codesign", so it can be a program name with args.
10645set dummy codesign; ac_word=$2
10646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10647$as_echo_n "checking for $ac_word... " >&6; }
10648if ${ac_cv_path_CODESIGN+:} false; then :
10649  $as_echo_n "(cached) " >&6
10650else
10651  case $CODESIGN in
10652  [\\/]* | ?:[\\/]*)
10653  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10654  ;;
10655  *)
10656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10657for as_dir in $PATH
10658do
10659  IFS=$as_save_IFS
10660  test -z "$as_dir" && as_dir=.
10661    for ac_exec_ext in '' $ac_executable_extensions; do
10662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10663    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10665    break 2
10666  fi
10667done
10668  done
10669IFS=$as_save_IFS
10670
10671  ;;
10672esac
10673fi
10674CODESIGN=$ac_cv_path_CODESIGN
10675if test -n "$CODESIGN"; then
10676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10677$as_echo "$CODESIGN" >&6; }
10678else
10679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10680$as_echo "no" >&6; }
10681fi
10682
10683
10684    if test "x$CODESIGN" != "x"; then
10685      # Verify that the openjdk_codesign certificate is present
10686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10687$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10688      rm -f codesign-testfile
10689      touch codesign-testfile
10690      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10691      rm -f codesign-testfile
10692      if test "x$CODESIGN" = x; then
10693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10694$as_echo "no" >&6; }
10695      else
10696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10697$as_echo "yes" >&6; }
10698      fi
10699    fi
10700  fi
10701
10702
10703# Check if pkg-config is available.
10704
10705
10706if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10707	if test -n "$ac_tool_prefix"; then
10708  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10709set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10711$as_echo_n "checking for $ac_word... " >&6; }
10712if ${ac_cv_path_PKG_CONFIG+:} false; then :
10713  $as_echo_n "(cached) " >&6
10714else
10715  case $PKG_CONFIG in
10716  [\\/]* | ?:[\\/]*)
10717  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10718  ;;
10719  *)
10720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10721for as_dir in $PATH
10722do
10723  IFS=$as_save_IFS
10724  test -z "$as_dir" && as_dir=.
10725    for ac_exec_ext in '' $ac_executable_extensions; do
10726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10727    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10729    break 2
10730  fi
10731done
10732  done
10733IFS=$as_save_IFS
10734
10735  ;;
10736esac
10737fi
10738PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10739if test -n "$PKG_CONFIG"; then
10740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10741$as_echo "$PKG_CONFIG" >&6; }
10742else
10743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10744$as_echo "no" >&6; }
10745fi
10746
10747
10748fi
10749if test -z "$ac_cv_path_PKG_CONFIG"; then
10750  ac_pt_PKG_CONFIG=$PKG_CONFIG
10751  # Extract the first word of "pkg-config", so it can be a program name with args.
10752set dummy pkg-config; ac_word=$2
10753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10754$as_echo_n "checking for $ac_word... " >&6; }
10755if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10756  $as_echo_n "(cached) " >&6
10757else
10758  case $ac_pt_PKG_CONFIG in
10759  [\\/]* | ?:[\\/]*)
10760  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10761  ;;
10762  *)
10763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10764for as_dir in $PATH
10765do
10766  IFS=$as_save_IFS
10767  test -z "$as_dir" && as_dir=.
10768    for ac_exec_ext in '' $ac_executable_extensions; do
10769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10770    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10772    break 2
10773  fi
10774done
10775  done
10776IFS=$as_save_IFS
10777
10778  ;;
10779esac
10780fi
10781ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10782if test -n "$ac_pt_PKG_CONFIG"; then
10783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10784$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10785else
10786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10787$as_echo "no" >&6; }
10788fi
10789
10790  if test "x$ac_pt_PKG_CONFIG" = x; then
10791    PKG_CONFIG=""
10792  else
10793    case $cross_compiling:$ac_tool_warned in
10794yes:)
10795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10797ac_tool_warned=yes ;;
10798esac
10799    PKG_CONFIG=$ac_pt_PKG_CONFIG
10800  fi
10801else
10802  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10803fi
10804
10805fi
10806if test -n "$PKG_CONFIG"; then
10807	_pkg_min_version=0.9.0
10808	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10809$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10810	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10811		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10812$as_echo "yes" >&6; }
10813	else
10814		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
10816		PKG_CONFIG=""
10817	fi
10818
10819fi
10820
10821# After basic tools have been setup, we can check build os specific details.
10822
10823  ###############################################################################
10824
10825  # Note that this is the build platform OS version!
10826
10827  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10828  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10829  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10830  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10831
10832
10833
10834
10835
10836# Setup builddeps, for automatic downloading of tools we need.
10837# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10838# boot-jdk setup, but we need to have basic tools setup first.
10839
10840
10841# Check whether --with-builddeps-conf was given.
10842if test "${with_builddeps_conf+set}" = set; then :
10843  withval=$with_builddeps_conf;
10844fi
10845
10846
10847
10848# Check whether --with-builddeps-server was given.
10849if test "${with_builddeps_server+set}" = set; then :
10850  withval=$with_builddeps_server;
10851fi
10852
10853
10854
10855# Check whether --with-builddeps-dir was given.
10856if test "${with_builddeps_dir+set}" = set; then :
10857  withval=$with_builddeps_dir;
10858else
10859  with_builddeps_dir=/localhome/builddeps
10860fi
10861
10862
10863
10864# Check whether --with-builddeps-group was given.
10865if test "${with_builddeps_group+set}" = set; then :
10866  withval=$with_builddeps_group;
10867fi
10868
10869
10870
10871
10872  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10873    if test "x$with_builddeps_conf" != x; then
10874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10875$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10876      builddepsfile=$with_builddeps_conf
10877      if test -s $builddepsfile; then
10878        . $builddepsfile
10879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10880$as_echo "loaded!" >&6; }
10881      else
10882        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10883      fi
10884    else
10885      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10886$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10887      builddepsfile=`mktemp`
10888      touch $builddepsfile
10889      # Put all found confs into a single file.
10890      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10891      # Source the file to acquire the variables
10892      if test -s $builddepsfile; then
10893        . $builddepsfile
10894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10895$as_echo "found at least one!" >&6; }
10896      else
10897        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10898      fi
10899    fi
10900    # Create build and target names that use _ instead of "-" and ".".
10901    # This is necessary to use them in variable names.
10902    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10903    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10904    # Extract rewrite information for build and target
10905    eval rewritten_build=\${REWRITE_${build_var}}
10906    if test "x$rewritten_build" = x; then
10907      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10908      echo Build stays the same $rewritten_build
10909    else
10910      echo Rewriting build for builddeps into $rewritten_build
10911    fi
10912    eval rewritten_target=\${REWRITE_${target_var}}
10913    if test "x$rewritten_target" = x; then
10914      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10915      echo Target stays the same $rewritten_target
10916    else
10917      echo Rewriting target for builddeps into $rewritten_target
10918    fi
10919    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10920    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10921  fi
10922  for ac_prog in 7z unzip
10923do
10924  # Extract the first word of "$ac_prog", so it can be a program name with args.
10925set dummy $ac_prog; ac_word=$2
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10927$as_echo_n "checking for $ac_word... " >&6; }
10928if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10929  $as_echo_n "(cached) " >&6
10930else
10931  if test -n "$BDEPS_UNZIP"; then
10932  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10933else
10934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10935for as_dir in $PATH
10936do
10937  IFS=$as_save_IFS
10938  test -z "$as_dir" && as_dir=.
10939    for ac_exec_ext in '' $ac_executable_extensions; do
10940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10941    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10943    break 2
10944  fi
10945done
10946  done
10947IFS=$as_save_IFS
10948
10949fi
10950fi
10951BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10952if test -n "$BDEPS_UNZIP"; then
10953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10954$as_echo "$BDEPS_UNZIP" >&6; }
10955else
10956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10957$as_echo "no" >&6; }
10958fi
10959
10960
10961  test -n "$BDEPS_UNZIP" && break
10962done
10963
10964  if test "x$BDEPS_UNZIP" = x7z; then
10965    BDEPS_UNZIP="7z x"
10966  fi
10967
10968  for ac_prog in wget lftp ftp
10969do
10970  # Extract the first word of "$ac_prog", so it can be a program name with args.
10971set dummy $ac_prog; ac_word=$2
10972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10973$as_echo_n "checking for $ac_word... " >&6; }
10974if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10975  $as_echo_n "(cached) " >&6
10976else
10977  if test -n "$BDEPS_FTP"; then
10978  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10979else
10980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10981for as_dir in $PATH
10982do
10983  IFS=$as_save_IFS
10984  test -z "$as_dir" && as_dir=.
10985    for ac_exec_ext in '' $ac_executable_extensions; do
10986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10987    ac_cv_prog_BDEPS_FTP="$ac_prog"
10988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10989    break 2
10990  fi
10991done
10992  done
10993IFS=$as_save_IFS
10994
10995fi
10996fi
10997BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10998if test -n "$BDEPS_FTP"; then
10999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11000$as_echo "$BDEPS_FTP" >&6; }
11001else
11002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11003$as_echo "no" >&6; }
11004fi
11005
11006
11007  test -n "$BDEPS_FTP" && break
11008done
11009
11010
11011
11012###############################################################################
11013#
11014# Determine OpenJDK variants, options and version numbers.
11015#
11016###############################################################################
11017
11018# We need build & target for this.
11019
11020
11021  ###############################################################################
11022  #
11023  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11024  # We always build headless support.
11025  #
11026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11027$as_echo_n "checking headful support... " >&6; }
11028  # Check whether --enable-headful was given.
11029if test "${enable_headful+set}" = set; then :
11030  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11031else
11032  SUPPORT_HEADFUL=yes
11033fi
11034
11035
11036  SUPPORT_HEADLESS=yes
11037  BUILD_HEADLESS="BUILD_HEADLESS:=true"
11038
11039  if test "x$SUPPORT_HEADFUL" = xyes; then
11040    # We are building both headful and headless.
11041    headful_msg="include support for both headful and headless"
11042  fi
11043
11044  if test "x$SUPPORT_HEADFUL" = xno; then
11045    # Thus we are building headless only.
11046    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11047    headful_msg="headless only"
11048  fi
11049
11050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11051$as_echo "$headful_msg" >&6; }
11052
11053
11054
11055
11056
11057  # Control wether Hotspot runs Queens test after build.
11058  # Check whether --enable-hotspot-test-in-build was given.
11059if test "${enable_hotspot_test_in_build+set}" = set; then :
11060  enableval=$enable_hotspot_test_in_build;
11061else
11062  enable_hotspot_test_in_build=no
11063fi
11064
11065  if test "x$enable_hotspot_test_in_build" = "xyes"; then
11066    TEST_IN_BUILD=true
11067  else
11068    TEST_IN_BUILD=false
11069  fi
11070
11071
11072  ###############################################################################
11073  #
11074  # Choose cacerts source file
11075  #
11076
11077# Check whether --with-cacerts-file was given.
11078if test "${with_cacerts_file+set}" = set; then :
11079  withval=$with_cacerts_file;
11080fi
11081
11082  if test "x$with_cacerts_file" != x; then
11083    CACERTS_FILE=$with_cacerts_file
11084  else
11085    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11086  fi
11087
11088
11089  ###############################################################################
11090  #
11091  # Enable or disable unlimited crypto
11092  #
11093  # Check whether --enable-unlimited-crypto was given.
11094if test "${enable_unlimited_crypto+set}" = set; then :
11095  enableval=$enable_unlimited_crypto;
11096else
11097  enable_unlimited_crypto=no
11098fi
11099
11100  if test "x$enable_unlimited_crypto" = "xyes"; then
11101    UNLIMITED_CRYPTO=true
11102  else
11103    UNLIMITED_CRYPTO=false
11104  fi
11105
11106
11107  ###############################################################################
11108  #
11109  # Enable or disable the elliptic curve crypto implementation
11110  #
11111
11112
11113  ###############################################################################
11114  #
11115  # Compress jars
11116  #
11117  COMPRESS_JARS=false
11118
11119
11120
11121
11122  # Source the version numbers
11123  . $AUTOCONF_DIR/version-numbers
11124
11125  # Get the settings from parameters
11126
11127# Check whether --with-milestone was given.
11128if test "${with_milestone+set}" = set; then :
11129  withval=$with_milestone;
11130fi
11131
11132  if test "x$with_milestone" = xyes; then
11133    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11134  elif test "x$with_milestone" != x; then
11135    MILESTONE="$with_milestone"
11136  fi
11137  if test "x$MILESTONE" = x; then
11138    MILESTONE=internal
11139  fi
11140
11141
11142# Check whether --with-update-version was given.
11143if test "${with_update_version+set}" = set; then :
11144  withval=$with_update_version;
11145fi
11146
11147  if test "x$with_update_version" = xyes; then
11148    as_fn_error $? "Update version must have a value" "$LINENO" 5
11149  elif test "x$with_update_version" != x; then
11150    JDK_UPDATE_VERSION="$with_update_version"
11151  fi
11152
11153
11154# Check whether --with-user-release-suffix was given.
11155if test "${with_user_release_suffix+set}" = set; then :
11156  withval=$with_user_release_suffix;
11157fi
11158
11159  if test "x$with_user_release_suffix" = xyes; then
11160    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11161  elif test "x$with_user_release_suffix" != x; then
11162    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11163  fi
11164
11165
11166# Check whether --with-build-number was given.
11167if test "${with_build_number+set}" = set; then :
11168  withval=$with_build_number;
11169fi
11170
11171  if test "x$with_build_number" = xyes; then
11172    as_fn_error $? "Build number must have a value" "$LINENO" 5
11173  elif test "x$with_build_number" != x; then
11174    JDK_BUILD_NUMBER="$with_build_number"
11175  fi
11176  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11177  if test "x$JDK_BUILD_NUMBER" = x; then
11178    JDK_BUILD_NUMBER=b00
11179    if test "x$USER_RELEASE_SUFFIX" = x; then
11180      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11181      # Avoid [:alnum:] since it depends on the locale.
11182      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11183      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11184    fi
11185  fi
11186
11187  # Now set the JDK version, milestone, build number etc.
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203  COPYRIGHT_YEAR=`date +'%Y'`
11204
11205
11206  if test "x$JDK_UPDATE_VERSION" != x; then
11207    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11208  else
11209    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11210  fi
11211
11212
11213  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11214
11215
11216
11217###############################################################################
11218#
11219# Setup BootJDK, used to bootstrap the build.
11220#
11221###############################################################################
11222
11223
11224  BOOT_JDK_FOUND=no
11225
11226# Check whether --with-boot-jdk was given.
11227if test "${with_boot_jdk+set}" = set; then :
11228  withval=$with_boot_jdk;
11229fi
11230
11231
11232  # We look for the Boot JDK through various means, going from more certain to
11233  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11234  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11235  # must check if this is indeed valid; otherwise we'll continue looking.
11236
11237  # Test: Is bootjdk explicitely set by command line arguments?
11238
11239  if test "x$BOOT_JDK_FOUND" = xno; then
11240    # Now execute the test
11241
11242  if test "x$with_boot_jdk" != x; then
11243    BOOT_JDK=$with_boot_jdk
11244    BOOT_JDK_FOUND=maybe
11245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11246$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11247  fi
11248
11249
11250    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11251    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11252      # Do we have a bin/java?
11253      if test ! -x "$BOOT_JDK/bin/java"; then
11254        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11256        BOOT_JDK_FOUND=no
11257      else
11258        # Do we have a bin/javac?
11259        if test ! -x "$BOOT_JDK/bin/javac"; then
11260          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11262          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11263$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11264          BOOT_JDK_FOUND=no
11265        else
11266          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11267          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11268            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11270            BOOT_JDK_FOUND=no
11271          else
11272            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11273            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11274
11275            # Extra M4 quote needed to protect [] in grep expression.
11276            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11277            if test "x$FOUND_VERSION_78" = x; then
11278              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11280              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11281$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11282              BOOT_JDK_FOUND=no
11283            else
11284              # We're done! :-)
11285              BOOT_JDK_FOUND=yes
11286
11287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11288
11289  # Input might be given as Windows format, start by converting to
11290  # unix format.
11291  path="$BOOT_JDK"
11292  new_path=`$CYGPATH -u "$path"`
11293
11294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11297  # "foo.exe" is OK but "foo" is an error.
11298  #
11299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11300  # It is also a way to make sure we got the proper file name for the real test later on.
11301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11302  if test "x$test_shortpath" = x; then
11303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11305    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11306  fi
11307
11308  # Call helper function which possibly converts this using DOS-style short mode.
11309  # If so, the updated path is stored in $new_path.
11310
11311  input_path="$new_path"
11312  # Check if we need to convert this using DOS-style short mode. If the path
11313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11314  # take no chances and rewrite it.
11315  # Note: m4 eats our [], so we need to use [ and ] instead.
11316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11317  if test "x$has_forbidden_chars" != x; then
11318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11322      # Going to short mode and back again did indeed matter. Since short mode is
11323      # case insensitive, let's make it lowercase to improve readability.
11324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11325      # Now convert it back to Unix-stile (cygpath)
11326      input_path=`$CYGPATH -u "$shortmode_path"`
11327      new_path="$input_path"
11328    fi
11329  fi
11330
11331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11332  if test "x$test_cygdrive_prefix" = x; then
11333    # As a simple fix, exclude /usr/bin since it's not a real path.
11334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11336      # a path prefixed by /cygdrive for fixpath to work.
11337      new_path="$CYGWIN_ROOT_PATH$input_path"
11338    fi
11339  fi
11340
11341
11342  if test "x$path" != "x$new_path"; then
11343    BOOT_JDK="$new_path"
11344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11346  fi
11347
11348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11349
11350  path="$BOOT_JDK"
11351  has_colon=`$ECHO $path | $GREP ^.:`
11352  new_path="$path"
11353  if test "x$has_colon" = x; then
11354    # Not in mixed or Windows style, start by that.
11355    new_path=`cmd //c echo $path`
11356  fi
11357
11358
11359  input_path="$new_path"
11360  # Check if we need to convert this using DOS-style short mode. If the path
11361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11362  # take no chances and rewrite it.
11363  # Note: m4 eats our [], so we need to use [ and ] instead.
11364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11365  if test "x$has_forbidden_chars" != x; then
11366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11368  fi
11369
11370
11371  windows_path="$new_path"
11372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11373    unix_path=`$CYGPATH -u "$windows_path"`
11374    new_path="$unix_path"
11375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11377    new_path="$unix_path"
11378  fi
11379
11380  if test "x$path" != "x$new_path"; then
11381    BOOT_JDK="$new_path"
11382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11383$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11384  fi
11385
11386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11388
11389  else
11390    # We're on a posix platform. Hooray! :)
11391    path="$BOOT_JDK"
11392    has_space=`$ECHO "$path" | $GREP " "`
11393    if test "x$has_space" != x; then
11394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11396      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11397    fi
11398
11399    # Use eval to expand a potential ~
11400    eval path="$path"
11401    if test ! -f "$path" && test ! -d "$path"; then
11402      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11403    fi
11404
11405    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11406  fi
11407
11408              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11409$as_echo_n "checking for Boot JDK... " >&6; }
11410              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11411$as_echo "$BOOT_JDK" >&6; }
11412              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11413$as_echo_n "checking Boot JDK version... " >&6; }
11414              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11415              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11416$as_echo "$BOOT_JDK_VERSION" >&6; }
11417            fi # end check jdk version
11418          fi # end check rt.jar
11419        fi # end check javac
11420      fi # end check java
11421    fi # end check boot jdk found
11422  fi
11423
11424  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11425    # Having specified an argument which is incorrect will produce an instant failure;
11426    # we should not go on looking
11427    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11428  fi
11429
11430  # Test: Is bootjdk available from builddeps?
11431
11432  if test "x$BOOT_JDK_FOUND" = xno; then
11433    # Now execute the test
11434
11435
11436
11437  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11438    # Source the builddeps file again, to make sure it uses the latest variables!
11439    . $builddepsfile
11440    # Look for a target and build machine specific resource!
11441    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11442    if test "x$resource" = x; then
11443      # Ok, lets instead look for a target specific resource
11444      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11445    fi
11446    if test "x$resource" = x; then
11447      # Ok, lets instead look for a build specific resource
11448      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11449    fi
11450    if test "x$resource" = x; then
11451      # Ok, lets instead look for a generic resource
11452      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11453      resource=${builddep_bootjdk}
11454    fi
11455    if test "x$resource" != x; then
11456      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11457$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11458      # If the resource in the builddeps.conf file is an existing directory,
11459      # for example /java/linux/cups
11460      if test -d ${resource}; then
11461        depdir=${resource}
11462      else
11463
11464  # bootjdk is for example mymodule
11465  # $resource is for example libs/general/libmymod_1_2_3.zip
11466  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11467  # $with_builddeps_dir is for example /localhome/builddeps
11468  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11469  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11470  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11471  filename=`basename $resource`
11472  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11473  filebase=${filename%%.*}
11474  extension=${filename#*.}
11475  installdir=$with_builddeps_dir/$filebase
11476  if test ! -f $installdir/$filename.unpacked; then
11477    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11478$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11479    if test ! -d $installdir; then
11480      mkdir -p $installdir
11481    fi
11482    if test ! -d $installdir; then
11483      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11484    fi
11485    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11486    touch $tmpfile
11487    if test ! -f $tmpfile; then
11488      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11489    fi
11490
11491  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11492  # $tmpfile is the local file name for the downloaded file.
11493  VALID_TOOL=no
11494  if test "x$BDEPS_FTP" = xwget; then
11495    VALID_TOOL=yes
11496    wget -O $tmpfile $with_builddeps_server/$resource
11497  fi
11498  if test "x$BDEPS_FTP" = xlftp; then
11499    VALID_TOOL=yes
11500    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11501  fi
11502  if test "x$BDEPS_FTP" = xftp; then
11503    VALID_TOOL=yes
11504    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11505    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11506    FTPUSERPWD=${FTPSERVER%%@*}
11507    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11508      FTPUSER=${userpwd%%:*}
11509      FTPPWD=${userpwd#*@}
11510      FTPSERVER=${FTPSERVER#*@}
11511    else
11512      FTPUSER=ftp
11513      FTPPWD=ftp
11514    fi
11515    # the "pass" command does not work on some
11516    # ftp clients (read ftp.exe) but if it works,
11517    # passive mode is better!
11518    ( \
11519        echo "user $FTPUSER $FTPPWD"        ; \
11520        echo "pass"                         ; \
11521        echo "bin"                          ; \
11522        echo "get $FTPPATH $tmpfile"              ; \
11523    ) | ftp -in $FTPSERVER
11524  fi
11525  if test "x$VALID_TOOL" != xyes; then
11526    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11527  fi
11528
11529    mv $tmpfile $installdir/$filename
11530    if test ! -s $installdir/$filename; then
11531      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11532    fi
11533    case "$extension" in
11534      zip)  echo "Unzipping $installdir/$filename..."
11535        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11536        ;;
11537      tar.gz) echo "Untaring $installdir/$filename..."
11538        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11539        ;;
11540      tgz) echo "Untaring $installdir/$filename..."
11541        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11542        ;;
11543      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11544        ;;
11545    esac
11546  fi
11547  if test -f $installdir/$filename.unpacked; then
11548    depdir=$installdir
11549  fi
11550
11551      fi
11552      # Source the builddeps file again, because in the previous command, the depdir
11553      # was updated to point at the current build dependency install directory.
11554      . $builddepsfile
11555      # Now extract variables from the builddeps.conf files.
11556      theroot=${builddep_bootjdk_ROOT}
11557      thecflags=${builddep_bootjdk_CFLAGS}
11558      thelibs=${builddep_bootjdk_LIBS}
11559      if test "x$depdir" = x; then
11560        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11561      fi
11562      BOOT_JDK=$depdir
11563      if test "x$theroot" != x; then
11564        BOOT_JDK="$theroot"
11565      fi
11566      if test "x$thecflags" != x; then
11567        BOOT_JDK_CFLAGS="$thecflags"
11568      fi
11569      if test "x$thelibs" != x; then
11570        BOOT_JDK_LIBS="$thelibs"
11571      fi
11572      BOOT_JDK_FOUND=maybe
11573      else BOOT_JDK_FOUND=no
11574
11575    fi
11576    else BOOT_JDK_FOUND=no
11577
11578  fi
11579
11580
11581
11582    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11583    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11584      # Do we have a bin/java?
11585      if test ! -x "$BOOT_JDK/bin/java"; then
11586        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11588        BOOT_JDK_FOUND=no
11589      else
11590        # Do we have a bin/javac?
11591        if test ! -x "$BOOT_JDK/bin/javac"; then
11592          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11594          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11595$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11596          BOOT_JDK_FOUND=no
11597        else
11598          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11599          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11600            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11602            BOOT_JDK_FOUND=no
11603          else
11604            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11605            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11606
11607            # Extra M4 quote needed to protect [] in grep expression.
11608            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11609            if test "x$FOUND_VERSION_78" = x; then
11610              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11612              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11613$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11614              BOOT_JDK_FOUND=no
11615            else
11616              # We're done! :-)
11617              BOOT_JDK_FOUND=yes
11618
11619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11620
11621  # Input might be given as Windows format, start by converting to
11622  # unix format.
11623  path="$BOOT_JDK"
11624  new_path=`$CYGPATH -u "$path"`
11625
11626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11629  # "foo.exe" is OK but "foo" is an error.
11630  #
11631  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11632  # It is also a way to make sure we got the proper file name for the real test later on.
11633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11634  if test "x$test_shortpath" = x; then
11635    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11636$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11637    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11638  fi
11639
11640  # Call helper function which possibly converts this using DOS-style short mode.
11641  # If so, the updated path is stored in $new_path.
11642
11643  input_path="$new_path"
11644  # Check if we need to convert this using DOS-style short mode. If the path
11645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11646  # take no chances and rewrite it.
11647  # Note: m4 eats our [], so we need to use [ and ] instead.
11648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11649  if test "x$has_forbidden_chars" != x; then
11650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11654      # Going to short mode and back again did indeed matter. Since short mode is
11655      # case insensitive, let's make it lowercase to improve readability.
11656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11657      # Now convert it back to Unix-stile (cygpath)
11658      input_path=`$CYGPATH -u "$shortmode_path"`
11659      new_path="$input_path"
11660    fi
11661  fi
11662
11663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11664  if test "x$test_cygdrive_prefix" = x; then
11665    # As a simple fix, exclude /usr/bin since it's not a real path.
11666    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11668      # a path prefixed by /cygdrive for fixpath to work.
11669      new_path="$CYGWIN_ROOT_PATH$input_path"
11670    fi
11671  fi
11672
11673
11674  if test "x$path" != "x$new_path"; then
11675    BOOT_JDK="$new_path"
11676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11678  fi
11679
11680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11681
11682  path="$BOOT_JDK"
11683  has_colon=`$ECHO $path | $GREP ^.:`
11684  new_path="$path"
11685  if test "x$has_colon" = x; then
11686    # Not in mixed or Windows style, start by that.
11687    new_path=`cmd //c echo $path`
11688  fi
11689
11690
11691  input_path="$new_path"
11692  # Check if we need to convert this using DOS-style short mode. If the path
11693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11694  # take no chances and rewrite it.
11695  # Note: m4 eats our [], so we need to use [ and ] instead.
11696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11697  if test "x$has_forbidden_chars" != x; then
11698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11700  fi
11701
11702
11703  windows_path="$new_path"
11704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11705    unix_path=`$CYGPATH -u "$windows_path"`
11706    new_path="$unix_path"
11707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11709    new_path="$unix_path"
11710  fi
11711
11712  if test "x$path" != "x$new_path"; then
11713    BOOT_JDK="$new_path"
11714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11715$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11716  fi
11717
11718  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11719  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11720
11721  else
11722    # We're on a posix platform. Hooray! :)
11723    path="$BOOT_JDK"
11724    has_space=`$ECHO "$path" | $GREP " "`
11725    if test "x$has_space" != x; then
11726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11728      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11729    fi
11730
11731    # Use eval to expand a potential ~
11732    eval path="$path"
11733    if test ! -f "$path" && test ! -d "$path"; then
11734      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11735    fi
11736
11737    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11738  fi
11739
11740              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11741$as_echo_n "checking for Boot JDK... " >&6; }
11742              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11743$as_echo "$BOOT_JDK" >&6; }
11744              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11745$as_echo_n "checking Boot JDK version... " >&6; }
11746              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11747              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11748$as_echo "$BOOT_JDK_VERSION" >&6; }
11749            fi # end check jdk version
11750          fi # end check rt.jar
11751        fi # end check javac
11752      fi # end check java
11753    fi # end check boot jdk found
11754  fi
11755
11756
11757  # Test: Is $JAVA_HOME set?
11758
11759  if test "x$BOOT_JDK_FOUND" = xno; then
11760    # Now execute the test
11761
11762  if test "x$JAVA_HOME" != x; then
11763    JAVA_HOME_PROCESSED="$JAVA_HOME"
11764
11765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11766
11767  # Input might be given as Windows format, start by converting to
11768  # unix format.
11769  path="$JAVA_HOME_PROCESSED"
11770  new_path=`$CYGPATH -u "$path"`
11771
11772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11775  # "foo.exe" is OK but "foo" is an error.
11776  #
11777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11778  # It is also a way to make sure we got the proper file name for the real test later on.
11779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11780  if test "x$test_shortpath" = x; then
11781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11782$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11783    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11784  fi
11785
11786  # Call helper function which possibly converts this using DOS-style short mode.
11787  # If so, the updated path is stored in $new_path.
11788
11789  input_path="$new_path"
11790  # Check if we need to convert this using DOS-style short mode. If the path
11791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11792  # take no chances and rewrite it.
11793  # Note: m4 eats our [], so we need to use [ and ] instead.
11794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11795  if test "x$has_forbidden_chars" != x; then
11796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11800      # Going to short mode and back again did indeed matter. Since short mode is
11801      # case insensitive, let's make it lowercase to improve readability.
11802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11803      # Now convert it back to Unix-stile (cygpath)
11804      input_path=`$CYGPATH -u "$shortmode_path"`
11805      new_path="$input_path"
11806    fi
11807  fi
11808
11809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11810  if test "x$test_cygdrive_prefix" = x; then
11811    # As a simple fix, exclude /usr/bin since it's not a real path.
11812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11814      # a path prefixed by /cygdrive for fixpath to work.
11815      new_path="$CYGWIN_ROOT_PATH$input_path"
11816    fi
11817  fi
11818
11819
11820  if test "x$path" != "x$new_path"; then
11821    JAVA_HOME_PROCESSED="$new_path"
11822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11823$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11824  fi
11825
11826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11827
11828  path="$JAVA_HOME_PROCESSED"
11829  has_colon=`$ECHO $path | $GREP ^.:`
11830  new_path="$path"
11831  if test "x$has_colon" = x; then
11832    # Not in mixed or Windows style, start by that.
11833    new_path=`cmd //c echo $path`
11834  fi
11835
11836
11837  input_path="$new_path"
11838  # Check if we need to convert this using DOS-style short mode. If the path
11839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11840  # take no chances and rewrite it.
11841  # Note: m4 eats our [], so we need to use [ and ] instead.
11842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11843  if test "x$has_forbidden_chars" != x; then
11844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11846  fi
11847
11848
11849  windows_path="$new_path"
11850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11851    unix_path=`$CYGPATH -u "$windows_path"`
11852    new_path="$unix_path"
11853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11855    new_path="$unix_path"
11856  fi
11857
11858  if test "x$path" != "x$new_path"; then
11859    JAVA_HOME_PROCESSED="$new_path"
11860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11861$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11862  fi
11863
11864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11866
11867  else
11868    # We're on a posix platform. Hooray! :)
11869    path="$JAVA_HOME_PROCESSED"
11870    has_space=`$ECHO "$path" | $GREP " "`
11871    if test "x$has_space" != x; then
11872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11873$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11874      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11875    fi
11876
11877    # Use eval to expand a potential ~
11878    eval path="$path"
11879    if test ! -f "$path" && test ! -d "$path"; then
11880      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11881    fi
11882
11883    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11884  fi
11885
11886    if test ! -d "$JAVA_HOME_PROCESSED"; then
11887      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11888$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11889    else
11890      # Aha, the user has set a JAVA_HOME
11891      # let us use that as the Boot JDK.
11892      BOOT_JDK="$JAVA_HOME_PROCESSED"
11893      BOOT_JDK_FOUND=maybe
11894      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11895$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11896    fi
11897  fi
11898
11899
11900    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11901    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11902      # Do we have a bin/java?
11903      if test ! -x "$BOOT_JDK/bin/java"; then
11904        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11906        BOOT_JDK_FOUND=no
11907      else
11908        # Do we have a bin/javac?
11909        if test ! -x "$BOOT_JDK/bin/javac"; then
11910          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11912          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11913$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11914          BOOT_JDK_FOUND=no
11915        else
11916          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11917          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11918            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11920            BOOT_JDK_FOUND=no
11921          else
11922            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11924
11925            # Extra M4 quote needed to protect [] in grep expression.
11926            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11927            if test "x$FOUND_VERSION_78" = x; then
11928              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11930              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11931$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11932              BOOT_JDK_FOUND=no
11933            else
11934              # We're done! :-)
11935              BOOT_JDK_FOUND=yes
11936
11937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11938
11939  # Input might be given as Windows format, start by converting to
11940  # unix format.
11941  path="$BOOT_JDK"
11942  new_path=`$CYGPATH -u "$path"`
11943
11944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11947  # "foo.exe" is OK but "foo" is an error.
11948  #
11949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11950  # It is also a way to make sure we got the proper file name for the real test later on.
11951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11952  if test "x$test_shortpath" = x; then
11953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11954$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11955    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11956  fi
11957
11958  # Call helper function which possibly converts this using DOS-style short mode.
11959  # If so, the updated path is stored in $new_path.
11960
11961  input_path="$new_path"
11962  # Check if we need to convert this using DOS-style short mode. If the path
11963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11964  # take no chances and rewrite it.
11965  # Note: m4 eats our [], so we need to use [ and ] instead.
11966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11967  if test "x$has_forbidden_chars" != x; then
11968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11972      # Going to short mode and back again did indeed matter. Since short mode is
11973      # case insensitive, let's make it lowercase to improve readability.
11974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11975      # Now convert it back to Unix-stile (cygpath)
11976      input_path=`$CYGPATH -u "$shortmode_path"`
11977      new_path="$input_path"
11978    fi
11979  fi
11980
11981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11982  if test "x$test_cygdrive_prefix" = x; then
11983    # As a simple fix, exclude /usr/bin since it's not a real path.
11984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11986      # a path prefixed by /cygdrive for fixpath to work.
11987      new_path="$CYGWIN_ROOT_PATH$input_path"
11988    fi
11989  fi
11990
11991
11992  if test "x$path" != "x$new_path"; then
11993    BOOT_JDK="$new_path"
11994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11995$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11996  fi
11997
11998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11999
12000  path="$BOOT_JDK"
12001  has_colon=`$ECHO $path | $GREP ^.:`
12002  new_path="$path"
12003  if test "x$has_colon" = x; then
12004    # Not in mixed or Windows style, start by that.
12005    new_path=`cmd //c echo $path`
12006  fi
12007
12008
12009  input_path="$new_path"
12010  # Check if we need to convert this using DOS-style short mode. If the path
12011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12012  # take no chances and rewrite it.
12013  # Note: m4 eats our [], so we need to use [ and ] instead.
12014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12015  if test "x$has_forbidden_chars" != x; then
12016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12018  fi
12019
12020
12021  windows_path="$new_path"
12022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12023    unix_path=`$CYGPATH -u "$windows_path"`
12024    new_path="$unix_path"
12025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12027    new_path="$unix_path"
12028  fi
12029
12030  if test "x$path" != "x$new_path"; then
12031    BOOT_JDK="$new_path"
12032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12033$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12034  fi
12035
12036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12038
12039  else
12040    # We're on a posix platform. Hooray! :)
12041    path="$BOOT_JDK"
12042    has_space=`$ECHO "$path" | $GREP " "`
12043    if test "x$has_space" != x; then
12044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12045$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12046      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12047    fi
12048
12049    # Use eval to expand a potential ~
12050    eval path="$path"
12051    if test ! -f "$path" && test ! -d "$path"; then
12052      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12053    fi
12054
12055    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12056  fi
12057
12058              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12059$as_echo_n "checking for Boot JDK... " >&6; }
12060              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12061$as_echo "$BOOT_JDK" >&6; }
12062              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12063$as_echo_n "checking Boot JDK version... " >&6; }
12064              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12065              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12066$as_echo "$BOOT_JDK_VERSION" >&6; }
12067            fi # end check jdk version
12068          fi # end check rt.jar
12069        fi # end check javac
12070      fi # end check java
12071    fi # end check boot jdk found
12072  fi
12073
12074
12075  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12076
12077  if test "x$BOOT_JDK_FOUND" = xno; then
12078    # Now execute the test
12079
12080  if test -x /usr/libexec/java_home; then
12081    BOOT_JDK=`/usr/libexec/java_home`
12082    BOOT_JDK_FOUND=maybe
12083    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12084$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12085  fi
12086
12087
12088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12090      # Do we have a bin/java?
12091      if test ! -x "$BOOT_JDK/bin/java"; then
12092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12094        BOOT_JDK_FOUND=no
12095      else
12096        # Do we have a bin/javac?
12097        if test ! -x "$BOOT_JDK/bin/javac"; then
12098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12102          BOOT_JDK_FOUND=no
12103        else
12104          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12105          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12106            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12108            BOOT_JDK_FOUND=no
12109          else
12110            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12111            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12112
12113            # Extra M4 quote needed to protect [] in grep expression.
12114            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12115            if test "x$FOUND_VERSION_78" = x; then
12116              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12118              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12119$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12120              BOOT_JDK_FOUND=no
12121            else
12122              # We're done! :-)
12123              BOOT_JDK_FOUND=yes
12124
12125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12126
12127  # Input might be given as Windows format, start by converting to
12128  # unix format.
12129  path="$BOOT_JDK"
12130  new_path=`$CYGPATH -u "$path"`
12131
12132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12135  # "foo.exe" is OK but "foo" is an error.
12136  #
12137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12138  # It is also a way to make sure we got the proper file name for the real test later on.
12139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12140  if test "x$test_shortpath" = x; then
12141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12142$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12143    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12144  fi
12145
12146  # Call helper function which possibly converts this using DOS-style short mode.
12147  # If so, the updated path is stored in $new_path.
12148
12149  input_path="$new_path"
12150  # Check if we need to convert this using DOS-style short mode. If the path
12151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12152  # take no chances and rewrite it.
12153  # Note: m4 eats our [], so we need to use [ and ] instead.
12154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12155  if test "x$has_forbidden_chars" != x; then
12156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12160      # Going to short mode and back again did indeed matter. Since short mode is
12161      # case insensitive, let's make it lowercase to improve readability.
12162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12163      # Now convert it back to Unix-stile (cygpath)
12164      input_path=`$CYGPATH -u "$shortmode_path"`
12165      new_path="$input_path"
12166    fi
12167  fi
12168
12169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12170  if test "x$test_cygdrive_prefix" = x; then
12171    # As a simple fix, exclude /usr/bin since it's not a real path.
12172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12174      # a path prefixed by /cygdrive for fixpath to work.
12175      new_path="$CYGWIN_ROOT_PATH$input_path"
12176    fi
12177  fi
12178
12179
12180  if test "x$path" != "x$new_path"; then
12181    BOOT_JDK="$new_path"
12182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12184  fi
12185
12186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12187
12188  path="$BOOT_JDK"
12189  has_colon=`$ECHO $path | $GREP ^.:`
12190  new_path="$path"
12191  if test "x$has_colon" = x; then
12192    # Not in mixed or Windows style, start by that.
12193    new_path=`cmd //c echo $path`
12194  fi
12195
12196
12197  input_path="$new_path"
12198  # Check if we need to convert this using DOS-style short mode. If the path
12199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12200  # take no chances and rewrite it.
12201  # Note: m4 eats our [], so we need to use [ and ] instead.
12202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12203  if test "x$has_forbidden_chars" != x; then
12204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12206  fi
12207
12208
12209  windows_path="$new_path"
12210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12211    unix_path=`$CYGPATH -u "$windows_path"`
12212    new_path="$unix_path"
12213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12215    new_path="$unix_path"
12216  fi
12217
12218  if test "x$path" != "x$new_path"; then
12219    BOOT_JDK="$new_path"
12220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12221$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12222  fi
12223
12224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12226
12227  else
12228    # We're on a posix platform. Hooray! :)
12229    path="$BOOT_JDK"
12230    has_space=`$ECHO "$path" | $GREP " "`
12231    if test "x$has_space" != x; then
12232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12233$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12234      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12235    fi
12236
12237    # Use eval to expand a potential ~
12238    eval path="$path"
12239    if test ! -f "$path" && test ! -d "$path"; then
12240      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12241    fi
12242
12243    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12244  fi
12245
12246              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12247$as_echo_n "checking for Boot JDK... " >&6; }
12248              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12249$as_echo "$BOOT_JDK" >&6; }
12250              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12251$as_echo_n "checking Boot JDK version... " >&6; }
12252              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12253              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12254$as_echo "$BOOT_JDK_VERSION" >&6; }
12255            fi # end check jdk version
12256          fi # end check rt.jar
12257        fi # end check javac
12258      fi # end check java
12259    fi # end check boot jdk found
12260  fi
12261
12262
12263  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12264
12265  if test "x$BOOT_JDK_FOUND" = xno; then
12266    # Now execute the test
12267
12268  # Extract the first word of "javac", so it can be a program name with args.
12269set dummy javac; ac_word=$2
12270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12271$as_echo_n "checking for $ac_word... " >&6; }
12272if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12273  $as_echo_n "(cached) " >&6
12274else
12275  case $JAVAC_CHECK in
12276  [\\/]* | ?:[\\/]*)
12277  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12278  ;;
12279  *)
12280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12281for as_dir in $PATH
12282do
12283  IFS=$as_save_IFS
12284  test -z "$as_dir" && as_dir=.
12285    for ac_exec_ext in '' $ac_executable_extensions; do
12286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12287    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12289    break 2
12290  fi
12291done
12292  done
12293IFS=$as_save_IFS
12294
12295  ;;
12296esac
12297fi
12298JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12299if test -n "$JAVAC_CHECK"; then
12300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12301$as_echo "$JAVAC_CHECK" >&6; }
12302else
12303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12304$as_echo "no" >&6; }
12305fi
12306
12307
12308  # Extract the first word of "java", so it can be a program name with args.
12309set dummy java; ac_word=$2
12310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12311$as_echo_n "checking for $ac_word... " >&6; }
12312if ${ac_cv_path_JAVA_CHECK+:} false; then :
12313  $as_echo_n "(cached) " >&6
12314else
12315  case $JAVA_CHECK in
12316  [\\/]* | ?:[\\/]*)
12317  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12318  ;;
12319  *)
12320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12321for as_dir in $PATH
12322do
12323  IFS=$as_save_IFS
12324  test -z "$as_dir" && as_dir=.
12325    for ac_exec_ext in '' $ac_executable_extensions; do
12326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12327    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12329    break 2
12330  fi
12331done
12332  done
12333IFS=$as_save_IFS
12334
12335  ;;
12336esac
12337fi
12338JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12339if test -n "$JAVA_CHECK"; then
12340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12341$as_echo "$JAVA_CHECK" >&6; }
12342else
12343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12344$as_echo "no" >&6; }
12345fi
12346
12347
12348  BINARY="$JAVAC_CHECK"
12349  if test "x$JAVAC_CHECK" = x; then
12350    BINARY="$JAVA_CHECK"
12351  fi
12352  if test "x$BINARY" != x; then
12353    # So there is a java(c) binary, it might be part of a JDK.
12354    # Lets find the JDK/JRE directory by following symbolic links.
12355    # Linux/GNU systems often have links from /usr/bin/java to
12356    # /etc/alternatives/java to the real JDK binary.
12357
12358  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12359    # Follow a chain of symbolic links. Use readlink
12360    # where it exists, else fall back to horribly
12361    # complicated shell code.
12362    if test "x$READLINK_TESTED" != yes; then
12363      # On MacOSX there is a readlink tool with a different
12364      # purpose than the GNU readlink tool. Check the found readlink.
12365      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12366      if test "x$ISGNU" = x; then
12367        # A readlink that we do not know how to use.
12368        # Are there other non-GNU readlinks out there?
12369        READLINK_TESTED=yes
12370        READLINK=
12371      fi
12372    fi
12373
12374    if test "x$READLINK" != x; then
12375      BINARY=`$READLINK -f $BINARY`
12376    else
12377      # Save the current directory for restoring afterwards
12378      STARTDIR=$PWD
12379      COUNTER=0
12380      sym_link_dir=`$DIRNAME $BINARY`
12381      sym_link_file=`$BASENAME $BINARY`
12382      cd $sym_link_dir
12383      # Use -P flag to resolve symlinks in directories.
12384      cd `$THEPWDCMD -P`
12385      sym_link_dir=`$THEPWDCMD -P`
12386      # Resolve file symlinks
12387      while test $COUNTER -lt 20; do
12388        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12389        if test "x$ISLINK" == x; then
12390          # This is not a symbolic link! We are done!
12391          break
12392        fi
12393        # Again resolve directory symlinks since the target of the just found
12394        # link could be in a different directory
12395        cd `$DIRNAME $ISLINK`
12396        sym_link_dir=`$THEPWDCMD -P`
12397        sym_link_file=`$BASENAME $ISLINK`
12398        let COUNTER=COUNTER+1
12399      done
12400      cd $STARTDIR
12401      BINARY=$sym_link_dir/$sym_link_file
12402    fi
12403  fi
12404
12405    BOOT_JDK=`dirname "$BINARY"`
12406    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12407    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12408      # Looks like we found ourselves an JDK
12409      BOOT_JDK_FOUND=maybe
12410      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12411$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12412    fi
12413  fi
12414
12415
12416    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12417    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12418      # Do we have a bin/java?
12419      if test ! -x "$BOOT_JDK/bin/java"; then
12420        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12422        BOOT_JDK_FOUND=no
12423      else
12424        # Do we have a bin/javac?
12425        if test ! -x "$BOOT_JDK/bin/javac"; then
12426          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12428          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12429$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12430          BOOT_JDK_FOUND=no
12431        else
12432          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12433          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12434            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12436            BOOT_JDK_FOUND=no
12437          else
12438            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12439            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12440
12441            # Extra M4 quote needed to protect [] in grep expression.
12442            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12443            if test "x$FOUND_VERSION_78" = x; then
12444              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12446              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12447$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12448              BOOT_JDK_FOUND=no
12449            else
12450              # We're done! :-)
12451              BOOT_JDK_FOUND=yes
12452
12453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12454
12455  # Input might be given as Windows format, start by converting to
12456  # unix format.
12457  path="$BOOT_JDK"
12458  new_path=`$CYGPATH -u "$path"`
12459
12460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12463  # "foo.exe" is OK but "foo" is an error.
12464  #
12465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12466  # It is also a way to make sure we got the proper file name for the real test later on.
12467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12468  if test "x$test_shortpath" = x; then
12469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12471    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12472  fi
12473
12474  # Call helper function which possibly converts this using DOS-style short mode.
12475  # If so, the updated path is stored in $new_path.
12476
12477  input_path="$new_path"
12478  # Check if we need to convert this using DOS-style short mode. If the path
12479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12480  # take no chances and rewrite it.
12481  # Note: m4 eats our [], so we need to use [ and ] instead.
12482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12483  if test "x$has_forbidden_chars" != x; then
12484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12488      # Going to short mode and back again did indeed matter. Since short mode is
12489      # case insensitive, let's make it lowercase to improve readability.
12490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12491      # Now convert it back to Unix-stile (cygpath)
12492      input_path=`$CYGPATH -u "$shortmode_path"`
12493      new_path="$input_path"
12494    fi
12495  fi
12496
12497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12498  if test "x$test_cygdrive_prefix" = x; then
12499    # As a simple fix, exclude /usr/bin since it's not a real path.
12500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12502      # a path prefixed by /cygdrive for fixpath to work.
12503      new_path="$CYGWIN_ROOT_PATH$input_path"
12504    fi
12505  fi
12506
12507
12508  if test "x$path" != "x$new_path"; then
12509    BOOT_JDK="$new_path"
12510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12511$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12512  fi
12513
12514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12515
12516  path="$BOOT_JDK"
12517  has_colon=`$ECHO $path | $GREP ^.:`
12518  new_path="$path"
12519  if test "x$has_colon" = x; then
12520    # Not in mixed or Windows style, start by that.
12521    new_path=`cmd //c echo $path`
12522  fi
12523
12524
12525  input_path="$new_path"
12526  # Check if we need to convert this using DOS-style short mode. If the path
12527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12528  # take no chances and rewrite it.
12529  # Note: m4 eats our [], so we need to use [ and ] instead.
12530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12531  if test "x$has_forbidden_chars" != x; then
12532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12534  fi
12535
12536
12537  windows_path="$new_path"
12538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12539    unix_path=`$CYGPATH -u "$windows_path"`
12540    new_path="$unix_path"
12541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12543    new_path="$unix_path"
12544  fi
12545
12546  if test "x$path" != "x$new_path"; then
12547    BOOT_JDK="$new_path"
12548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12549$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12550  fi
12551
12552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12554
12555  else
12556    # We're on a posix platform. Hooray! :)
12557    path="$BOOT_JDK"
12558    has_space=`$ECHO "$path" | $GREP " "`
12559    if test "x$has_space" != x; then
12560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12562      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12563    fi
12564
12565    # Use eval to expand a potential ~
12566    eval path="$path"
12567    if test ! -f "$path" && test ! -d "$path"; then
12568      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12569    fi
12570
12571    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12572  fi
12573
12574              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12575$as_echo_n "checking for Boot JDK... " >&6; }
12576              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12577$as_echo "$BOOT_JDK" >&6; }
12578              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12579$as_echo_n "checking Boot JDK version... " >&6; }
12580              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12581              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12582$as_echo "$BOOT_JDK_VERSION" >&6; }
12583            fi # end check jdk version
12584          fi # end check rt.jar
12585        fi # end check javac
12586      fi # end check java
12587    fi # end check boot jdk found
12588  fi
12589
12590
12591  # Test: Is there a JDK installed in default, well-known locations?
12592
12593  if test "x$BOOT_JDK_FOUND" = xno; then
12594    # Now execute the test
12595
12596  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12597
12598  if test "x$BOOT_JDK_FOUND" = xno; then
12599    # Now execute the test
12600
12601  if test "x$ProgramW6432" != x; then
12602    VIRTUAL_DIR="$ProgramW6432/Java"
12603
12604  windows_path="$VIRTUAL_DIR"
12605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12606    unix_path=`$CYGPATH -u "$windows_path"`
12607    VIRTUAL_DIR="$unix_path"
12608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12610    VIRTUAL_DIR="$unix_path"
12611  fi
12612
12613
12614  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12615  BOOT_JDK_SUFFIX=""
12616  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12617  if test "x$ALL_JDKS_FOUND" != x; then
12618    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12619
12620  if test "x$BOOT_JDK_FOUND" = xno; then
12621    # Now execute the test
12622
12623        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12624        if test -d "$BOOT_JDK"; then
12625          BOOT_JDK_FOUND=maybe
12626          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12627$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12628        fi
12629
12630
12631    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12632    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12633      # Do we have a bin/java?
12634      if test ! -x "$BOOT_JDK/bin/java"; then
12635        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12637        BOOT_JDK_FOUND=no
12638      else
12639        # Do we have a bin/javac?
12640        if test ! -x "$BOOT_JDK/bin/javac"; then
12641          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12643          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12644$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12645          BOOT_JDK_FOUND=no
12646        else
12647          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12648          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12649            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12651            BOOT_JDK_FOUND=no
12652          else
12653            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12654            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12655
12656            # Extra M4 quote needed to protect [] in grep expression.
12657            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12658            if test "x$FOUND_VERSION_78" = x; then
12659              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12661              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12662$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12663              BOOT_JDK_FOUND=no
12664            else
12665              # We're done! :-)
12666              BOOT_JDK_FOUND=yes
12667
12668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12669
12670  # Input might be given as Windows format, start by converting to
12671  # unix format.
12672  path="$BOOT_JDK"
12673  new_path=`$CYGPATH -u "$path"`
12674
12675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12678  # "foo.exe" is OK but "foo" is an error.
12679  #
12680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12681  # It is also a way to make sure we got the proper file name for the real test later on.
12682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12683  if test "x$test_shortpath" = x; then
12684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12686    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12687  fi
12688
12689  # Call helper function which possibly converts this using DOS-style short mode.
12690  # If so, the updated path is stored in $new_path.
12691
12692  input_path="$new_path"
12693  # Check if we need to convert this using DOS-style short mode. If the path
12694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12695  # take no chances and rewrite it.
12696  # Note: m4 eats our [], so we need to use [ and ] instead.
12697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12698  if test "x$has_forbidden_chars" != x; then
12699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12703      # Going to short mode and back again did indeed matter. Since short mode is
12704      # case insensitive, let's make it lowercase to improve readability.
12705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12706      # Now convert it back to Unix-stile (cygpath)
12707      input_path=`$CYGPATH -u "$shortmode_path"`
12708      new_path="$input_path"
12709    fi
12710  fi
12711
12712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12713  if test "x$test_cygdrive_prefix" = x; then
12714    # As a simple fix, exclude /usr/bin since it's not a real path.
12715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12717      # a path prefixed by /cygdrive for fixpath to work.
12718      new_path="$CYGWIN_ROOT_PATH$input_path"
12719    fi
12720  fi
12721
12722
12723  if test "x$path" != "x$new_path"; then
12724    BOOT_JDK="$new_path"
12725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12726$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12727  fi
12728
12729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12730
12731  path="$BOOT_JDK"
12732  has_colon=`$ECHO $path | $GREP ^.:`
12733  new_path="$path"
12734  if test "x$has_colon" = x; then
12735    # Not in mixed or Windows style, start by that.
12736    new_path=`cmd //c echo $path`
12737  fi
12738
12739
12740  input_path="$new_path"
12741  # Check if we need to convert this using DOS-style short mode. If the path
12742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12743  # take no chances and rewrite it.
12744  # Note: m4 eats our [], so we need to use [ and ] instead.
12745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12746  if test "x$has_forbidden_chars" != x; then
12747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12749  fi
12750
12751
12752  windows_path="$new_path"
12753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12754    unix_path=`$CYGPATH -u "$windows_path"`
12755    new_path="$unix_path"
12756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12758    new_path="$unix_path"
12759  fi
12760
12761  if test "x$path" != "x$new_path"; then
12762    BOOT_JDK="$new_path"
12763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12764$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12765  fi
12766
12767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12769
12770  else
12771    # We're on a posix platform. Hooray! :)
12772    path="$BOOT_JDK"
12773    has_space=`$ECHO "$path" | $GREP " "`
12774    if test "x$has_space" != x; then
12775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12776$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12777      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12778    fi
12779
12780    # Use eval to expand a potential ~
12781    eval path="$path"
12782    if test ! -f "$path" && test ! -d "$path"; then
12783      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12784    fi
12785
12786    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12787  fi
12788
12789              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12790$as_echo_n "checking for Boot JDK... " >&6; }
12791              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12792$as_echo "$BOOT_JDK" >&6; }
12793              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12794$as_echo_n "checking Boot JDK version... " >&6; }
12795              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12796              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12797$as_echo "$BOOT_JDK_VERSION" >&6; }
12798            fi # end check jdk version
12799          fi # end check rt.jar
12800        fi # end check javac
12801      fi # end check java
12802    fi # end check boot jdk found
12803  fi
12804
12805    done
12806  fi
12807
12808  fi
12809
12810
12811    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12812    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12813      # Do we have a bin/java?
12814      if test ! -x "$BOOT_JDK/bin/java"; then
12815        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12817        BOOT_JDK_FOUND=no
12818      else
12819        # Do we have a bin/javac?
12820        if test ! -x "$BOOT_JDK/bin/javac"; then
12821          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12823          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12824$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12825          BOOT_JDK_FOUND=no
12826        else
12827          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12828          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12829            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12831            BOOT_JDK_FOUND=no
12832          else
12833            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12834            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12835
12836            # Extra M4 quote needed to protect [] in grep expression.
12837            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12838            if test "x$FOUND_VERSION_78" = x; then
12839              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12841              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12842$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12843              BOOT_JDK_FOUND=no
12844            else
12845              # We're done! :-)
12846              BOOT_JDK_FOUND=yes
12847
12848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12849
12850  # Input might be given as Windows format, start by converting to
12851  # unix format.
12852  path="$BOOT_JDK"
12853  new_path=`$CYGPATH -u "$path"`
12854
12855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12858  # "foo.exe" is OK but "foo" is an error.
12859  #
12860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12861  # It is also a way to make sure we got the proper file name for the real test later on.
12862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12863  if test "x$test_shortpath" = x; then
12864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12866    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12867  fi
12868
12869  # Call helper function which possibly converts this using DOS-style short mode.
12870  # If so, the updated path is stored in $new_path.
12871
12872  input_path="$new_path"
12873  # Check if we need to convert this using DOS-style short mode. If the path
12874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12875  # take no chances and rewrite it.
12876  # Note: m4 eats our [], so we need to use [ and ] instead.
12877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12878  if test "x$has_forbidden_chars" != x; then
12879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12883      # Going to short mode and back again did indeed matter. Since short mode is
12884      # case insensitive, let's make it lowercase to improve readability.
12885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12886      # Now convert it back to Unix-stile (cygpath)
12887      input_path=`$CYGPATH -u "$shortmode_path"`
12888      new_path="$input_path"
12889    fi
12890  fi
12891
12892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12893  if test "x$test_cygdrive_prefix" = x; then
12894    # As a simple fix, exclude /usr/bin since it's not a real path.
12895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12897      # a path prefixed by /cygdrive for fixpath to work.
12898      new_path="$CYGWIN_ROOT_PATH$input_path"
12899    fi
12900  fi
12901
12902
12903  if test "x$path" != "x$new_path"; then
12904    BOOT_JDK="$new_path"
12905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12907  fi
12908
12909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12910
12911  path="$BOOT_JDK"
12912  has_colon=`$ECHO $path | $GREP ^.:`
12913  new_path="$path"
12914  if test "x$has_colon" = x; then
12915    # Not in mixed or Windows style, start by that.
12916    new_path=`cmd //c echo $path`
12917  fi
12918
12919
12920  input_path="$new_path"
12921  # Check if we need to convert this using DOS-style short mode. If the path
12922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12923  # take no chances and rewrite it.
12924  # Note: m4 eats our [], so we need to use [ and ] instead.
12925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12926  if test "x$has_forbidden_chars" != x; then
12927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12929  fi
12930
12931
12932  windows_path="$new_path"
12933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12934    unix_path=`$CYGPATH -u "$windows_path"`
12935    new_path="$unix_path"
12936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12938    new_path="$unix_path"
12939  fi
12940
12941  if test "x$path" != "x$new_path"; then
12942    BOOT_JDK="$new_path"
12943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12945  fi
12946
12947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12949
12950  else
12951    # We're on a posix platform. Hooray! :)
12952    path="$BOOT_JDK"
12953    has_space=`$ECHO "$path" | $GREP " "`
12954    if test "x$has_space" != x; then
12955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12957      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12958    fi
12959
12960    # Use eval to expand a potential ~
12961    eval path="$path"
12962    if test ! -f "$path" && test ! -d "$path"; then
12963      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12964    fi
12965
12966    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12967  fi
12968
12969              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12970$as_echo_n "checking for Boot JDK... " >&6; }
12971              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12972$as_echo "$BOOT_JDK" >&6; }
12973              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12974$as_echo_n "checking Boot JDK version... " >&6; }
12975              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12976              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12977$as_echo "$BOOT_JDK_VERSION" >&6; }
12978            fi # end check jdk version
12979          fi # end check rt.jar
12980        fi # end check javac
12981      fi # end check java
12982    fi # end check boot jdk found
12983  fi
12984
12985
12986  if test "x$BOOT_JDK_FOUND" = xno; then
12987    # Now execute the test
12988
12989  if test "x$PROGRAMW6432" != x; then
12990    VIRTUAL_DIR="$PROGRAMW6432/Java"
12991
12992  windows_path="$VIRTUAL_DIR"
12993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12994    unix_path=`$CYGPATH -u "$windows_path"`
12995    VIRTUAL_DIR="$unix_path"
12996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12998    VIRTUAL_DIR="$unix_path"
12999  fi
13000
13001
13002  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13003  BOOT_JDK_SUFFIX=""
13004  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13005  if test "x$ALL_JDKS_FOUND" != x; then
13006    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13007
13008  if test "x$BOOT_JDK_FOUND" = xno; then
13009    # Now execute the test
13010
13011        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13012        if test -d "$BOOT_JDK"; then
13013          BOOT_JDK_FOUND=maybe
13014          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13015$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13016        fi
13017
13018
13019    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13020    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13021      # Do we have a bin/java?
13022      if test ! -x "$BOOT_JDK/bin/java"; then
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13025        BOOT_JDK_FOUND=no
13026      else
13027        # Do we have a bin/javac?
13028        if test ! -x "$BOOT_JDK/bin/javac"; then
13029          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13031          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13032$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13033          BOOT_JDK_FOUND=no
13034        else
13035          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13036          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13037            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13039            BOOT_JDK_FOUND=no
13040          else
13041            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13042            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13043
13044            # Extra M4 quote needed to protect [] in grep expression.
13045            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13046            if test "x$FOUND_VERSION_78" = x; then
13047              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13049              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13050$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13051              BOOT_JDK_FOUND=no
13052            else
13053              # We're done! :-)
13054              BOOT_JDK_FOUND=yes
13055
13056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13057
13058  # Input might be given as Windows format, start by converting to
13059  # unix format.
13060  path="$BOOT_JDK"
13061  new_path=`$CYGPATH -u "$path"`
13062
13063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13066  # "foo.exe" is OK but "foo" is an error.
13067  #
13068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13069  # It is also a way to make sure we got the proper file name for the real test later on.
13070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13071  if test "x$test_shortpath" = x; then
13072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13073$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13074    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13075  fi
13076
13077  # Call helper function which possibly converts this using DOS-style short mode.
13078  # If so, the updated path is stored in $new_path.
13079
13080  input_path="$new_path"
13081  # Check if we need to convert this using DOS-style short mode. If the path
13082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13083  # take no chances and rewrite it.
13084  # Note: m4 eats our [], so we need to use [ and ] instead.
13085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13086  if test "x$has_forbidden_chars" != x; then
13087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13091      # Going to short mode and back again did indeed matter. Since short mode is
13092      # case insensitive, let's make it lowercase to improve readability.
13093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13094      # Now convert it back to Unix-stile (cygpath)
13095      input_path=`$CYGPATH -u "$shortmode_path"`
13096      new_path="$input_path"
13097    fi
13098  fi
13099
13100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13101  if test "x$test_cygdrive_prefix" = x; then
13102    # As a simple fix, exclude /usr/bin since it's not a real path.
13103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13105      # a path prefixed by /cygdrive for fixpath to work.
13106      new_path="$CYGWIN_ROOT_PATH$input_path"
13107    fi
13108  fi
13109
13110
13111  if test "x$path" != "x$new_path"; then
13112    BOOT_JDK="$new_path"
13113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13115  fi
13116
13117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13118
13119  path="$BOOT_JDK"
13120  has_colon=`$ECHO $path | $GREP ^.:`
13121  new_path="$path"
13122  if test "x$has_colon" = x; then
13123    # Not in mixed or Windows style, start by that.
13124    new_path=`cmd //c echo $path`
13125  fi
13126
13127
13128  input_path="$new_path"
13129  # Check if we need to convert this using DOS-style short mode. If the path
13130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13131  # take no chances and rewrite it.
13132  # Note: m4 eats our [], so we need to use [ and ] instead.
13133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13134  if test "x$has_forbidden_chars" != x; then
13135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13137  fi
13138
13139
13140  windows_path="$new_path"
13141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13142    unix_path=`$CYGPATH -u "$windows_path"`
13143    new_path="$unix_path"
13144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13146    new_path="$unix_path"
13147  fi
13148
13149  if test "x$path" != "x$new_path"; then
13150    BOOT_JDK="$new_path"
13151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13153  fi
13154
13155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13157
13158  else
13159    # We're on a posix platform. Hooray! :)
13160    path="$BOOT_JDK"
13161    has_space=`$ECHO "$path" | $GREP " "`
13162    if test "x$has_space" != x; then
13163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13164$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13165      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13166    fi
13167
13168    # Use eval to expand a potential ~
13169    eval path="$path"
13170    if test ! -f "$path" && test ! -d "$path"; then
13171      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13172    fi
13173
13174    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13175  fi
13176
13177              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13178$as_echo_n "checking for Boot JDK... " >&6; }
13179              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13180$as_echo "$BOOT_JDK" >&6; }
13181              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13182$as_echo_n "checking Boot JDK version... " >&6; }
13183              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13184              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13185$as_echo "$BOOT_JDK_VERSION" >&6; }
13186            fi # end check jdk version
13187          fi # end check rt.jar
13188        fi # end check javac
13189      fi # end check java
13190    fi # end check boot jdk found
13191  fi
13192
13193    done
13194  fi
13195
13196  fi
13197
13198
13199    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13200    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13201      # Do we have a bin/java?
13202      if test ! -x "$BOOT_JDK/bin/java"; then
13203        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13205        BOOT_JDK_FOUND=no
13206      else
13207        # Do we have a bin/javac?
13208        if test ! -x "$BOOT_JDK/bin/javac"; then
13209          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13211          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13212$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13213          BOOT_JDK_FOUND=no
13214        else
13215          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13216          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13217            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13219            BOOT_JDK_FOUND=no
13220          else
13221            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13222            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13223
13224            # Extra M4 quote needed to protect [] in grep expression.
13225            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13226            if test "x$FOUND_VERSION_78" = x; then
13227              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13229              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13230$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13231              BOOT_JDK_FOUND=no
13232            else
13233              # We're done! :-)
13234              BOOT_JDK_FOUND=yes
13235
13236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13237
13238  # Input might be given as Windows format, start by converting to
13239  # unix format.
13240  path="$BOOT_JDK"
13241  new_path=`$CYGPATH -u "$path"`
13242
13243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13246  # "foo.exe" is OK but "foo" is an error.
13247  #
13248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13249  # It is also a way to make sure we got the proper file name for the real test later on.
13250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13251  if test "x$test_shortpath" = x; then
13252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13253$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13254    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13255  fi
13256
13257  # Call helper function which possibly converts this using DOS-style short mode.
13258  # If so, the updated path is stored in $new_path.
13259
13260  input_path="$new_path"
13261  # Check if we need to convert this using DOS-style short mode. If the path
13262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13263  # take no chances and rewrite it.
13264  # Note: m4 eats our [], so we need to use [ and ] instead.
13265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13266  if test "x$has_forbidden_chars" != x; then
13267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13271      # Going to short mode and back again did indeed matter. Since short mode is
13272      # case insensitive, let's make it lowercase to improve readability.
13273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13274      # Now convert it back to Unix-stile (cygpath)
13275      input_path=`$CYGPATH -u "$shortmode_path"`
13276      new_path="$input_path"
13277    fi
13278  fi
13279
13280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13281  if test "x$test_cygdrive_prefix" = x; then
13282    # As a simple fix, exclude /usr/bin since it's not a real path.
13283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13285      # a path prefixed by /cygdrive for fixpath to work.
13286      new_path="$CYGWIN_ROOT_PATH$input_path"
13287    fi
13288  fi
13289
13290
13291  if test "x$path" != "x$new_path"; then
13292    BOOT_JDK="$new_path"
13293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13295  fi
13296
13297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13298
13299  path="$BOOT_JDK"
13300  has_colon=`$ECHO $path | $GREP ^.:`
13301  new_path="$path"
13302  if test "x$has_colon" = x; then
13303    # Not in mixed or Windows style, start by that.
13304    new_path=`cmd //c echo $path`
13305  fi
13306
13307
13308  input_path="$new_path"
13309  # Check if we need to convert this using DOS-style short mode. If the path
13310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13311  # take no chances and rewrite it.
13312  # Note: m4 eats our [], so we need to use [ and ] instead.
13313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13314  if test "x$has_forbidden_chars" != x; then
13315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13317  fi
13318
13319
13320  windows_path="$new_path"
13321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13322    unix_path=`$CYGPATH -u "$windows_path"`
13323    new_path="$unix_path"
13324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13326    new_path="$unix_path"
13327  fi
13328
13329  if test "x$path" != "x$new_path"; then
13330    BOOT_JDK="$new_path"
13331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13332$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13333  fi
13334
13335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13337
13338  else
13339    # We're on a posix platform. Hooray! :)
13340    path="$BOOT_JDK"
13341    has_space=`$ECHO "$path" | $GREP " "`
13342    if test "x$has_space" != x; then
13343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13344$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13345      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13346    fi
13347
13348    # Use eval to expand a potential ~
13349    eval path="$path"
13350    if test ! -f "$path" && test ! -d "$path"; then
13351      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13352    fi
13353
13354    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13355  fi
13356
13357              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13358$as_echo_n "checking for Boot JDK... " >&6; }
13359              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13360$as_echo "$BOOT_JDK" >&6; }
13361              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13362$as_echo_n "checking Boot JDK version... " >&6; }
13363              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13364              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13365$as_echo "$BOOT_JDK_VERSION" >&6; }
13366            fi # end check jdk version
13367          fi # end check rt.jar
13368        fi # end check javac
13369      fi # end check java
13370    fi # end check boot jdk found
13371  fi
13372
13373
13374  if test "x$BOOT_JDK_FOUND" = xno; then
13375    # Now execute the test
13376
13377  if test "x$PROGRAMFILES" != x; then
13378    VIRTUAL_DIR="$PROGRAMFILES/Java"
13379
13380  windows_path="$VIRTUAL_DIR"
13381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13382    unix_path=`$CYGPATH -u "$windows_path"`
13383    VIRTUAL_DIR="$unix_path"
13384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13386    VIRTUAL_DIR="$unix_path"
13387  fi
13388
13389
13390  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13391  BOOT_JDK_SUFFIX=""
13392  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13393  if test "x$ALL_JDKS_FOUND" != x; then
13394    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13395
13396  if test "x$BOOT_JDK_FOUND" = xno; then
13397    # Now execute the test
13398
13399        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13400        if test -d "$BOOT_JDK"; then
13401          BOOT_JDK_FOUND=maybe
13402          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13403$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13404        fi
13405
13406
13407    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13408    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13409      # Do we have a bin/java?
13410      if test ! -x "$BOOT_JDK/bin/java"; then
13411        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13413        BOOT_JDK_FOUND=no
13414      else
13415        # Do we have a bin/javac?
13416        if test ! -x "$BOOT_JDK/bin/javac"; then
13417          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13419          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13420$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13421          BOOT_JDK_FOUND=no
13422        else
13423          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13424          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13425            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13427            BOOT_JDK_FOUND=no
13428          else
13429            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13430            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13431
13432            # Extra M4 quote needed to protect [] in grep expression.
13433            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13434            if test "x$FOUND_VERSION_78" = x; then
13435              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13437              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13438$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13439              BOOT_JDK_FOUND=no
13440            else
13441              # We're done! :-)
13442              BOOT_JDK_FOUND=yes
13443
13444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13445
13446  # Input might be given as Windows format, start by converting to
13447  # unix format.
13448  path="$BOOT_JDK"
13449  new_path=`$CYGPATH -u "$path"`
13450
13451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13454  # "foo.exe" is OK but "foo" is an error.
13455  #
13456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13457  # It is also a way to make sure we got the proper file name for the real test later on.
13458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13459  if test "x$test_shortpath" = x; then
13460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13462    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13463  fi
13464
13465  # Call helper function which possibly converts this using DOS-style short mode.
13466  # If so, the updated path is stored in $new_path.
13467
13468  input_path="$new_path"
13469  # Check if we need to convert this using DOS-style short mode. If the path
13470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13471  # take no chances and rewrite it.
13472  # Note: m4 eats our [], so we need to use [ and ] instead.
13473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13474  if test "x$has_forbidden_chars" != x; then
13475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13479      # Going to short mode and back again did indeed matter. Since short mode is
13480      # case insensitive, let's make it lowercase to improve readability.
13481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13482      # Now convert it back to Unix-stile (cygpath)
13483      input_path=`$CYGPATH -u "$shortmode_path"`
13484      new_path="$input_path"
13485    fi
13486  fi
13487
13488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13489  if test "x$test_cygdrive_prefix" = x; then
13490    # As a simple fix, exclude /usr/bin since it's not a real path.
13491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13493      # a path prefixed by /cygdrive for fixpath to work.
13494      new_path="$CYGWIN_ROOT_PATH$input_path"
13495    fi
13496  fi
13497
13498
13499  if test "x$path" != "x$new_path"; then
13500    BOOT_JDK="$new_path"
13501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13503  fi
13504
13505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13506
13507  path="$BOOT_JDK"
13508  has_colon=`$ECHO $path | $GREP ^.:`
13509  new_path="$path"
13510  if test "x$has_colon" = x; then
13511    # Not in mixed or Windows style, start by that.
13512    new_path=`cmd //c echo $path`
13513  fi
13514
13515
13516  input_path="$new_path"
13517  # Check if we need to convert this using DOS-style short mode. If the path
13518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13519  # take no chances and rewrite it.
13520  # Note: m4 eats our [], so we need to use [ and ] instead.
13521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13522  if test "x$has_forbidden_chars" != x; then
13523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13525  fi
13526
13527
13528  windows_path="$new_path"
13529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13530    unix_path=`$CYGPATH -u "$windows_path"`
13531    new_path="$unix_path"
13532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13534    new_path="$unix_path"
13535  fi
13536
13537  if test "x$path" != "x$new_path"; then
13538    BOOT_JDK="$new_path"
13539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13541  fi
13542
13543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13545
13546  else
13547    # We're on a posix platform. Hooray! :)
13548    path="$BOOT_JDK"
13549    has_space=`$ECHO "$path" | $GREP " "`
13550    if test "x$has_space" != x; then
13551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13553      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13554    fi
13555
13556    # Use eval to expand a potential ~
13557    eval path="$path"
13558    if test ! -f "$path" && test ! -d "$path"; then
13559      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13560    fi
13561
13562    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13563  fi
13564
13565              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13566$as_echo_n "checking for Boot JDK... " >&6; }
13567              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13568$as_echo "$BOOT_JDK" >&6; }
13569              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13570$as_echo_n "checking Boot JDK version... " >&6; }
13571              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13572              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13573$as_echo "$BOOT_JDK_VERSION" >&6; }
13574            fi # end check jdk version
13575          fi # end check rt.jar
13576        fi # end check javac
13577      fi # end check java
13578    fi # end check boot jdk found
13579  fi
13580
13581    done
13582  fi
13583
13584  fi
13585
13586
13587    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13588    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13589      # Do we have a bin/java?
13590      if test ! -x "$BOOT_JDK/bin/java"; then
13591        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13593        BOOT_JDK_FOUND=no
13594      else
13595        # Do we have a bin/javac?
13596        if test ! -x "$BOOT_JDK/bin/javac"; then
13597          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13599          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13600$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13601          BOOT_JDK_FOUND=no
13602        else
13603          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13604          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13605            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13607            BOOT_JDK_FOUND=no
13608          else
13609            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13610            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13611
13612            # Extra M4 quote needed to protect [] in grep expression.
13613            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13614            if test "x$FOUND_VERSION_78" = x; then
13615              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13617              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13618$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13619              BOOT_JDK_FOUND=no
13620            else
13621              # We're done! :-)
13622              BOOT_JDK_FOUND=yes
13623
13624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13625
13626  # Input might be given as Windows format, start by converting to
13627  # unix format.
13628  path="$BOOT_JDK"
13629  new_path=`$CYGPATH -u "$path"`
13630
13631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13634  # "foo.exe" is OK but "foo" is an error.
13635  #
13636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13637  # It is also a way to make sure we got the proper file name for the real test later on.
13638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13639  if test "x$test_shortpath" = x; then
13640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13642    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13643  fi
13644
13645  # Call helper function which possibly converts this using DOS-style short mode.
13646  # If so, the updated path is stored in $new_path.
13647
13648  input_path="$new_path"
13649  # Check if we need to convert this using DOS-style short mode. If the path
13650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13651  # take no chances and rewrite it.
13652  # Note: m4 eats our [], so we need to use [ and ] instead.
13653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13654  if test "x$has_forbidden_chars" != x; then
13655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13659      # Going to short mode and back again did indeed matter. Since short mode is
13660      # case insensitive, let's make it lowercase to improve readability.
13661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13662      # Now convert it back to Unix-stile (cygpath)
13663      input_path=`$CYGPATH -u "$shortmode_path"`
13664      new_path="$input_path"
13665    fi
13666  fi
13667
13668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13669  if test "x$test_cygdrive_prefix" = x; then
13670    # As a simple fix, exclude /usr/bin since it's not a real path.
13671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13673      # a path prefixed by /cygdrive for fixpath to work.
13674      new_path="$CYGWIN_ROOT_PATH$input_path"
13675    fi
13676  fi
13677
13678
13679  if test "x$path" != "x$new_path"; then
13680    BOOT_JDK="$new_path"
13681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13683  fi
13684
13685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13686
13687  path="$BOOT_JDK"
13688  has_colon=`$ECHO $path | $GREP ^.:`
13689  new_path="$path"
13690  if test "x$has_colon" = x; then
13691    # Not in mixed or Windows style, start by that.
13692    new_path=`cmd //c echo $path`
13693  fi
13694
13695
13696  input_path="$new_path"
13697  # Check if we need to convert this using DOS-style short mode. If the path
13698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13699  # take no chances and rewrite it.
13700  # Note: m4 eats our [], so we need to use [ and ] instead.
13701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13702  if test "x$has_forbidden_chars" != x; then
13703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13705  fi
13706
13707
13708  windows_path="$new_path"
13709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13710    unix_path=`$CYGPATH -u "$windows_path"`
13711    new_path="$unix_path"
13712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13714    new_path="$unix_path"
13715  fi
13716
13717  if test "x$path" != "x$new_path"; then
13718    BOOT_JDK="$new_path"
13719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13721  fi
13722
13723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13725
13726  else
13727    # We're on a posix platform. Hooray! :)
13728    path="$BOOT_JDK"
13729    has_space=`$ECHO "$path" | $GREP " "`
13730    if test "x$has_space" != x; then
13731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13733      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13734    fi
13735
13736    # Use eval to expand a potential ~
13737    eval path="$path"
13738    if test ! -f "$path" && test ! -d "$path"; then
13739      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13740    fi
13741
13742    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13743  fi
13744
13745              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13746$as_echo_n "checking for Boot JDK... " >&6; }
13747              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13748$as_echo "$BOOT_JDK" >&6; }
13749              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13750$as_echo_n "checking Boot JDK version... " >&6; }
13751              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13752              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13753$as_echo "$BOOT_JDK_VERSION" >&6; }
13754            fi # end check jdk version
13755          fi # end check rt.jar
13756        fi # end check javac
13757      fi # end check java
13758    fi # end check boot jdk found
13759  fi
13760
13761
13762  if test "x$BOOT_JDK_FOUND" = xno; then
13763    # Now execute the test
13764
13765  if test "x$ProgramFiles" != x; then
13766    VIRTUAL_DIR="$ProgramFiles/Java"
13767
13768  windows_path="$VIRTUAL_DIR"
13769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13770    unix_path=`$CYGPATH -u "$windows_path"`
13771    VIRTUAL_DIR="$unix_path"
13772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13774    VIRTUAL_DIR="$unix_path"
13775  fi
13776
13777
13778  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13779  BOOT_JDK_SUFFIX=""
13780  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13781  if test "x$ALL_JDKS_FOUND" != x; then
13782    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13783
13784  if test "x$BOOT_JDK_FOUND" = xno; then
13785    # Now execute the test
13786
13787        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13788        if test -d "$BOOT_JDK"; then
13789          BOOT_JDK_FOUND=maybe
13790          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13791$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13792        fi
13793
13794
13795    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13796    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13797      # Do we have a bin/java?
13798      if test ! -x "$BOOT_JDK/bin/java"; then
13799        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13801        BOOT_JDK_FOUND=no
13802      else
13803        # Do we have a bin/javac?
13804        if test ! -x "$BOOT_JDK/bin/javac"; then
13805          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13807          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13808$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13809          BOOT_JDK_FOUND=no
13810        else
13811          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13812          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13813            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13815            BOOT_JDK_FOUND=no
13816          else
13817            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13818            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13819
13820            # Extra M4 quote needed to protect [] in grep expression.
13821            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13822            if test "x$FOUND_VERSION_78" = x; then
13823              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13825              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13826$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13827              BOOT_JDK_FOUND=no
13828            else
13829              # We're done! :-)
13830              BOOT_JDK_FOUND=yes
13831
13832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13833
13834  # Input might be given as Windows format, start by converting to
13835  # unix format.
13836  path="$BOOT_JDK"
13837  new_path=`$CYGPATH -u "$path"`
13838
13839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13842  # "foo.exe" is OK but "foo" is an error.
13843  #
13844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13845  # It is also a way to make sure we got the proper file name for the real test later on.
13846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13847  if test "x$test_shortpath" = x; then
13848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13851  fi
13852
13853  # Call helper function which possibly converts this using DOS-style short mode.
13854  # If so, the updated path is stored in $new_path.
13855
13856  input_path="$new_path"
13857  # Check if we need to convert this using DOS-style short mode. If the path
13858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13859  # take no chances and rewrite it.
13860  # Note: m4 eats our [], so we need to use [ and ] instead.
13861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13862  if test "x$has_forbidden_chars" != x; then
13863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13867      # Going to short mode and back again did indeed matter. Since short mode is
13868      # case insensitive, let's make it lowercase to improve readability.
13869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13870      # Now convert it back to Unix-stile (cygpath)
13871      input_path=`$CYGPATH -u "$shortmode_path"`
13872      new_path="$input_path"
13873    fi
13874  fi
13875
13876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13877  if test "x$test_cygdrive_prefix" = x; then
13878    # As a simple fix, exclude /usr/bin since it's not a real path.
13879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13881      # a path prefixed by /cygdrive for fixpath to work.
13882      new_path="$CYGWIN_ROOT_PATH$input_path"
13883    fi
13884  fi
13885
13886
13887  if test "x$path" != "x$new_path"; then
13888    BOOT_JDK="$new_path"
13889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13891  fi
13892
13893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13894
13895  path="$BOOT_JDK"
13896  has_colon=`$ECHO $path | $GREP ^.:`
13897  new_path="$path"
13898  if test "x$has_colon" = x; then
13899    # Not in mixed or Windows style, start by that.
13900    new_path=`cmd //c echo $path`
13901  fi
13902
13903
13904  input_path="$new_path"
13905  # Check if we need to convert this using DOS-style short mode. If the path
13906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13907  # take no chances and rewrite it.
13908  # Note: m4 eats our [], so we need to use [ and ] instead.
13909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13910  if test "x$has_forbidden_chars" != x; then
13911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13913  fi
13914
13915
13916  windows_path="$new_path"
13917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13918    unix_path=`$CYGPATH -u "$windows_path"`
13919    new_path="$unix_path"
13920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13922    new_path="$unix_path"
13923  fi
13924
13925  if test "x$path" != "x$new_path"; then
13926    BOOT_JDK="$new_path"
13927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13929  fi
13930
13931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13933
13934  else
13935    # We're on a posix platform. Hooray! :)
13936    path="$BOOT_JDK"
13937    has_space=`$ECHO "$path" | $GREP " "`
13938    if test "x$has_space" != x; then
13939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13941      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13942    fi
13943
13944    # Use eval to expand a potential ~
13945    eval path="$path"
13946    if test ! -f "$path" && test ! -d "$path"; then
13947      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13948    fi
13949
13950    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13951  fi
13952
13953              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13954$as_echo_n "checking for Boot JDK... " >&6; }
13955              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13956$as_echo "$BOOT_JDK" >&6; }
13957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13958$as_echo_n "checking Boot JDK version... " >&6; }
13959              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13961$as_echo "$BOOT_JDK_VERSION" >&6; }
13962            fi # end check jdk version
13963          fi # end check rt.jar
13964        fi # end check javac
13965      fi # end check java
13966    fi # end check boot jdk found
13967  fi
13968
13969    done
13970  fi
13971
13972  fi
13973
13974
13975    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13976    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13977      # Do we have a bin/java?
13978      if test ! -x "$BOOT_JDK/bin/java"; then
13979        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13981        BOOT_JDK_FOUND=no
13982      else
13983        # Do we have a bin/javac?
13984        if test ! -x "$BOOT_JDK/bin/javac"; then
13985          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13987          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13988$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13989          BOOT_JDK_FOUND=no
13990        else
13991          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13992          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13993            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13995            BOOT_JDK_FOUND=no
13996          else
13997            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13998            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13999
14000            # Extra M4 quote needed to protect [] in grep expression.
14001            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14002            if test "x$FOUND_VERSION_78" = x; then
14003              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14005              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14006$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14007              BOOT_JDK_FOUND=no
14008            else
14009              # We're done! :-)
14010              BOOT_JDK_FOUND=yes
14011
14012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14013
14014  # Input might be given as Windows format, start by converting to
14015  # unix format.
14016  path="$BOOT_JDK"
14017  new_path=`$CYGPATH -u "$path"`
14018
14019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14022  # "foo.exe" is OK but "foo" is an error.
14023  #
14024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14025  # It is also a way to make sure we got the proper file name for the real test later on.
14026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14027  if test "x$test_shortpath" = x; then
14028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14031  fi
14032
14033  # Call helper function which possibly converts this using DOS-style short mode.
14034  # If so, the updated path is stored in $new_path.
14035
14036  input_path="$new_path"
14037  # Check if we need to convert this using DOS-style short mode. If the path
14038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14039  # take no chances and rewrite it.
14040  # Note: m4 eats our [], so we need to use [ and ] instead.
14041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14042  if test "x$has_forbidden_chars" != x; then
14043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14047      # Going to short mode and back again did indeed matter. Since short mode is
14048      # case insensitive, let's make it lowercase to improve readability.
14049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14050      # Now convert it back to Unix-stile (cygpath)
14051      input_path=`$CYGPATH -u "$shortmode_path"`
14052      new_path="$input_path"
14053    fi
14054  fi
14055
14056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14057  if test "x$test_cygdrive_prefix" = x; then
14058    # As a simple fix, exclude /usr/bin since it's not a real path.
14059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14061      # a path prefixed by /cygdrive for fixpath to work.
14062      new_path="$CYGWIN_ROOT_PATH$input_path"
14063    fi
14064  fi
14065
14066
14067  if test "x$path" != "x$new_path"; then
14068    BOOT_JDK="$new_path"
14069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14071  fi
14072
14073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14074
14075  path="$BOOT_JDK"
14076  has_colon=`$ECHO $path | $GREP ^.:`
14077  new_path="$path"
14078  if test "x$has_colon" = x; then
14079    # Not in mixed or Windows style, start by that.
14080    new_path=`cmd //c echo $path`
14081  fi
14082
14083
14084  input_path="$new_path"
14085  # Check if we need to convert this using DOS-style short mode. If the path
14086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14087  # take no chances and rewrite it.
14088  # Note: m4 eats our [], so we need to use [ and ] instead.
14089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14090  if test "x$has_forbidden_chars" != x; then
14091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14093  fi
14094
14095
14096  windows_path="$new_path"
14097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14098    unix_path=`$CYGPATH -u "$windows_path"`
14099    new_path="$unix_path"
14100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14102    new_path="$unix_path"
14103  fi
14104
14105  if test "x$path" != "x$new_path"; then
14106    BOOT_JDK="$new_path"
14107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14109  fi
14110
14111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14113
14114  else
14115    # We're on a posix platform. Hooray! :)
14116    path="$BOOT_JDK"
14117    has_space=`$ECHO "$path" | $GREP " "`
14118    if test "x$has_space" != x; then
14119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14121      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14122    fi
14123
14124    # Use eval to expand a potential ~
14125    eval path="$path"
14126    if test ! -f "$path" && test ! -d "$path"; then
14127      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14128    fi
14129
14130    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14131  fi
14132
14133              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14134$as_echo_n "checking for Boot JDK... " >&6; }
14135              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14136$as_echo "$BOOT_JDK" >&6; }
14137              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14138$as_echo_n "checking Boot JDK version... " >&6; }
14139              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14140              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14141$as_echo "$BOOT_JDK_VERSION" >&6; }
14142            fi # end check jdk version
14143          fi # end check rt.jar
14144        fi # end check javac
14145      fi # end check java
14146    fi # end check boot jdk found
14147  fi
14148
14149
14150  if test "x$BOOT_JDK_FOUND" = xno; then
14151    # Now execute the test
14152
14153  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14154  BOOT_JDK_SUFFIX=""
14155  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14156  if test "x$ALL_JDKS_FOUND" != x; then
14157    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14158
14159  if test "x$BOOT_JDK_FOUND" = xno; then
14160    # Now execute the test
14161
14162        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14163        if test -d "$BOOT_JDK"; then
14164          BOOT_JDK_FOUND=maybe
14165          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14166$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14167        fi
14168
14169
14170    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14171    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14172      # Do we have a bin/java?
14173      if test ! -x "$BOOT_JDK/bin/java"; then
14174        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14176        BOOT_JDK_FOUND=no
14177      else
14178        # Do we have a bin/javac?
14179        if test ! -x "$BOOT_JDK/bin/javac"; then
14180          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14182          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14183$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14184          BOOT_JDK_FOUND=no
14185        else
14186          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14187          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14188            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14190            BOOT_JDK_FOUND=no
14191          else
14192            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14193            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14194
14195            # Extra M4 quote needed to protect [] in grep expression.
14196            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14197            if test "x$FOUND_VERSION_78" = x; then
14198              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14200              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14201$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14202              BOOT_JDK_FOUND=no
14203            else
14204              # We're done! :-)
14205              BOOT_JDK_FOUND=yes
14206
14207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14208
14209  # Input might be given as Windows format, start by converting to
14210  # unix format.
14211  path="$BOOT_JDK"
14212  new_path=`$CYGPATH -u "$path"`
14213
14214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14217  # "foo.exe" is OK but "foo" is an error.
14218  #
14219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14220  # It is also a way to make sure we got the proper file name for the real test later on.
14221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14222  if test "x$test_shortpath" = x; then
14223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14225    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14226  fi
14227
14228  # Call helper function which possibly converts this using DOS-style short mode.
14229  # If so, the updated path is stored in $new_path.
14230
14231  input_path="$new_path"
14232  # Check if we need to convert this using DOS-style short mode. If the path
14233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14234  # take no chances and rewrite it.
14235  # Note: m4 eats our [], so we need to use [ and ] instead.
14236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14237  if test "x$has_forbidden_chars" != x; then
14238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14242      # Going to short mode and back again did indeed matter. Since short mode is
14243      # case insensitive, let's make it lowercase to improve readability.
14244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14245      # Now convert it back to Unix-stile (cygpath)
14246      input_path=`$CYGPATH -u "$shortmode_path"`
14247      new_path="$input_path"
14248    fi
14249  fi
14250
14251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14252  if test "x$test_cygdrive_prefix" = x; then
14253    # As a simple fix, exclude /usr/bin since it's not a real path.
14254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14256      # a path prefixed by /cygdrive for fixpath to work.
14257      new_path="$CYGWIN_ROOT_PATH$input_path"
14258    fi
14259  fi
14260
14261
14262  if test "x$path" != "x$new_path"; then
14263    BOOT_JDK="$new_path"
14264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14265$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14266  fi
14267
14268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14269
14270  path="$BOOT_JDK"
14271  has_colon=`$ECHO $path | $GREP ^.:`
14272  new_path="$path"
14273  if test "x$has_colon" = x; then
14274    # Not in mixed or Windows style, start by that.
14275    new_path=`cmd //c echo $path`
14276  fi
14277
14278
14279  input_path="$new_path"
14280  # Check if we need to convert this using DOS-style short mode. If the path
14281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14282  # take no chances and rewrite it.
14283  # Note: m4 eats our [], so we need to use [ and ] instead.
14284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14285  if test "x$has_forbidden_chars" != x; then
14286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14288  fi
14289
14290
14291  windows_path="$new_path"
14292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14293    unix_path=`$CYGPATH -u "$windows_path"`
14294    new_path="$unix_path"
14295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14297    new_path="$unix_path"
14298  fi
14299
14300  if test "x$path" != "x$new_path"; then
14301    BOOT_JDK="$new_path"
14302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14303$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14304  fi
14305
14306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14308
14309  else
14310    # We're on a posix platform. Hooray! :)
14311    path="$BOOT_JDK"
14312    has_space=`$ECHO "$path" | $GREP " "`
14313    if test "x$has_space" != x; then
14314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14316      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14317    fi
14318
14319    # Use eval to expand a potential ~
14320    eval path="$path"
14321    if test ! -f "$path" && test ! -d "$path"; then
14322      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14323    fi
14324
14325    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14326  fi
14327
14328              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14329$as_echo_n "checking for Boot JDK... " >&6; }
14330              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14331$as_echo "$BOOT_JDK" >&6; }
14332              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14333$as_echo_n "checking Boot JDK version... " >&6; }
14334              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14335              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14336$as_echo "$BOOT_JDK_VERSION" >&6; }
14337            fi # end check jdk version
14338          fi # end check rt.jar
14339        fi # end check javac
14340      fi # end check java
14341    fi # end check boot jdk found
14342  fi
14343
14344    done
14345  fi
14346
14347
14348    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14349    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14350      # Do we have a bin/java?
14351      if test ! -x "$BOOT_JDK/bin/java"; then
14352        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14354        BOOT_JDK_FOUND=no
14355      else
14356        # Do we have a bin/javac?
14357        if test ! -x "$BOOT_JDK/bin/javac"; then
14358          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14360          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14361$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14362          BOOT_JDK_FOUND=no
14363        else
14364          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14365          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14366            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14368            BOOT_JDK_FOUND=no
14369          else
14370            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14371            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14372
14373            # Extra M4 quote needed to protect [] in grep expression.
14374            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14375            if test "x$FOUND_VERSION_78" = x; then
14376              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14378              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14379$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14380              BOOT_JDK_FOUND=no
14381            else
14382              # We're done! :-)
14383              BOOT_JDK_FOUND=yes
14384
14385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14386
14387  # Input might be given as Windows format, start by converting to
14388  # unix format.
14389  path="$BOOT_JDK"
14390  new_path=`$CYGPATH -u "$path"`
14391
14392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14395  # "foo.exe" is OK but "foo" is an error.
14396  #
14397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14398  # It is also a way to make sure we got the proper file name for the real test later on.
14399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14400  if test "x$test_shortpath" = x; then
14401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14403    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14404  fi
14405
14406  # Call helper function which possibly converts this using DOS-style short mode.
14407  # If so, the updated path is stored in $new_path.
14408
14409  input_path="$new_path"
14410  # Check if we need to convert this using DOS-style short mode. If the path
14411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14412  # take no chances and rewrite it.
14413  # Note: m4 eats our [], so we need to use [ and ] instead.
14414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14415  if test "x$has_forbidden_chars" != x; then
14416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14420      # Going to short mode and back again did indeed matter. Since short mode is
14421      # case insensitive, let's make it lowercase to improve readability.
14422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14423      # Now convert it back to Unix-stile (cygpath)
14424      input_path=`$CYGPATH -u "$shortmode_path"`
14425      new_path="$input_path"
14426    fi
14427  fi
14428
14429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14430  if test "x$test_cygdrive_prefix" = x; then
14431    # As a simple fix, exclude /usr/bin since it's not a real path.
14432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14434      # a path prefixed by /cygdrive for fixpath to work.
14435      new_path="$CYGWIN_ROOT_PATH$input_path"
14436    fi
14437  fi
14438
14439
14440  if test "x$path" != "x$new_path"; then
14441    BOOT_JDK="$new_path"
14442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14444  fi
14445
14446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14447
14448  path="$BOOT_JDK"
14449  has_colon=`$ECHO $path | $GREP ^.:`
14450  new_path="$path"
14451  if test "x$has_colon" = x; then
14452    # Not in mixed or Windows style, start by that.
14453    new_path=`cmd //c echo $path`
14454  fi
14455
14456
14457  input_path="$new_path"
14458  # Check if we need to convert this using DOS-style short mode. If the path
14459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14460  # take no chances and rewrite it.
14461  # Note: m4 eats our [], so we need to use [ and ] instead.
14462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14463  if test "x$has_forbidden_chars" != x; then
14464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14466  fi
14467
14468
14469  windows_path="$new_path"
14470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14471    unix_path=`$CYGPATH -u "$windows_path"`
14472    new_path="$unix_path"
14473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14475    new_path="$unix_path"
14476  fi
14477
14478  if test "x$path" != "x$new_path"; then
14479    BOOT_JDK="$new_path"
14480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14482  fi
14483
14484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14486
14487  else
14488    # We're on a posix platform. Hooray! :)
14489    path="$BOOT_JDK"
14490    has_space=`$ECHO "$path" | $GREP " "`
14491    if test "x$has_space" != x; then
14492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14494      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14495    fi
14496
14497    # Use eval to expand a potential ~
14498    eval path="$path"
14499    if test ! -f "$path" && test ! -d "$path"; then
14500      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14501    fi
14502
14503    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14504  fi
14505
14506              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14507$as_echo_n "checking for Boot JDK... " >&6; }
14508              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14509$as_echo "$BOOT_JDK" >&6; }
14510              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14511$as_echo_n "checking Boot JDK version... " >&6; }
14512              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14513              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14514$as_echo "$BOOT_JDK_VERSION" >&6; }
14515            fi # end check jdk version
14516          fi # end check rt.jar
14517        fi # end check javac
14518      fi # end check java
14519    fi # end check boot jdk found
14520  fi
14521
14522  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14523
14524  if test "x$BOOT_JDK_FOUND" = xno; then
14525    # Now execute the test
14526
14527  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14528  BOOT_JDK_SUFFIX="/Contents/Home"
14529  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14530  if test "x$ALL_JDKS_FOUND" != x; then
14531    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14532
14533  if test "x$BOOT_JDK_FOUND" = xno; then
14534    # Now execute the test
14535
14536        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14537        if test -d "$BOOT_JDK"; then
14538          BOOT_JDK_FOUND=maybe
14539          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14540$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14541        fi
14542
14543
14544    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14545    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14546      # Do we have a bin/java?
14547      if test ! -x "$BOOT_JDK/bin/java"; then
14548        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14550        BOOT_JDK_FOUND=no
14551      else
14552        # Do we have a bin/javac?
14553        if test ! -x "$BOOT_JDK/bin/javac"; then
14554          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14556          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14557$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14558          BOOT_JDK_FOUND=no
14559        else
14560          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14561          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14562            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14564            BOOT_JDK_FOUND=no
14565          else
14566            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14568
14569            # Extra M4 quote needed to protect [] in grep expression.
14570            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14571            if test "x$FOUND_VERSION_78" = x; then
14572              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14574              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14575$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14576              BOOT_JDK_FOUND=no
14577            else
14578              # We're done! :-)
14579              BOOT_JDK_FOUND=yes
14580
14581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14582
14583  # Input might be given as Windows format, start by converting to
14584  # unix format.
14585  path="$BOOT_JDK"
14586  new_path=`$CYGPATH -u "$path"`
14587
14588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14591  # "foo.exe" is OK but "foo" is an error.
14592  #
14593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14594  # It is also a way to make sure we got the proper file name for the real test later on.
14595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14596  if test "x$test_shortpath" = x; then
14597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14599    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14600  fi
14601
14602  # Call helper function which possibly converts this using DOS-style short mode.
14603  # If so, the updated path is stored in $new_path.
14604
14605  input_path="$new_path"
14606  # Check if we need to convert this using DOS-style short mode. If the path
14607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14608  # take no chances and rewrite it.
14609  # Note: m4 eats our [], so we need to use [ and ] instead.
14610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14611  if test "x$has_forbidden_chars" != x; then
14612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14616      # Going to short mode and back again did indeed matter. Since short mode is
14617      # case insensitive, let's make it lowercase to improve readability.
14618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14619      # Now convert it back to Unix-stile (cygpath)
14620      input_path=`$CYGPATH -u "$shortmode_path"`
14621      new_path="$input_path"
14622    fi
14623  fi
14624
14625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14626  if test "x$test_cygdrive_prefix" = x; then
14627    # As a simple fix, exclude /usr/bin since it's not a real path.
14628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14630      # a path prefixed by /cygdrive for fixpath to work.
14631      new_path="$CYGWIN_ROOT_PATH$input_path"
14632    fi
14633  fi
14634
14635
14636  if test "x$path" != "x$new_path"; then
14637    BOOT_JDK="$new_path"
14638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14640  fi
14641
14642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14643
14644  path="$BOOT_JDK"
14645  has_colon=`$ECHO $path | $GREP ^.:`
14646  new_path="$path"
14647  if test "x$has_colon" = x; then
14648    # Not in mixed or Windows style, start by that.
14649    new_path=`cmd //c echo $path`
14650  fi
14651
14652
14653  input_path="$new_path"
14654  # Check if we need to convert this using DOS-style short mode. If the path
14655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14656  # take no chances and rewrite it.
14657  # Note: m4 eats our [], so we need to use [ and ] instead.
14658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14659  if test "x$has_forbidden_chars" != x; then
14660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14662  fi
14663
14664
14665  windows_path="$new_path"
14666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14667    unix_path=`$CYGPATH -u "$windows_path"`
14668    new_path="$unix_path"
14669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14671    new_path="$unix_path"
14672  fi
14673
14674  if test "x$path" != "x$new_path"; then
14675    BOOT_JDK="$new_path"
14676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14678  fi
14679
14680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14682
14683  else
14684    # We're on a posix platform. Hooray! :)
14685    path="$BOOT_JDK"
14686    has_space=`$ECHO "$path" | $GREP " "`
14687    if test "x$has_space" != x; then
14688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14690      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14691    fi
14692
14693    # Use eval to expand a potential ~
14694    eval path="$path"
14695    if test ! -f "$path" && test ! -d "$path"; then
14696      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14697    fi
14698
14699    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14700  fi
14701
14702              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14703$as_echo_n "checking for Boot JDK... " >&6; }
14704              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14705$as_echo "$BOOT_JDK" >&6; }
14706              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14707$as_echo_n "checking Boot JDK version... " >&6; }
14708              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14709              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14710$as_echo "$BOOT_JDK_VERSION" >&6; }
14711            fi # end check jdk version
14712          fi # end check rt.jar
14713        fi # end check javac
14714      fi # end check java
14715    fi # end check boot jdk found
14716  fi
14717
14718    done
14719  fi
14720
14721
14722    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14723    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14724      # Do we have a bin/java?
14725      if test ! -x "$BOOT_JDK/bin/java"; then
14726        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14728        BOOT_JDK_FOUND=no
14729      else
14730        # Do we have a bin/javac?
14731        if test ! -x "$BOOT_JDK/bin/javac"; then
14732          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14734          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14735$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14736          BOOT_JDK_FOUND=no
14737        else
14738          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14739          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14740            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14742            BOOT_JDK_FOUND=no
14743          else
14744            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14745            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14746
14747            # Extra M4 quote needed to protect [] in grep expression.
14748            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14749            if test "x$FOUND_VERSION_78" = x; then
14750              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14752              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14753$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14754              BOOT_JDK_FOUND=no
14755            else
14756              # We're done! :-)
14757              BOOT_JDK_FOUND=yes
14758
14759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14760
14761  # Input might be given as Windows format, start by converting to
14762  # unix format.
14763  path="$BOOT_JDK"
14764  new_path=`$CYGPATH -u "$path"`
14765
14766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14769  # "foo.exe" is OK but "foo" is an error.
14770  #
14771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14772  # It is also a way to make sure we got the proper file name for the real test later on.
14773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14774  if test "x$test_shortpath" = x; then
14775    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14776$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14777    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14778  fi
14779
14780  # Call helper function which possibly converts this using DOS-style short mode.
14781  # If so, the updated path is stored in $new_path.
14782
14783  input_path="$new_path"
14784  # Check if we need to convert this using DOS-style short mode. If the path
14785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14786  # take no chances and rewrite it.
14787  # Note: m4 eats our [], so we need to use [ and ] instead.
14788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14789  if test "x$has_forbidden_chars" != x; then
14790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14794      # Going to short mode and back again did indeed matter. Since short mode is
14795      # case insensitive, let's make it lowercase to improve readability.
14796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14797      # Now convert it back to Unix-stile (cygpath)
14798      input_path=`$CYGPATH -u "$shortmode_path"`
14799      new_path="$input_path"
14800    fi
14801  fi
14802
14803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14804  if test "x$test_cygdrive_prefix" = x; then
14805    # As a simple fix, exclude /usr/bin since it's not a real path.
14806    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14808      # a path prefixed by /cygdrive for fixpath to work.
14809      new_path="$CYGWIN_ROOT_PATH$input_path"
14810    fi
14811  fi
14812
14813
14814  if test "x$path" != "x$new_path"; then
14815    BOOT_JDK="$new_path"
14816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14818  fi
14819
14820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14821
14822  path="$BOOT_JDK"
14823  has_colon=`$ECHO $path | $GREP ^.:`
14824  new_path="$path"
14825  if test "x$has_colon" = x; then
14826    # Not in mixed or Windows style, start by that.
14827    new_path=`cmd //c echo $path`
14828  fi
14829
14830
14831  input_path="$new_path"
14832  # Check if we need to convert this using DOS-style short mode. If the path
14833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14834  # take no chances and rewrite it.
14835  # Note: m4 eats our [], so we need to use [ and ] instead.
14836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14837  if test "x$has_forbidden_chars" != x; then
14838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14840  fi
14841
14842
14843  windows_path="$new_path"
14844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14845    unix_path=`$CYGPATH -u "$windows_path"`
14846    new_path="$unix_path"
14847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14849    new_path="$unix_path"
14850  fi
14851
14852  if test "x$path" != "x$new_path"; then
14853    BOOT_JDK="$new_path"
14854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14855$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14856  fi
14857
14858  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14859  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14860
14861  else
14862    # We're on a posix platform. Hooray! :)
14863    path="$BOOT_JDK"
14864    has_space=`$ECHO "$path" | $GREP " "`
14865    if test "x$has_space" != x; then
14866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14867$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14868      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14869    fi
14870
14871    # Use eval to expand a potential ~
14872    eval path="$path"
14873    if test ! -f "$path" && test ! -d "$path"; then
14874      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14875    fi
14876
14877    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14878  fi
14879
14880              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14881$as_echo_n "checking for Boot JDK... " >&6; }
14882              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14883$as_echo "$BOOT_JDK" >&6; }
14884              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14885$as_echo_n "checking Boot JDK version... " >&6; }
14886              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14887              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14888$as_echo "$BOOT_JDK_VERSION" >&6; }
14889            fi # end check jdk version
14890          fi # end check rt.jar
14891        fi # end check javac
14892      fi # end check java
14893    fi # end check boot jdk found
14894  fi
14895
14896
14897  if test "x$BOOT_JDK_FOUND" = xno; then
14898    # Now execute the test
14899
14900  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14901  BOOT_JDK_SUFFIX="/Contents/Home"
14902  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14903  if test "x$ALL_JDKS_FOUND" != x; then
14904    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14905
14906  if test "x$BOOT_JDK_FOUND" = xno; then
14907    # Now execute the test
14908
14909        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14910        if test -d "$BOOT_JDK"; then
14911          BOOT_JDK_FOUND=maybe
14912          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14913$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14914        fi
14915
14916
14917    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14918    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14919      # Do we have a bin/java?
14920      if test ! -x "$BOOT_JDK/bin/java"; then
14921        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14923        BOOT_JDK_FOUND=no
14924      else
14925        # Do we have a bin/javac?
14926        if test ! -x "$BOOT_JDK/bin/javac"; then
14927          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14929          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14930$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14931          BOOT_JDK_FOUND=no
14932        else
14933          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14934          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14935            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14937            BOOT_JDK_FOUND=no
14938          else
14939            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14940            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14941
14942            # Extra M4 quote needed to protect [] in grep expression.
14943            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14944            if test "x$FOUND_VERSION_78" = x; then
14945              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14947              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14948$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14949              BOOT_JDK_FOUND=no
14950            else
14951              # We're done! :-)
14952              BOOT_JDK_FOUND=yes
14953
14954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14955
14956  # Input might be given as Windows format, start by converting to
14957  # unix format.
14958  path="$BOOT_JDK"
14959  new_path=`$CYGPATH -u "$path"`
14960
14961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14964  # "foo.exe" is OK but "foo" is an error.
14965  #
14966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14967  # It is also a way to make sure we got the proper file name for the real test later on.
14968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14969  if test "x$test_shortpath" = x; then
14970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14971$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14972    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14973  fi
14974
14975  # Call helper function which possibly converts this using DOS-style short mode.
14976  # If so, the updated path is stored in $new_path.
14977
14978  input_path="$new_path"
14979  # Check if we need to convert this using DOS-style short mode. If the path
14980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14981  # take no chances and rewrite it.
14982  # Note: m4 eats our [], so we need to use [ and ] instead.
14983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14984  if test "x$has_forbidden_chars" != x; then
14985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14989      # Going to short mode and back again did indeed matter. Since short mode is
14990      # case insensitive, let's make it lowercase to improve readability.
14991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14992      # Now convert it back to Unix-stile (cygpath)
14993      input_path=`$CYGPATH -u "$shortmode_path"`
14994      new_path="$input_path"
14995    fi
14996  fi
14997
14998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14999  if test "x$test_cygdrive_prefix" = x; then
15000    # As a simple fix, exclude /usr/bin since it's not a real path.
15001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15003      # a path prefixed by /cygdrive for fixpath to work.
15004      new_path="$CYGWIN_ROOT_PATH$input_path"
15005    fi
15006  fi
15007
15008
15009  if test "x$path" != "x$new_path"; then
15010    BOOT_JDK="$new_path"
15011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15012$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15013  fi
15014
15015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15016
15017  path="$BOOT_JDK"
15018  has_colon=`$ECHO $path | $GREP ^.:`
15019  new_path="$path"
15020  if test "x$has_colon" = x; then
15021    # Not in mixed or Windows style, start by that.
15022    new_path=`cmd //c echo $path`
15023  fi
15024
15025
15026  input_path="$new_path"
15027  # Check if we need to convert this using DOS-style short mode. If the path
15028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15029  # take no chances and rewrite it.
15030  # Note: m4 eats our [], so we need to use [ and ] instead.
15031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15032  if test "x$has_forbidden_chars" != x; then
15033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15035  fi
15036
15037
15038  windows_path="$new_path"
15039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15040    unix_path=`$CYGPATH -u "$windows_path"`
15041    new_path="$unix_path"
15042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15044    new_path="$unix_path"
15045  fi
15046
15047  if test "x$path" != "x$new_path"; then
15048    BOOT_JDK="$new_path"
15049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15050$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15051  fi
15052
15053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15055
15056  else
15057    # We're on a posix platform. Hooray! :)
15058    path="$BOOT_JDK"
15059    has_space=`$ECHO "$path" | $GREP " "`
15060    if test "x$has_space" != x; then
15061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15063      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15064    fi
15065
15066    # Use eval to expand a potential ~
15067    eval path="$path"
15068    if test ! -f "$path" && test ! -d "$path"; then
15069      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15070    fi
15071
15072    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15073  fi
15074
15075              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15076$as_echo_n "checking for Boot JDK... " >&6; }
15077              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15078$as_echo "$BOOT_JDK" >&6; }
15079              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15080$as_echo_n "checking Boot JDK version... " >&6; }
15081              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15082              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15083$as_echo "$BOOT_JDK_VERSION" >&6; }
15084            fi # end check jdk version
15085          fi # end check rt.jar
15086        fi # end check javac
15087      fi # end check java
15088    fi # end check boot jdk found
15089  fi
15090
15091    done
15092  fi
15093
15094
15095    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15096    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15097      # Do we have a bin/java?
15098      if test ! -x "$BOOT_JDK/bin/java"; then
15099        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15101        BOOT_JDK_FOUND=no
15102      else
15103        # Do we have a bin/javac?
15104        if test ! -x "$BOOT_JDK/bin/javac"; then
15105          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15107          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15108$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15109          BOOT_JDK_FOUND=no
15110        else
15111          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15112          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15113            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15115            BOOT_JDK_FOUND=no
15116          else
15117            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15118            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15119
15120            # Extra M4 quote needed to protect [] in grep expression.
15121            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15122            if test "x$FOUND_VERSION_78" = x; then
15123              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15125              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15126$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15127              BOOT_JDK_FOUND=no
15128            else
15129              # We're done! :-)
15130              BOOT_JDK_FOUND=yes
15131
15132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15133
15134  # Input might be given as Windows format, start by converting to
15135  # unix format.
15136  path="$BOOT_JDK"
15137  new_path=`$CYGPATH -u "$path"`
15138
15139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15142  # "foo.exe" is OK but "foo" is an error.
15143  #
15144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15145  # It is also a way to make sure we got the proper file name for the real test later on.
15146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15147  if test "x$test_shortpath" = x; then
15148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15150    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15151  fi
15152
15153  # Call helper function which possibly converts this using DOS-style short mode.
15154  # If so, the updated path is stored in $new_path.
15155
15156  input_path="$new_path"
15157  # Check if we need to convert this using DOS-style short mode. If the path
15158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15159  # take no chances and rewrite it.
15160  # Note: m4 eats our [], so we need to use [ and ] instead.
15161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15162  if test "x$has_forbidden_chars" != x; then
15163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15167      # Going to short mode and back again did indeed matter. Since short mode is
15168      # case insensitive, let's make it lowercase to improve readability.
15169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15170      # Now convert it back to Unix-stile (cygpath)
15171      input_path=`$CYGPATH -u "$shortmode_path"`
15172      new_path="$input_path"
15173    fi
15174  fi
15175
15176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15177  if test "x$test_cygdrive_prefix" = x; then
15178    # As a simple fix, exclude /usr/bin since it's not a real path.
15179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15181      # a path prefixed by /cygdrive for fixpath to work.
15182      new_path="$CYGWIN_ROOT_PATH$input_path"
15183    fi
15184  fi
15185
15186
15187  if test "x$path" != "x$new_path"; then
15188    BOOT_JDK="$new_path"
15189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15191  fi
15192
15193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15194
15195  path="$BOOT_JDK"
15196  has_colon=`$ECHO $path | $GREP ^.:`
15197  new_path="$path"
15198  if test "x$has_colon" = x; then
15199    # Not in mixed or Windows style, start by that.
15200    new_path=`cmd //c echo $path`
15201  fi
15202
15203
15204  input_path="$new_path"
15205  # Check if we need to convert this using DOS-style short mode. If the path
15206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15207  # take no chances and rewrite it.
15208  # Note: m4 eats our [], so we need to use [ and ] instead.
15209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15210  if test "x$has_forbidden_chars" != x; then
15211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15213  fi
15214
15215
15216  windows_path="$new_path"
15217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15218    unix_path=`$CYGPATH -u "$windows_path"`
15219    new_path="$unix_path"
15220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15222    new_path="$unix_path"
15223  fi
15224
15225  if test "x$path" != "x$new_path"; then
15226    BOOT_JDK="$new_path"
15227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15229  fi
15230
15231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15233
15234  else
15235    # We're on a posix platform. Hooray! :)
15236    path="$BOOT_JDK"
15237    has_space=`$ECHO "$path" | $GREP " "`
15238    if test "x$has_space" != x; then
15239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15241      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15242    fi
15243
15244    # Use eval to expand a potential ~
15245    eval path="$path"
15246    if test ! -f "$path" && test ! -d "$path"; then
15247      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15248    fi
15249
15250    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15251  fi
15252
15253              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15254$as_echo_n "checking for Boot JDK... " >&6; }
15255              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15256$as_echo "$BOOT_JDK" >&6; }
15257              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15258$as_echo_n "checking Boot JDK version... " >&6; }
15259              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15260              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15261$as_echo "$BOOT_JDK_VERSION" >&6; }
15262            fi # end check jdk version
15263          fi # end check rt.jar
15264        fi # end check javac
15265      fi # end check java
15266    fi # end check boot jdk found
15267  fi
15268
15269  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15270
15271  if test "x$BOOT_JDK_FOUND" = xno; then
15272    # Now execute the test
15273
15274  BOOT_JDK_PREFIX="/usr/lib/jvm"
15275  BOOT_JDK_SUFFIX=""
15276  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15277  if test "x$ALL_JDKS_FOUND" != x; then
15278    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15279
15280  if test "x$BOOT_JDK_FOUND" = xno; then
15281    # Now execute the test
15282
15283        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15284        if test -d "$BOOT_JDK"; then
15285          BOOT_JDK_FOUND=maybe
15286          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15287$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15288        fi
15289
15290
15291    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15292    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15293      # Do we have a bin/java?
15294      if test ! -x "$BOOT_JDK/bin/java"; then
15295        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15297        BOOT_JDK_FOUND=no
15298      else
15299        # Do we have a bin/javac?
15300        if test ! -x "$BOOT_JDK/bin/javac"; then
15301          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15303          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15304$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15305          BOOT_JDK_FOUND=no
15306        else
15307          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15308          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15309            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15311            BOOT_JDK_FOUND=no
15312          else
15313            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15314            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15315
15316            # Extra M4 quote needed to protect [] in grep expression.
15317            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15318            if test "x$FOUND_VERSION_78" = x; then
15319              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15321              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15322$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15323              BOOT_JDK_FOUND=no
15324            else
15325              # We're done! :-)
15326              BOOT_JDK_FOUND=yes
15327
15328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15329
15330  # Input might be given as Windows format, start by converting to
15331  # unix format.
15332  path="$BOOT_JDK"
15333  new_path=`$CYGPATH -u "$path"`
15334
15335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15338  # "foo.exe" is OK but "foo" is an error.
15339  #
15340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15341  # It is also a way to make sure we got the proper file name for the real test later on.
15342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15343  if test "x$test_shortpath" = x; then
15344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15346    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15347  fi
15348
15349  # Call helper function which possibly converts this using DOS-style short mode.
15350  # If so, the updated path is stored in $new_path.
15351
15352  input_path="$new_path"
15353  # Check if we need to convert this using DOS-style short mode. If the path
15354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15355  # take no chances and rewrite it.
15356  # Note: m4 eats our [], so we need to use [ and ] instead.
15357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15358  if test "x$has_forbidden_chars" != x; then
15359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15363      # Going to short mode and back again did indeed matter. Since short mode is
15364      # case insensitive, let's make it lowercase to improve readability.
15365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15366      # Now convert it back to Unix-stile (cygpath)
15367      input_path=`$CYGPATH -u "$shortmode_path"`
15368      new_path="$input_path"
15369    fi
15370  fi
15371
15372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15373  if test "x$test_cygdrive_prefix" = x; then
15374    # As a simple fix, exclude /usr/bin since it's not a real path.
15375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15377      # a path prefixed by /cygdrive for fixpath to work.
15378      new_path="$CYGWIN_ROOT_PATH$input_path"
15379    fi
15380  fi
15381
15382
15383  if test "x$path" != "x$new_path"; then
15384    BOOT_JDK="$new_path"
15385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15386$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15387  fi
15388
15389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15390
15391  path="$BOOT_JDK"
15392  has_colon=`$ECHO $path | $GREP ^.:`
15393  new_path="$path"
15394  if test "x$has_colon" = x; then
15395    # Not in mixed or Windows style, start by that.
15396    new_path=`cmd //c echo $path`
15397  fi
15398
15399
15400  input_path="$new_path"
15401  # Check if we need to convert this using DOS-style short mode. If the path
15402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15403  # take no chances and rewrite it.
15404  # Note: m4 eats our [], so we need to use [ and ] instead.
15405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15406  if test "x$has_forbidden_chars" != x; then
15407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15409  fi
15410
15411
15412  windows_path="$new_path"
15413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15414    unix_path=`$CYGPATH -u "$windows_path"`
15415    new_path="$unix_path"
15416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15418    new_path="$unix_path"
15419  fi
15420
15421  if test "x$path" != "x$new_path"; then
15422    BOOT_JDK="$new_path"
15423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15424$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15425  fi
15426
15427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15429
15430  else
15431    # We're on a posix platform. Hooray! :)
15432    path="$BOOT_JDK"
15433    has_space=`$ECHO "$path" | $GREP " "`
15434    if test "x$has_space" != x; then
15435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15437      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15438    fi
15439
15440    # Use eval to expand a potential ~
15441    eval path="$path"
15442    if test ! -f "$path" && test ! -d "$path"; then
15443      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15444    fi
15445
15446    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15447  fi
15448
15449              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15450$as_echo_n "checking for Boot JDK... " >&6; }
15451              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15452$as_echo "$BOOT_JDK" >&6; }
15453              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15454$as_echo_n "checking Boot JDK version... " >&6; }
15455              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15456              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15457$as_echo "$BOOT_JDK_VERSION" >&6; }
15458            fi # end check jdk version
15459          fi # end check rt.jar
15460        fi # end check javac
15461      fi # end check java
15462    fi # end check boot jdk found
15463  fi
15464
15465    done
15466  fi
15467
15468
15469    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15470    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15471      # Do we have a bin/java?
15472      if test ! -x "$BOOT_JDK/bin/java"; then
15473        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15475        BOOT_JDK_FOUND=no
15476      else
15477        # Do we have a bin/javac?
15478        if test ! -x "$BOOT_JDK/bin/javac"; then
15479          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15481          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15482$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15483          BOOT_JDK_FOUND=no
15484        else
15485          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15486          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15487            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15489            BOOT_JDK_FOUND=no
15490          else
15491            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15493
15494            # Extra M4 quote needed to protect [] in grep expression.
15495            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15496            if test "x$FOUND_VERSION_78" = x; then
15497              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15499              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15500$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15501              BOOT_JDK_FOUND=no
15502            else
15503              # We're done! :-)
15504              BOOT_JDK_FOUND=yes
15505
15506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15507
15508  # Input might be given as Windows format, start by converting to
15509  # unix format.
15510  path="$BOOT_JDK"
15511  new_path=`$CYGPATH -u "$path"`
15512
15513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15516  # "foo.exe" is OK but "foo" is an error.
15517  #
15518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15519  # It is also a way to make sure we got the proper file name for the real test later on.
15520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15521  if test "x$test_shortpath" = x; then
15522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15523$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15524    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15525  fi
15526
15527  # Call helper function which possibly converts this using DOS-style short mode.
15528  # If so, the updated path is stored in $new_path.
15529
15530  input_path="$new_path"
15531  # Check if we need to convert this using DOS-style short mode. If the path
15532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15533  # take no chances and rewrite it.
15534  # Note: m4 eats our [], so we need to use [ and ] instead.
15535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15536  if test "x$has_forbidden_chars" != x; then
15537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15541      # Going to short mode and back again did indeed matter. Since short mode is
15542      # case insensitive, let's make it lowercase to improve readability.
15543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15544      # Now convert it back to Unix-stile (cygpath)
15545      input_path=`$CYGPATH -u "$shortmode_path"`
15546      new_path="$input_path"
15547    fi
15548  fi
15549
15550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15551  if test "x$test_cygdrive_prefix" = x; then
15552    # As a simple fix, exclude /usr/bin since it's not a real path.
15553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15555      # a path prefixed by /cygdrive for fixpath to work.
15556      new_path="$CYGWIN_ROOT_PATH$input_path"
15557    fi
15558  fi
15559
15560
15561  if test "x$path" != "x$new_path"; then
15562    BOOT_JDK="$new_path"
15563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15565  fi
15566
15567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15568
15569  path="$BOOT_JDK"
15570  has_colon=`$ECHO $path | $GREP ^.:`
15571  new_path="$path"
15572  if test "x$has_colon" = x; then
15573    # Not in mixed or Windows style, start by that.
15574    new_path=`cmd //c echo $path`
15575  fi
15576
15577
15578  input_path="$new_path"
15579  # Check if we need to convert this using DOS-style short mode. If the path
15580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15581  # take no chances and rewrite it.
15582  # Note: m4 eats our [], so we need to use [ and ] instead.
15583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15584  if test "x$has_forbidden_chars" != x; then
15585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15587  fi
15588
15589
15590  windows_path="$new_path"
15591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15592    unix_path=`$CYGPATH -u "$windows_path"`
15593    new_path="$unix_path"
15594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15596    new_path="$unix_path"
15597  fi
15598
15599  if test "x$path" != "x$new_path"; then
15600    BOOT_JDK="$new_path"
15601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15603  fi
15604
15605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15607
15608  else
15609    # We're on a posix platform. Hooray! :)
15610    path="$BOOT_JDK"
15611    has_space=`$ECHO "$path" | $GREP " "`
15612    if test "x$has_space" != x; then
15613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15615      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15616    fi
15617
15618    # Use eval to expand a potential ~
15619    eval path="$path"
15620    if test ! -f "$path" && test ! -d "$path"; then
15621      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15622    fi
15623
15624    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15625  fi
15626
15627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15628$as_echo_n "checking for Boot JDK... " >&6; }
15629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15630$as_echo "$BOOT_JDK" >&6; }
15631              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15632$as_echo_n "checking Boot JDK version... " >&6; }
15633              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15634              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15635$as_echo "$BOOT_JDK_VERSION" >&6; }
15636            fi # end check jdk version
15637          fi # end check rt.jar
15638        fi # end check javac
15639      fi # end check java
15640    fi # end check boot jdk found
15641  fi
15642
15643  fi
15644
15645
15646    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15647    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15648      # Do we have a bin/java?
15649      if test ! -x "$BOOT_JDK/bin/java"; then
15650        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15652        BOOT_JDK_FOUND=no
15653      else
15654        # Do we have a bin/javac?
15655        if test ! -x "$BOOT_JDK/bin/javac"; then
15656          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15657$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15658          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15659$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15660          BOOT_JDK_FOUND=no
15661        else
15662          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15663          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15664            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15666            BOOT_JDK_FOUND=no
15667          else
15668            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15669            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15670
15671            # Extra M4 quote needed to protect [] in grep expression.
15672            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15673            if test "x$FOUND_VERSION_78" = x; then
15674              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15676              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15677$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15678              BOOT_JDK_FOUND=no
15679            else
15680              # We're done! :-)
15681              BOOT_JDK_FOUND=yes
15682
15683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15684
15685  # Input might be given as Windows format, start by converting to
15686  # unix format.
15687  path="$BOOT_JDK"
15688  new_path=`$CYGPATH -u "$path"`
15689
15690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15693  # "foo.exe" is OK but "foo" is an error.
15694  #
15695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15696  # It is also a way to make sure we got the proper file name for the real test later on.
15697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15698  if test "x$test_shortpath" = x; then
15699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15701    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15702  fi
15703
15704  # Call helper function which possibly converts this using DOS-style short mode.
15705  # If so, the updated path is stored in $new_path.
15706
15707  input_path="$new_path"
15708  # Check if we need to convert this using DOS-style short mode. If the path
15709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15710  # take no chances and rewrite it.
15711  # Note: m4 eats our [], so we need to use [ and ] instead.
15712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15713  if test "x$has_forbidden_chars" != x; then
15714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15718      # Going to short mode and back again did indeed matter. Since short mode is
15719      # case insensitive, let's make it lowercase to improve readability.
15720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15721      # Now convert it back to Unix-stile (cygpath)
15722      input_path=`$CYGPATH -u "$shortmode_path"`
15723      new_path="$input_path"
15724    fi
15725  fi
15726
15727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15728  if test "x$test_cygdrive_prefix" = x; then
15729    # As a simple fix, exclude /usr/bin since it's not a real path.
15730    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15732      # a path prefixed by /cygdrive for fixpath to work.
15733      new_path="$CYGWIN_ROOT_PATH$input_path"
15734    fi
15735  fi
15736
15737
15738  if test "x$path" != "x$new_path"; then
15739    BOOT_JDK="$new_path"
15740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15741$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15742  fi
15743
15744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15745
15746  path="$BOOT_JDK"
15747  has_colon=`$ECHO $path | $GREP ^.:`
15748  new_path="$path"
15749  if test "x$has_colon" = x; then
15750    # Not in mixed or Windows style, start by that.
15751    new_path=`cmd //c echo $path`
15752  fi
15753
15754
15755  input_path="$new_path"
15756  # Check if we need to convert this using DOS-style short mode. If the path
15757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15758  # take no chances and rewrite it.
15759  # Note: m4 eats our [], so we need to use [ and ] instead.
15760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15761  if test "x$has_forbidden_chars" != x; then
15762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15764  fi
15765
15766
15767  windows_path="$new_path"
15768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15769    unix_path=`$CYGPATH -u "$windows_path"`
15770    new_path="$unix_path"
15771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15773    new_path="$unix_path"
15774  fi
15775
15776  if test "x$path" != "x$new_path"; then
15777    BOOT_JDK="$new_path"
15778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15780  fi
15781
15782  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15783  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15784
15785  else
15786    # We're on a posix platform. Hooray! :)
15787    path="$BOOT_JDK"
15788    has_space=`$ECHO "$path" | $GREP " "`
15789    if test "x$has_space" != x; then
15790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15791$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15792      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15793    fi
15794
15795    # Use eval to expand a potential ~
15796    eval path="$path"
15797    if test ! -f "$path" && test ! -d "$path"; then
15798      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15799    fi
15800
15801    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15802  fi
15803
15804              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15805$as_echo_n "checking for Boot JDK... " >&6; }
15806              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15807$as_echo "$BOOT_JDK" >&6; }
15808              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15809$as_echo_n "checking Boot JDK version... " >&6; }
15810              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15811              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15812$as_echo "$BOOT_JDK_VERSION" >&6; }
15813            fi # end check jdk version
15814          fi # end check rt.jar
15815        fi # end check javac
15816      fi # end check java
15817    fi # end check boot jdk found
15818  fi
15819
15820
15821  # If we haven't found anything yet, we've truly lost. Give up.
15822  if test "x$BOOT_JDK_FOUND" = xno; then
15823
15824  # Print a helpful message on how to acquire the necessary build dependency.
15825  # openjdk is the help tag: freetype, cups, pulse, alsa etc
15826  MISSING_DEPENDENCY=openjdk
15827
15828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15829    cygwin_help $MISSING_DEPENDENCY
15830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15831    msys_help $MISSING_DEPENDENCY
15832  else
15833    PKGHANDLER_COMMAND=
15834
15835    case $PKGHANDLER in
15836      apt-get)
15837        apt_help     $MISSING_DEPENDENCY ;;
15838      yum)
15839        yum_help     $MISSING_DEPENDENCY ;;
15840      port)
15841        port_help    $MISSING_DEPENDENCY ;;
15842      pkgutil)
15843        pkgutil_help $MISSING_DEPENDENCY ;;
15844      pkgadd)
15845        pkgadd_help  $MISSING_DEPENDENCY ;;
15846      * )
15847        break ;;
15848    esac
15849
15850    if test "x$PKGHANDLER_COMMAND" != x; then
15851      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15852    fi
15853  fi
15854
15855    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15856$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15857    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15858$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15859    as_fn_error $? "Cannot continue" "$LINENO" 5
15860  fi
15861
15862  # Setup proper paths for what we found
15863  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15864  if test ! -f "$BOOT_RTJAR"; then
15865    # On MacOSX it is called classes.jar
15866    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15867    if test -f "$BOOT_RTJAR"; then
15868      # Remove the ..
15869      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15870    fi
15871  fi
15872  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15873  BOOT_JDK="$BOOT_JDK"
15874
15875
15876
15877
15878  # Setup tools from the Boot JDK.
15879
15880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15881$as_echo_n "checking for java in Boot JDK... " >&6; }
15882  JAVA=$BOOT_JDK/bin/java
15883  if test ! -x $JAVA; then
15884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15885$as_echo "not found" >&6; }
15886    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15887$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15888    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15889  fi
15890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15891$as_echo "ok" >&6; }
15892
15893
15894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15895$as_echo_n "checking for javac in Boot JDK... " >&6; }
15896  JAVAC=$BOOT_JDK/bin/javac
15897  if test ! -x $JAVAC; then
15898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15899$as_echo "not found" >&6; }
15900    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15901$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15902    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15903  fi
15904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15905$as_echo "ok" >&6; }
15906
15907
15908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15909$as_echo_n "checking for javah in Boot JDK... " >&6; }
15910  JAVAH=$BOOT_JDK/bin/javah
15911  if test ! -x $JAVAH; then
15912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15913$as_echo "not found" >&6; }
15914    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15915$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15916    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15917  fi
15918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15919$as_echo "ok" >&6; }
15920
15921
15922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15923$as_echo_n "checking for javap in Boot JDK... " >&6; }
15924  JAVAP=$BOOT_JDK/bin/javap
15925  if test ! -x $JAVAP; then
15926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15927$as_echo "not found" >&6; }
15928    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15929$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15930    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15931  fi
15932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15933$as_echo "ok" >&6; }
15934
15935
15936  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15937$as_echo_n "checking for jar in Boot JDK... " >&6; }
15938  JAR=$BOOT_JDK/bin/jar
15939  if test ! -x $JAR; then
15940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15941$as_echo "not found" >&6; }
15942    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15943$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15944    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15945  fi
15946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15947$as_echo "ok" >&6; }
15948
15949
15950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15951$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15952  RMIC=$BOOT_JDK/bin/rmic
15953  if test ! -x $RMIC; then
15954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15955$as_echo "not found" >&6; }
15956    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15957$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15958    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15959  fi
15960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15961$as_echo "ok" >&6; }
15962
15963
15964  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15965$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15966  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15967  if test ! -x $NATIVE2ASCII; then
15968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15969$as_echo "not found" >&6; }
15970    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15971$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15972    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15973  fi
15974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15975$as_echo "ok" >&6; }
15976
15977
15978  # Finally, set some other options...
15979
15980  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15981  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15982
15983
15984
15985
15986  ##############################################################################
15987  #
15988  # Specify options for anything that is run with the Boot JDK.
15989  #
15990
15991# Check whether --with-boot-jdk-jvmargs was given.
15992if test "${with_boot_jdk_jvmargs+set}" = set; then :
15993  withval=$with_boot_jdk_jvmargs;
15994fi
15995
15996
15997  if test "x$with_boot_jdk_jvmargs" = x; then
15998    # Not all JVM:s accept the same arguments on the command line.
15999    # OpenJDK specific increase in thread stack for JDK build,
16000    # well more specifically, when running javac.
16001    if test "x$BUILD_NUM_BITS" = x32; then
16002      STACK_SIZE=768
16003    else
16004      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
16005      # since 64-bit pointers are pushed on the stach. Apparently, we need
16006      # to increase the stack space when javacing the JDK....
16007      STACK_SIZE=1536
16008    fi
16009
16010    # Minimum amount of heap memory.
16011
16012  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16013  $ECHO "Command: $JAVA -Xms64M -version" >&5
16014  OUTPUT=`$JAVA -Xms64M -version 2>&1`
16015  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16016  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16017  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16018    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
16019    JVM_ARG_OK=true
16020  else
16021    $ECHO "Arg failed:" >&5
16022    $ECHO "$OUTPUT" >&5
16023    JVM_ARG_OK=false
16024  fi
16025
16026    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16027      # Why does macosx need more heap? Its the huge JDK batch.
16028
16029  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
16030  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
16031  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
16032  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16033  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16034  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16035    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
16036    JVM_ARG_OK=true
16037  else
16038    $ECHO "Arg failed:" >&5
16039    $ECHO "$OUTPUT" >&5
16040    JVM_ARG_OK=false
16041  fi
16042
16043    else
16044
16045  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
16046  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
16047  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
16048  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16049  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16050  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16051    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16052    JVM_ARG_OK=true
16053  else
16054    $ECHO "Arg failed:" >&5
16055    $ECHO "$OUTPUT" >&5
16056    JVM_ARG_OK=false
16057  fi
16058
16059    fi
16060    # When is adding -client something that speeds up the JVM?
16061    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16062
16063  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16064  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16065  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16066  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16067  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16068  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16069    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16070    JVM_ARG_OK=true
16071  else
16072    $ECHO "Arg failed:" >&5
16073    $ECHO "$OUTPUT" >&5
16074    JVM_ARG_OK=false
16075  fi
16076
16077
16078  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16079  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16080  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16081  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16082  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16083  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16084    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16085    JVM_ARG_OK=true
16086  else
16087    $ECHO "Arg failed:" >&5
16088    $ECHO "$OUTPUT" >&5
16089    JVM_ARG_OK=false
16090  fi
16091
16092
16093  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16094  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16095  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16096  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16097  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16098  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16099    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16100    JVM_ARG_OK=true
16101  else
16102    $ECHO "Arg failed:" >&5
16103    $ECHO "$OUTPUT" >&5
16104    JVM_ARG_OK=false
16105  fi
16106
16107    # Disable special log output when a debug build is used as Boot JDK...
16108
16109  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16110  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16111  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16112  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16113  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16114  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16115    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16116    JVM_ARG_OK=true
16117  else
16118    $ECHO "Arg failed:" >&5
16119    $ECHO "$OUTPUT" >&5
16120    JVM_ARG_OK=false
16121  fi
16122
16123  fi
16124
16125  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16126
16127
16128
16129###############################################################################
16130#
16131# Configure the sources to use. We can add or override individual directories.
16132#
16133###############################################################################
16134
16135
16136  # Where are the sources. Any of these can be overridden
16137  # using --with-override-corba and the likes.
16138  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16139  CORBA_TOPDIR="$SRC_ROOT/corba"
16140  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16141  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16142  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16143  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16144  JDK_TOPDIR="$SRC_ROOT/jdk"
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155  ###############################################################################
16156  #
16157  # Pickup additional source for a component from outside of the source root
16158  # or override source for a component.
16159  #
16160
16161# Check whether --with-add-source-root was given.
16162if test "${with_add_source_root+set}" = set; then :
16163  withval=$with_add_source_root;
16164fi
16165
16166
16167
16168# Check whether --with-override-source-root was given.
16169if test "${with_override_source_root+set}" = set; then :
16170  withval=$with_override_source_root;
16171fi
16172
16173
16174
16175# Check whether --with-adds-and-overrides was given.
16176if test "${with_adds_and_overrides+set}" = set; then :
16177  withval=$with_adds_and_overrides;
16178fi
16179
16180
16181  if test "x$with_adds_and_overrides" != x; then
16182    with_add_source_root="$with_adds_and_overrides/adds"
16183    with_override_source_root="$with_adds_and_overrides/overrides"
16184  fi
16185
16186  if test "x$with_add_source_root" != x; then
16187    if ! test -d $with_add_source_root; then
16188      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16189    fi
16190    CURDIR="$PWD"
16191    cd "$with_add_source_root"
16192    ADD_SRC_ROOT="`pwd`"
16193    cd "$CURDIR"
16194    # Verify that the addon source root does not have any root makefiles.
16195    # If it does, then it is usually an error, prevent this.
16196    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16197      test -f $with_add_source_root/langtools/make/Makefile; then
16198      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
16199    fi
16200    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16201      test -f $with_add_source_root/corba/make/Makefile; then
16202      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
16203    fi
16204    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16205      test -f $with_add_source_root/jaxp/make/Makefile; then
16206      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
16207    fi
16208    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16209      test -f $with_add_source_root/jaxws/make/Makefile; then
16210      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
16211    fi
16212    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16213      test -f $with_add_source_root/hotspot/make/Makefile; then
16214      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
16215    fi
16216    if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16217      test -f $with_add_source_root/nashorn/make/Makefile; then
16218      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
16219    fi
16220    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16221      test -f $with_add_source_root/jdk/make/Makefile; then
16222      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
16223    fi
16224  fi
16225
16226
16227  if test "x$with_override_source_root" != x; then
16228    if ! test -d $with_override_source_root; then
16229      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16230    fi
16231    CURDIR="$PWD"
16232    cd "$with_override_source_root"
16233    OVERRIDE_SRC_ROOT="`pwd`"
16234    cd "$CURDIR"
16235    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16236      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/makefiles/Makefile || \
16240      test -f $with_override_source_root/corba/make/Makefile; then
16241      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
16242    fi
16243    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16244      test -f $with_override_source_root/jaxp/make/Makefile; then
16245      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
16246    fi
16247    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16248      test -f $with_override_source_root/jaxws/make/Makefile; then
16249      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
16250    fi
16251    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16252      test -f $with_override_source_root/hotspot/make/Makefile; then
16253      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
16254    fi
16255    if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16256      test -f $with_override_source_root/nashorn/make/Makefile; then
16257      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
16258    fi
16259    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16260      test -f $with_override_source_root/jdk/make/Makefile; then
16261      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
16262    fi
16263  fi
16264
16265
16266  ###############################################################################
16267  #
16268  # Override a repo completely, this is used for example when you have 3 small
16269  # development sandboxes of the langtools sources and want to avoid having 3 full
16270  # OpenJDK sources checked out on disk.
16271  #
16272  # Assuming that the 3 langtools sandboxes are located here:
16273  # /home/fredrik/sandbox1/langtools
16274  # /home/fredrik/sandbox2/langtools
16275  # /home/fredrik/sandbox3/langtools
16276  #
16277  # From the source root you create build subdirs manually:
16278  #     mkdir -p build1 build2 build3
16279  # in each build directory run:
16280  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16281  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16282  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16283  #
16284
16285
16286# Check whether --with-override-langtools was given.
16287if test "${with_override_langtools+set}" = set; then :
16288  withval=$with_override_langtools;
16289fi
16290
16291
16292
16293# Check whether --with-override-corba was given.
16294if test "${with_override_corba+set}" = set; then :
16295  withval=$with_override_corba;
16296fi
16297
16298
16299
16300# Check whether --with-override-jaxp was given.
16301if test "${with_override_jaxp+set}" = set; then :
16302  withval=$with_override_jaxp;
16303fi
16304
16305
16306
16307# Check whether --with-override-jaxws was given.
16308if test "${with_override_jaxws+set}" = set; then :
16309  withval=$with_override_jaxws;
16310fi
16311
16312
16313
16314# Check whether --with-override-hotspot was given.
16315if test "${with_override_hotspot+set}" = set; then :
16316  withval=$with_override_hotspot;
16317fi
16318
16319
16320
16321# Check whether --with-override-nashorn was given.
16322if test "${with_override_nashorn+set}" = set; then :
16323  withval=$with_override_nashorn;
16324fi
16325
16326
16327
16328# Check whether --with-override-jdk was given.
16329if test "${with_override_jdk+set}" = set; then :
16330  withval=$with_override_jdk;
16331fi
16332
16333
16334  if test "x$with_override_langtools" != x; then
16335    CURDIR="$PWD"
16336    cd "$with_override_langtools"
16337    LANGTOOLS_TOPDIR="`pwd`"
16338    cd "$CURDIR"
16339    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16340      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16341    fi
16342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16343$as_echo_n "checking if langtools should be overridden... " >&6; }
16344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16345$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16346  fi
16347  if test "x$with_override_corba" != x; then
16348    CURDIR="$PWD"
16349    cd "$with_override_corba"
16350    CORBA_TOPDIR="`pwd`"
16351    cd "$CURDIR"
16352    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16353      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16354    fi
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16356$as_echo_n "checking if corba should be overridden... " >&6; }
16357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16358$as_echo "yes with $CORBA_TOPDIR" >&6; }
16359  fi
16360  if test "x$with_override_jaxp" != x; then
16361    CURDIR="$PWD"
16362    cd "$with_override_jaxp"
16363    JAXP_TOPDIR="`pwd`"
16364    cd "$CURDIR"
16365    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16366      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16367    fi
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16369$as_echo_n "checking if jaxp should be overridden... " >&6; }
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16371$as_echo "yes with $JAXP_TOPDIR" >&6; }
16372  fi
16373  if test "x$with_override_jaxws" != x; then
16374    CURDIR="$PWD"
16375    cd "$with_override_jaxws"
16376    JAXWS_TOPDIR="`pwd`"
16377    cd "$CURDIR"
16378    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16379      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16380    fi
16381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16382$as_echo_n "checking if jaxws should be overridden... " >&6; }
16383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16384$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16385  fi
16386  if test "x$with_override_hotspot" != x; then
16387    CURDIR="$PWD"
16388    cd "$with_override_hotspot"
16389    HOTSPOT_TOPDIR="`pwd`"
16390    cd "$CURDIR"
16391    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16392        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16393      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16394    fi
16395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16396$as_echo_n "checking if hotspot should be overridden... " >&6; }
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16398$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16399  fi
16400  if test "x$with_override_nashorn" != x; then
16401    CURDIR="$PWD"
16402    cd "$with_override_nashorn"
16403    NASHORN_TOPDIR="`pwd`"
16404    cd "$CURDIR"
16405    if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16406      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16407    fi
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16409$as_echo_n "checking if nashorn should be overridden... " >&6; }
16410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16411$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16412  fi
16413  if test "x$with_override_jdk" != x; then
16414    CURDIR="$PWD"
16415    cd "$with_override_jdk"
16416    JDK_TOPDIR="`pwd`"
16417    cd "$CURDIR"
16418    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16419      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16420    fi
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16422$as_echo_n "checking if JDK should be overridden... " >&6; }
16423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16424$as_echo "yes with $JDK_TOPDIR" >&6; }
16425  fi
16426
16427
16428  BUILD_OUTPUT="$OUTPUT_ROOT"
16429
16430
16431  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16432  BUILD_HOTSPOT=true
16433
16434
16435
16436# Check whether --with-import-hotspot was given.
16437if test "${with_import_hotspot+set}" = set; then :
16438  withval=$with_import_hotspot;
16439fi
16440
16441  if test "x$with_import_hotspot" != x; then
16442    CURDIR="$PWD"
16443    cd "$with_import_hotspot"
16444    HOTSPOT_DIST="`pwd`"
16445    cd "$CURDIR"
16446    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16447      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16448    fi
16449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16450$as_echo_n "checking if hotspot should be imported... " >&6; }
16451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16452$as_echo "yes from $HOTSPOT_DIST" >&6; }
16453    BUILD_HOTSPOT=false
16454  fi
16455
16456  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16457
16458
16459###############################################################################
16460#
16461# Setup the toolchain (compilers etc), i.e. the tools that need to be
16462# cross-compilation aware.
16463#
16464###############################################################################
16465
16466
16467  ###############################################################################
16468  #
16469  # Configure the development tool paths and potential sysroot.
16470  #
16471  ac_ext=cpp
16472ac_cpp='$CXXCPP $CPPFLAGS'
16473ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16474ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16475ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16476
16477
16478  # The option used to specify the target .o,.a or .so file.
16479  # When compiling, how to specify the to be created object file.
16480  CC_OUT_OPTION='-o$(SPACE)'
16481  # When linking, how to specify the to be created executable.
16482  EXE_OUT_OPTION='-o$(SPACE)'
16483  # When linking, how to specify the to be created dynamically linkable library.
16484  LD_OUT_OPTION='-o$(SPACE)'
16485  # When archiving, how to specify the to be create static archive for object files.
16486  AR_OUT_OPTION='rcs$(SPACE)'
16487
16488
16489
16490
16491
16492# Locate the actual tools
16493
16494
16495# Check whether --with-jtreg was given.
16496if test "${with_jtreg+set}" = set; then :
16497  withval=$with_jtreg;
16498else
16499  with_jtreg=no
16500fi
16501
16502
16503  if test "x$with_jtreg" = xno; then
16504    # jtreg disabled
16505    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16506$as_echo_n "checking for jtreg... " >&6; }
16507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16508$as_echo "no" >&6; }
16509  else
16510    if test "x$with_jtreg" != xyes; then
16511      # with path specified.
16512      JT_HOME="$with_jtreg"
16513    fi
16514
16515    if test "x$JT_HOME" != x; then
16516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16517$as_echo_n "checking for jtreg... " >&6; }
16518
16519      # use JT_HOME enviroment var.
16520
16521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16522
16523  # Input might be given as Windows format, start by converting to
16524  # unix format.
16525  path="$JT_HOME"
16526  new_path=`$CYGPATH -u "$path"`
16527
16528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16531  # "foo.exe" is OK but "foo" is an error.
16532  #
16533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16534  # It is also a way to make sure we got the proper file name for the real test later on.
16535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16536  if test "x$test_shortpath" = x; then
16537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16538$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16539    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16540  fi
16541
16542  # Call helper function which possibly converts this using DOS-style short mode.
16543  # If so, the updated path is stored in $new_path.
16544
16545  input_path="$new_path"
16546  # Check if we need to convert this using DOS-style short mode. If the path
16547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16548  # take no chances and rewrite it.
16549  # Note: m4 eats our [], so we need to use [ and ] instead.
16550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16551  if test "x$has_forbidden_chars" != x; then
16552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16556      # Going to short mode and back again did indeed matter. Since short mode is
16557      # case insensitive, let's make it lowercase to improve readability.
16558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16559      # Now convert it back to Unix-stile (cygpath)
16560      input_path=`$CYGPATH -u "$shortmode_path"`
16561      new_path="$input_path"
16562    fi
16563  fi
16564
16565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16566  if test "x$test_cygdrive_prefix" = x; then
16567    # As a simple fix, exclude /usr/bin since it's not a real path.
16568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16570      # a path prefixed by /cygdrive for fixpath to work.
16571      new_path="$CYGWIN_ROOT_PATH$input_path"
16572    fi
16573  fi
16574
16575
16576  if test "x$path" != "x$new_path"; then
16577    JT_HOME="$new_path"
16578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16579$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16580  fi
16581
16582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16583
16584  path="$JT_HOME"
16585  has_colon=`$ECHO $path | $GREP ^.:`
16586  new_path="$path"
16587  if test "x$has_colon" = x; then
16588    # Not in mixed or Windows style, start by that.
16589    new_path=`cmd //c echo $path`
16590  fi
16591
16592
16593  input_path="$new_path"
16594  # Check if we need to convert this using DOS-style short mode. If the path
16595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16596  # take no chances and rewrite it.
16597  # Note: m4 eats our [], so we need to use [ and ] instead.
16598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16599  if test "x$has_forbidden_chars" != x; then
16600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16602  fi
16603
16604
16605  windows_path="$new_path"
16606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16607    unix_path=`$CYGPATH -u "$windows_path"`
16608    new_path="$unix_path"
16609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16611    new_path="$unix_path"
16612  fi
16613
16614  if test "x$path" != "x$new_path"; then
16615    JT_HOME="$new_path"
16616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16617$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16618  fi
16619
16620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16622
16623  else
16624    # We're on a posix platform. Hooray! :)
16625    path="$JT_HOME"
16626    has_space=`$ECHO "$path" | $GREP " "`
16627    if test "x$has_space" != x; then
16628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16629$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16630      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16631    fi
16632
16633    # Use eval to expand a potential ~
16634    eval path="$path"
16635    if test ! -f "$path" && test ! -d "$path"; then
16636      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16637    fi
16638
16639    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16640  fi
16641
16642
16643      # jtreg win32 script works for everybody
16644      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16645
16646      if test ! -f "$JTREGEXE"; then
16647        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16648      fi
16649
16650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16651$as_echo "$JTREGEXE" >&6; }
16652    else
16653      # try to find jtreg on path
16654
16655  for ac_prog in jtreg
16656do
16657  # Extract the first word of "$ac_prog", so it can be a program name with args.
16658set dummy $ac_prog; ac_word=$2
16659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16660$as_echo_n "checking for $ac_word... " >&6; }
16661if ${ac_cv_path_JTREGEXE+:} false; then :
16662  $as_echo_n "(cached) " >&6
16663else
16664  case $JTREGEXE in
16665  [\\/]* | ?:[\\/]*)
16666  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16667  ;;
16668  *)
16669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16670for as_dir in $PATH
16671do
16672  IFS=$as_save_IFS
16673  test -z "$as_dir" && as_dir=.
16674    for ac_exec_ext in '' $ac_executable_extensions; do
16675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16676    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16678    break 2
16679  fi
16680done
16681  done
16682IFS=$as_save_IFS
16683
16684  ;;
16685esac
16686fi
16687JTREGEXE=$ac_cv_path_JTREGEXE
16688if test -n "$JTREGEXE"; then
16689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16690$as_echo "$JTREGEXE" >&6; }
16691else
16692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16693$as_echo "no" >&6; }
16694fi
16695
16696
16697  test -n "$JTREGEXE" && break
16698done
16699
16700
16701  if test "x$JTREGEXE" = x; then
16702    if test "xjtreg" = x; then
16703      PROG_NAME=jtregexe
16704    else
16705      PROG_NAME=jtreg
16706    fi
16707    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16708$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16709    as_fn_error $? "Cannot continue" "$LINENO" 5
16710  fi
16711
16712
16713      JT_HOME="`$DIRNAME $JTREGEXE`"
16714    fi
16715  fi
16716
16717
16718
16719
16720
16721  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16722
16723  # Store path to cygwin link.exe to help excluding it when searching for
16724  # VS linker. This must be done before changing the PATH when looking for VS.
16725  # Extract the first word of "link", so it can be a program name with args.
16726set dummy link; ac_word=$2
16727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16728$as_echo_n "checking for $ac_word... " >&6; }
16729if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16730  $as_echo_n "(cached) " >&6
16731else
16732  case $CYGWIN_LINK in
16733  [\\/]* | ?:[\\/]*)
16734  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16735  ;;
16736  *)
16737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16738for as_dir in $PATH
16739do
16740  IFS=$as_save_IFS
16741  test -z "$as_dir" && as_dir=.
16742    for ac_exec_ext in '' $ac_executable_extensions; do
16743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16744    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16746    break 2
16747  fi
16748done
16749  done
16750IFS=$as_save_IFS
16751
16752  ;;
16753esac
16754fi
16755CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16756if test -n "$CYGWIN_LINK"; then
16757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16758$as_echo "$CYGWIN_LINK" >&6; }
16759else
16760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16761$as_echo "no" >&6; }
16762fi
16763
16764
16765  if test "x$CYGWIN_LINK" != x; then
16766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16767$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16768    "$CYGWIN_LINK" --version > /dev/null
16769    if test $? -eq 0 ; then
16770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16771$as_echo "yes" >&6; }
16772    else
16773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16774$as_echo "no" >&6; }
16775      # This might be the VS linker. Don't exclude it later on.
16776      CYGWIN_LINK=""
16777    fi
16778  fi
16779
16780  # First-hand choice is to locate and run the vsvars bat file.
16781
16782  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16783    VCVARSFILE="vc/bin/vcvars32.bat"
16784  else
16785    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16786  fi
16787
16788  VS_ENV_CMD=""
16789  VS_ENV_ARGS=""
16790  if test "x$with_toolsdir" != x; then
16791
16792  if test "x$VS_ENV_CMD" = x; then
16793    VS100BASE="$with_toolsdir/../.."
16794    METHOD="--with-tools-dir"
16795
16796  windows_path="$VS100BASE"
16797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16798    unix_path=`$CYGPATH -u "$windows_path"`
16799    VS100BASE="$unix_path"
16800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16802    VS100BASE="$unix_path"
16803  fi
16804
16805    if test -d "$VS100BASE"; then
16806      if test -f "$VS100BASE/$VCVARSFILE"; then
16807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16808$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16809        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16810      else
16811        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16812$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16813        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16814$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16815      fi
16816    fi
16817  fi
16818
16819  fi
16820
16821  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16822    # Having specified an argument which is incorrect will produce an instant failure;
16823    # we should not go on looking
16824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16825$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16826    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16827$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16828    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16829  fi
16830
16831  if test "x$VS100COMNTOOLS" != x; then
16832
16833  if test "x$VS_ENV_CMD" = x; then
16834    VS100BASE="$VS100COMNTOOLS/../.."
16835    METHOD="VS100COMNTOOLS variable"
16836
16837  windows_path="$VS100BASE"
16838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16839    unix_path=`$CYGPATH -u "$windows_path"`
16840    VS100BASE="$unix_path"
16841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16843    VS100BASE="$unix_path"
16844  fi
16845
16846    if test -d "$VS100BASE"; then
16847      if test -f "$VS100BASE/$VCVARSFILE"; then
16848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16849$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16850        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16851      else
16852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16853$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16855$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16856      fi
16857    fi
16858  fi
16859
16860  fi
16861  if test "x$PROGRAMFILES" != x; then
16862
16863  if test "x$VS_ENV_CMD" = x; then
16864    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16865    METHOD="well-known name"
16866
16867  windows_path="$VS100BASE"
16868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16869    unix_path=`$CYGPATH -u "$windows_path"`
16870    VS100BASE="$unix_path"
16871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16873    VS100BASE="$unix_path"
16874  fi
16875
16876    if test -d "$VS100BASE"; then
16877      if test -f "$VS100BASE/$VCVARSFILE"; then
16878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16879$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16880        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16881      else
16882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16883$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16884        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16885$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16886      fi
16887    fi
16888  fi
16889
16890  fi
16891
16892  if test "x$VS_ENV_CMD" = x; then
16893    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16894    METHOD="well-known name"
16895
16896  windows_path="$VS100BASE"
16897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16898    unix_path=`$CYGPATH -u "$windows_path"`
16899    VS100BASE="$unix_path"
16900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16902    VS100BASE="$unix_path"
16903  fi
16904
16905    if test -d "$VS100BASE"; then
16906      if test -f "$VS100BASE/$VCVARSFILE"; then
16907        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16908$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16909        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16910      else
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16912$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16913        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16914$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16915      fi
16916    fi
16917  fi
16918
16919
16920  if test "x$VS_ENV_CMD" = x; then
16921    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16922    METHOD="well-known name"
16923
16924  windows_path="$VS100BASE"
16925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16926    unix_path=`$CYGPATH -u "$windows_path"`
16927    VS100BASE="$unix_path"
16928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16930    VS100BASE="$unix_path"
16931  fi
16932
16933    if test -d "$VS100BASE"; then
16934      if test -f "$VS100BASE/$VCVARSFILE"; then
16935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16936$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16937        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16938      else
16939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16940$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16941        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16942$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16943      fi
16944    fi
16945  fi
16946
16947
16948  if test "x$ProgramW6432" != x; then
16949
16950  if test "x$VS_ENV_CMD" = x; then
16951    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16952    METHOD="well-known name"
16953
16954  windows_path="$WIN_SDK_BASE"
16955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16956    unix_path=`$CYGPATH -u "$windows_path"`
16957    WIN_SDK_BASE="$unix_path"
16958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16960    WIN_SDK_BASE="$unix_path"
16961  fi
16962
16963    if test -d "$WIN_SDK_BASE"; then
16964      # There have been cases of partial or broken SDK installations. A missing
16965      # lib dir is not going to work.
16966      if test ! -d "$WIN_SDK_BASE/../lib"; then
16967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16968$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16970$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16971      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16972        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16973$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16974        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16975        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16976          VS_ENV_ARGS="/x86"
16977        else
16978          VS_ENV_ARGS="/x64"
16979        fi
16980      else
16981        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16982$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16983        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16984$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16985      fi
16986    fi
16987  fi
16988
16989  fi
16990  if test "x$PROGRAMW6432" != x; then
16991
16992  if test "x$VS_ENV_CMD" = x; then
16993    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16994    METHOD="well-known name"
16995
16996  windows_path="$WIN_SDK_BASE"
16997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16998    unix_path=`$CYGPATH -u "$windows_path"`
16999    WIN_SDK_BASE="$unix_path"
17000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17002    WIN_SDK_BASE="$unix_path"
17003  fi
17004
17005    if test -d "$WIN_SDK_BASE"; then
17006      # There have been cases of partial or broken SDK installations. A missing
17007      # lib dir is not going to work.
17008      if test ! -d "$WIN_SDK_BASE/../lib"; then
17009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17010$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17011        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17012$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17013      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17014        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17015$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17016        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17017        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17018          VS_ENV_ARGS="/x86"
17019        else
17020          VS_ENV_ARGS="/x64"
17021        fi
17022      else
17023        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17024$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17025        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17026$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17027      fi
17028    fi
17029  fi
17030
17031  fi
17032  if test "x$PROGRAMFILES" != x; then
17033
17034  if test "x$VS_ENV_CMD" = x; then
17035    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17036    METHOD="well-known name"
17037
17038  windows_path="$WIN_SDK_BASE"
17039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17040    unix_path=`$CYGPATH -u "$windows_path"`
17041    WIN_SDK_BASE="$unix_path"
17042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17044    WIN_SDK_BASE="$unix_path"
17045  fi
17046
17047    if test -d "$WIN_SDK_BASE"; then
17048      # There have been cases of partial or broken SDK installations. A missing
17049      # lib dir is not going to work.
17050      if test ! -d "$WIN_SDK_BASE/../lib"; then
17051        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17052$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17053        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17054$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17055      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17056        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17057$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17058        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17059        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17060          VS_ENV_ARGS="/x86"
17061        else
17062          VS_ENV_ARGS="/x64"
17063        fi
17064      else
17065        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17066$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17067        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17068$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17069      fi
17070    fi
17071  fi
17072
17073  fi
17074
17075  if test "x$VS_ENV_CMD" = x; then
17076    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17077    METHOD="well-known name"
17078
17079  windows_path="$WIN_SDK_BASE"
17080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17081    unix_path=`$CYGPATH -u "$windows_path"`
17082    WIN_SDK_BASE="$unix_path"
17083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17085    WIN_SDK_BASE="$unix_path"
17086  fi
17087
17088    if test -d "$WIN_SDK_BASE"; then
17089      # There have been cases of partial or broken SDK installations. A missing
17090      # lib dir is not going to work.
17091      if test ! -d "$WIN_SDK_BASE/../lib"; then
17092        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17093$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17094        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17095$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17096      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17099        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17100        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17101          VS_ENV_ARGS="/x86"
17102        else
17103          VS_ENV_ARGS="/x64"
17104        fi
17105      else
17106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17107$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17108        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17109$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17110      fi
17111    fi
17112  fi
17113
17114
17115  if test "x$VS_ENV_CMD" = x; then
17116    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17117    METHOD="well-known name"
17118
17119  windows_path="$WIN_SDK_BASE"
17120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17121    unix_path=`$CYGPATH -u "$windows_path"`
17122    WIN_SDK_BASE="$unix_path"
17123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17125    WIN_SDK_BASE="$unix_path"
17126  fi
17127
17128    if test -d "$WIN_SDK_BASE"; then
17129      # There have been cases of partial or broken SDK installations. A missing
17130      # lib dir is not going to work.
17131      if test ! -d "$WIN_SDK_BASE/../lib"; then
17132        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17133$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17134        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17135$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17136      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17139        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17140        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17141          VS_ENV_ARGS="/x86"
17142        else
17143          VS_ENV_ARGS="/x64"
17144        fi
17145      else
17146        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17147$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17148        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17149$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17150      fi
17151    fi
17152  fi
17153
17154
17155  if test "x$VS_ENV_CMD" != x; then
17156    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17157
17158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17159
17160  # First separate the path from the arguments. This will split at the first
17161  # space.
17162  complete="$VS_ENV_CMD"
17163  path="${complete%% *}"
17164  tmp="$complete EOL"
17165  arguments="${tmp#* }"
17166
17167  # Input might be given as Windows format, start by converting to
17168  # unix format.
17169  new_path=`$CYGPATH -u "$path"`
17170
17171  # Now try to locate executable using which
17172  new_path=`$WHICH "$new_path" 2> /dev/null`
17173  # bat and cmd files are not always considered executable in cygwin causing which
17174  # to not find them
17175  if test "x$new_path" = x \
17176      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17177      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17178    new_path=`$CYGPATH -u "$path"`
17179  fi
17180  if test "x$new_path" = x; then
17181    # Oops. Which didn't find the executable.
17182    # The splitting of arguments from the executable at a space might have been incorrect,
17183    # since paths with space are more likely in Windows. Give it another try with the whole
17184    # argument.
17185    path="$complete"
17186    arguments="EOL"
17187    new_path=`$CYGPATH -u "$path"`
17188    new_path=`$WHICH "$new_path" 2> /dev/null`
17189    # bat and cmd files are not always considered executable in cygwin causing which
17190    # to not find them
17191    if test "x$new_path" = x \
17192        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17193        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17194      new_path=`$CYGPATH -u "$path"`
17195    fi
17196    if test "x$new_path" = x; then
17197      # It's still not found. Now this is an unrecoverable error.
17198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17199$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17200      has_space=`$ECHO "$complete" | $GREP " "`
17201      if test "x$has_space" != x; then
17202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17204      fi
17205      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17206    fi
17207  fi
17208
17209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17212  # "foo.exe" is OK but "foo" is an error.
17213  #
17214  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17215  # It is also a way to make sure we got the proper file name for the real test later on.
17216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17217  if test "x$test_shortpath" = x; then
17218    # Short path failed, file does not exist as specified.
17219    # Try adding .exe or .cmd
17220    if test -f "${new_path}.exe"; then
17221      input_to_shortpath="${new_path}.exe"
17222    elif test -f "${new_path}.cmd"; then
17223      input_to_shortpath="${new_path}.cmd"
17224    else
17225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17226$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17227      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17228$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17229      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17230    fi
17231  else
17232    input_to_shortpath="$new_path"
17233  fi
17234
17235  # Call helper function which possibly converts this using DOS-style short mode.
17236  # If so, the updated path is stored in $new_path.
17237  new_path="$input_to_shortpath"
17238
17239  input_path="$input_to_shortpath"
17240  # Check if we need to convert this using DOS-style short mode. If the path
17241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17242  # take no chances and rewrite it.
17243  # Note: m4 eats our [], so we need to use [ and ] instead.
17244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17245  if test "x$has_forbidden_chars" != x; then
17246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17250      # Going to short mode and back again did indeed matter. Since short mode is
17251      # case insensitive, let's make it lowercase to improve readability.
17252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17253      # Now convert it back to Unix-stile (cygpath)
17254      input_path=`$CYGPATH -u "$shortmode_path"`
17255      new_path="$input_path"
17256    fi
17257  fi
17258
17259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17260  if test "x$test_cygdrive_prefix" = x; then
17261    # As a simple fix, exclude /usr/bin since it's not a real path.
17262    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17264      # a path prefixed by /cygdrive for fixpath to work.
17265      new_path="$CYGWIN_ROOT_PATH$input_path"
17266    fi
17267  fi
17268
17269  # remove trailing .exe if any
17270  new_path="${new_path/%.exe/}"
17271
17272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17273
17274  # First separate the path from the arguments. This will split at the first
17275  # space.
17276  complete="$VS_ENV_CMD"
17277  path="${complete%% *}"
17278  tmp="$complete EOL"
17279  arguments="${tmp#* }"
17280
17281  # Input might be given as Windows format, start by converting to
17282  # unix format.
17283  new_path="$path"
17284
17285  windows_path="$new_path"
17286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17287    unix_path=`$CYGPATH -u "$windows_path"`
17288    new_path="$unix_path"
17289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17291    new_path="$unix_path"
17292  fi
17293
17294
17295  # Now try to locate executable using which
17296  new_path=`$WHICH "$new_path" 2> /dev/null`
17297
17298  if test "x$new_path" = x; then
17299    # Oops. Which didn't find the executable.
17300    # The splitting of arguments from the executable at a space might have been incorrect,
17301    # since paths with space are more likely in Windows. Give it another try with the whole
17302    # argument.
17303    path="$complete"
17304    arguments="EOL"
17305    new_path="$path"
17306
17307  windows_path="$new_path"
17308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17309    unix_path=`$CYGPATH -u "$windows_path"`
17310    new_path="$unix_path"
17311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17313    new_path="$unix_path"
17314  fi
17315
17316
17317    new_path=`$WHICH "$new_path" 2> /dev/null`
17318
17319    if test "x$new_path" = x; then
17320      # It's still not found. Now this is an unrecoverable error.
17321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17322$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17323      has_space=`$ECHO "$complete" | $GREP " "`
17324      if test "x$has_space" != x; then
17325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17327      fi
17328      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17329    fi
17330  fi
17331
17332  # Now new_path has a complete unix path to the binary
17333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17334    # Keep paths in /bin as-is, but remove trailing .exe if any
17335    new_path="${new_path/%.exe/}"
17336    # Do not save /bin paths to all_fixpath_prefixes!
17337  else
17338    # Not in mixed or Windows style, start by that.
17339    new_path=`cmd //c echo $new_path`
17340
17341  input_path="$new_path"
17342  # Check if we need to convert this using DOS-style short mode. If the path
17343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17344  # take no chances and rewrite it.
17345  # Note: m4 eats our [], so we need to use [ and ] instead.
17346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17347  if test "x$has_forbidden_chars" != x; then
17348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17350  fi
17351
17352    # Output is in $new_path
17353
17354  windows_path="$new_path"
17355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17356    unix_path=`$CYGPATH -u "$windows_path"`
17357    new_path="$unix_path"
17358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17360    new_path="$unix_path"
17361  fi
17362
17363    # remove trailing .exe if any
17364    new_path="${new_path/%.exe/}"
17365
17366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17368  fi
17369
17370  else
17371    # We're on a posix platform. Hooray! :)
17372    # First separate the path from the arguments. This will split at the first
17373    # space.
17374    complete="$VS_ENV_CMD"
17375    path="${complete%% *}"
17376    tmp="$complete EOL"
17377    arguments="${tmp#* }"
17378
17379    # Cannot rely on the command "which" here since it doesn't always work.
17380    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17381    if test -z "$is_absolute_path"; then
17382      # Path to executable is not absolute. Find it.
17383      IFS_save="$IFS"
17384      IFS=:
17385      for p in $PATH; do
17386        if test -f "$p/$path" && test -x "$p/$path"; then
17387          new_path="$p/$path"
17388          break
17389        fi
17390      done
17391      IFS="$IFS_save"
17392    else
17393      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17394$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17395      new_path="$path"
17396    fi
17397
17398    if test "x$new_path" = x; then
17399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17400$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17401      has_space=`$ECHO "$complete" | $GREP " "`
17402      if test "x$has_space" != x; then
17403        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17404$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17405      fi
17406      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17407    fi
17408  fi
17409
17410  # Now join together the path and the arguments once again
17411  if test "x$arguments" != xEOL; then
17412    new_complete="$new_path ${arguments% *}"
17413  else
17414    new_complete="$new_path"
17415  fi
17416
17417  if test "x$complete" != "x$new_complete"; then
17418    VS_ENV_CMD="$new_complete"
17419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17420$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17421  fi
17422
17423
17424    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17425    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17426$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17427    cd $OUTPUT_ROOT
17428    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17429    # to autoconf standards.
17430
17431    #----
17432
17433    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17434    # but calculate the difference in Cygwin environment before/after running it and then
17435    # apply the diff.
17436
17437    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17438      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17439      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17440      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17441    else
17442      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17443      _dosbash=`cmd //c echo \`which bash\``
17444    fi
17445
17446    # generate the set of exported vars before/after the vs10 setup
17447    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17448    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17449    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17450    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17451
17452    # Now execute the newly created bat file.
17453    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17454    cmd /c localdevenvtmp.bat | cat
17455
17456    # apply the diff (less some non-vs10 vars named by "!")
17457    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17458    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17459    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17460
17461    # cleanup
17462    $RM localdevenvtmp*
17463    #----
17464    cd $CURDIR
17465    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17467$as_echo "no" >&6; }
17468      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17469$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17470      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17471$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17472      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17473$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17474      as_fn_error $? "Cannot continue" "$LINENO" 5
17475    fi
17476
17477    # Now set all paths and other env variables. This will allow the rest of
17478    # the configure script to find and run the compiler in the proper way.
17479    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17480$as_echo "$as_me: Setting extracted environment variables" >&6;}
17481    . $OUTPUT_ROOT/localdevenv.sh
17482  else
17483    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17484    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17485$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17486  fi
17487
17488  # At this point, we should have corrent variables in the environment, or we can't continue.
17489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17490$as_echo_n "checking for Visual Studio variables... " >&6; }
17491
17492  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17493    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17495$as_echo "present but broken" >&6; }
17496      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17497    else
17498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17499$as_echo "ok" >&6; }
17500      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17501      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17502      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17503      # Remove any paths containing # (typically F#) as that messes up make
17504      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17505      VS_PATH="$PATH"
17506
17507
17508
17509    fi
17510  else
17511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17512$as_echo "not found" >&6; }
17513
17514    if test "x$VS_ENV_CMD" = x; then
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17516$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17517      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17518$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17519    else
17520      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17521$as_echo "$as_me: Running the extraction script failed." >&6;}
17522    fi
17523    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17524$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17525    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17526$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17527    as_fn_error $? "Cannot continue" "$LINENO" 5
17528  fi
17529
17530
17531
17532# Check whether --with-msvcr-dll was given.
17533if test "${with_msvcr_dll+set}" = set; then :
17534  withval=$with_msvcr_dll;
17535fi
17536
17537
17538  if test "x$with_msvcr_dll" != x; then
17539    # If given explicitely by user, do not probe. If not present, fail directly.
17540
17541  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17542  METHOD="--with-msvcr-dll"
17543  if test -e "$POSSIBLE_MSVCR_DLL"; then
17544    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17545$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17546
17547    # Need to check if the found msvcr is correct architecture
17548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17549$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17550    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17551    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17552      CORRECT_MSVCR_ARCH=386
17553    else
17554      CORRECT_MSVCR_ARCH=x86-64
17555    fi
17556    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17558$as_echo "ok" >&6; }
17559      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17561$as_echo_n "checking for msvcr100.dll... " >&6; }
17562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17563$as_echo "$MSVCR_DLL" >&6; }
17564    else
17565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17566$as_echo "incorrect, ignoring" >&6; }
17567      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17568$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17569    fi
17570  fi
17571
17572    if test "x$MSVCR_DLL" = x; then
17573      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17574    fi
17575  fi
17576
17577  if test "x$MSVCR_DLL" = x; then
17578    # Probe: Using well-known location from Visual Studio 10.0
17579    if test "x$VCINSTALLDIR" != x; then
17580      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17581
17582  windows_path="$CYGWIN_VC_INSTALL_DIR"
17583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17584    unix_path=`$CYGPATH -u "$windows_path"`
17585    CYGWIN_VC_INSTALL_DIR="$unix_path"
17586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17588    CYGWIN_VC_INSTALL_DIR="$unix_path"
17589  fi
17590
17591      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17592        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17593      else
17594        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17595      fi
17596
17597  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17598  METHOD="well-known location in VCINSTALLDIR"
17599  if test -e "$POSSIBLE_MSVCR_DLL"; then
17600    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17601$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17602
17603    # Need to check if the found msvcr is correct architecture
17604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17605$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17606    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17607    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17608      CORRECT_MSVCR_ARCH=386
17609    else
17610      CORRECT_MSVCR_ARCH=x86-64
17611    fi
17612    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17614$as_echo "ok" >&6; }
17615      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17616      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17617$as_echo_n "checking for msvcr100.dll... " >&6; }
17618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17619$as_echo "$MSVCR_DLL" >&6; }
17620    else
17621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17622$as_echo "incorrect, ignoring" >&6; }
17623      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17624$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17625    fi
17626  fi
17627
17628    fi
17629  fi
17630
17631  if test "x$MSVCR_DLL" = x; then
17632    # Probe: Check in the Boot JDK directory.
17633    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17634
17635  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17636  METHOD="well-known location in Boot JDK"
17637  if test -e "$POSSIBLE_MSVCR_DLL"; then
17638    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17639$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17640
17641    # Need to check if the found msvcr is correct architecture
17642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17643$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17644    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17645    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17646      CORRECT_MSVCR_ARCH=386
17647    else
17648      CORRECT_MSVCR_ARCH=x86-64
17649    fi
17650    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17652$as_echo "ok" >&6; }
17653      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17655$as_echo_n "checking for msvcr100.dll... " >&6; }
17656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17657$as_echo "$MSVCR_DLL" >&6; }
17658    else
17659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17660$as_echo "incorrect, ignoring" >&6; }
17661      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17662$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17663    fi
17664  fi
17665
17666  fi
17667
17668  if test "x$MSVCR_DLL" = x; then
17669    # Probe: Look in the Windows system32 directory
17670    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17671
17672  windows_path="$CYGWIN_SYSTEMROOT"
17673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17674    unix_path=`$CYGPATH -u "$windows_path"`
17675    CYGWIN_SYSTEMROOT="$unix_path"
17676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17678    CYGWIN_SYSTEMROOT="$unix_path"
17679  fi
17680
17681    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17682
17683  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17684  METHOD="well-known location in SYSTEMROOT"
17685  if test -e "$POSSIBLE_MSVCR_DLL"; then
17686    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17687$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17688
17689    # Need to check if the found msvcr is correct architecture
17690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17691$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17692    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17693    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17694      CORRECT_MSVCR_ARCH=386
17695    else
17696      CORRECT_MSVCR_ARCH=x86-64
17697    fi
17698    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17700$as_echo "ok" >&6; }
17701      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17702      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17703$as_echo_n "checking for msvcr100.dll... " >&6; }
17704      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17705$as_echo "$MSVCR_DLL" >&6; }
17706    else
17707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17708$as_echo "incorrect, ignoring" >&6; }
17709      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17710$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17711    fi
17712  fi
17713
17714  fi
17715
17716  if test "x$MSVCR_DLL" = x; then
17717    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17718    if test "x$VS100COMNTOOLS" != x; then
17719      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17720
17721  windows_path="$CYGWIN_VS_TOOLS_DIR"
17722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17723    unix_path=`$CYGPATH -u "$windows_path"`
17724    CYGWIN_VS_TOOLS_DIR="$unix_path"
17725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17727    CYGWIN_VS_TOOLS_DIR="$unix_path"
17728  fi
17729
17730      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17731        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17732      else
17733        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17734      fi
17735
17736  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17737  METHOD="search of VS100COMNTOOLS"
17738  if test -e "$POSSIBLE_MSVCR_DLL"; then
17739    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17740$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17741
17742    # Need to check if the found msvcr is correct architecture
17743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17744$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17745    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17746    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17747      CORRECT_MSVCR_ARCH=386
17748    else
17749      CORRECT_MSVCR_ARCH=x86-64
17750    fi
17751    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17753$as_echo "ok" >&6; }
17754      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17756$as_echo_n "checking for msvcr100.dll... " >&6; }
17757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17758$as_echo "$MSVCR_DLL" >&6; }
17759    else
17760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17761$as_echo "incorrect, ignoring" >&6; }
17762      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17763$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17764    fi
17765  fi
17766
17767    fi
17768  fi
17769
17770  if test "x$MSVCR_DLL" = x; then
17771    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17772    # (This was the original behaviour; kept since it might turn up something)
17773    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17774      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17775        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17776      else
17777        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17778        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17779          # We're grasping at straws now...
17780          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17781        fi
17782      fi
17783
17784
17785  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17786  METHOD="search of VCINSTALLDIR"
17787  if test -e "$POSSIBLE_MSVCR_DLL"; then
17788    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17789$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17790
17791    # Need to check if the found msvcr is correct architecture
17792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17793$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17794    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17795    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17796      CORRECT_MSVCR_ARCH=386
17797    else
17798      CORRECT_MSVCR_ARCH=x86-64
17799    fi
17800    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17802$as_echo "ok" >&6; }
17803      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17804      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17805$as_echo_n "checking for msvcr100.dll... " >&6; }
17806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17807$as_echo "$MSVCR_DLL" >&6; }
17808    else
17809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17810$as_echo "incorrect, ignoring" >&6; }
17811      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17812$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17813    fi
17814  fi
17815
17816    fi
17817  fi
17818
17819  if test "x$MSVCR_DLL" = x; then
17820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17821$as_echo_n "checking for msvcr100.dll... " >&6; }
17822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17823$as_echo "no" >&6; }
17824    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17825  fi
17826
17827
17828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17829
17830  # Input might be given as Windows format, start by converting to
17831  # unix format.
17832  path="$MSVCR_DLL"
17833  new_path=`$CYGPATH -u "$path"`
17834
17835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17838  # "foo.exe" is OK but "foo" is an error.
17839  #
17840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17841  # It is also a way to make sure we got the proper file name for the real test later on.
17842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17843  if test "x$test_shortpath" = x; then
17844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17845$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17846    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17847  fi
17848
17849  # Call helper function which possibly converts this using DOS-style short mode.
17850  # If so, the updated path is stored in $new_path.
17851
17852  input_path="$new_path"
17853  # Check if we need to convert this using DOS-style short mode. If the path
17854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17855  # take no chances and rewrite it.
17856  # Note: m4 eats our [], so we need to use [ and ] instead.
17857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17858  if test "x$has_forbidden_chars" != x; then
17859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17863      # Going to short mode and back again did indeed matter. Since short mode is
17864      # case insensitive, let's make it lowercase to improve readability.
17865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17866      # Now convert it back to Unix-stile (cygpath)
17867      input_path=`$CYGPATH -u "$shortmode_path"`
17868      new_path="$input_path"
17869    fi
17870  fi
17871
17872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17873  if test "x$test_cygdrive_prefix" = x; then
17874    # As a simple fix, exclude /usr/bin since it's not a real path.
17875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17877      # a path prefixed by /cygdrive for fixpath to work.
17878      new_path="$CYGWIN_ROOT_PATH$input_path"
17879    fi
17880  fi
17881
17882
17883  if test "x$path" != "x$new_path"; then
17884    MSVCR_DLL="$new_path"
17885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17886$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17887  fi
17888
17889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17890
17891  path="$MSVCR_DLL"
17892  has_colon=`$ECHO $path | $GREP ^.:`
17893  new_path="$path"
17894  if test "x$has_colon" = x; then
17895    # Not in mixed or Windows style, start by that.
17896    new_path=`cmd //c echo $path`
17897  fi
17898
17899
17900  input_path="$new_path"
17901  # Check if we need to convert this using DOS-style short mode. If the path
17902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17903  # take no chances and rewrite it.
17904  # Note: m4 eats our [], so we need to use [ and ] instead.
17905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17906  if test "x$has_forbidden_chars" != x; then
17907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17909  fi
17910
17911
17912  windows_path="$new_path"
17913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17914    unix_path=`$CYGPATH -u "$windows_path"`
17915    new_path="$unix_path"
17916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17918    new_path="$unix_path"
17919  fi
17920
17921  if test "x$path" != "x$new_path"; then
17922    MSVCR_DLL="$new_path"
17923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17924$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17925  fi
17926
17927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17929
17930  else
17931    # We're on a posix platform. Hooray! :)
17932    path="$MSVCR_DLL"
17933    has_space=`$ECHO "$path" | $GREP " "`
17934    if test "x$has_space" != x; then
17935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17936$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17937      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17938    fi
17939
17940    # Use eval to expand a potential ~
17941    eval path="$path"
17942    if test ! -f "$path" && test ! -d "$path"; then
17943      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17944    fi
17945
17946    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17947  fi
17948
17949
17950
17951
17952# Check whether --with-dxsdk was given.
17953if test "${with_dxsdk+set}" = set; then :
17954  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17955$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17956fi
17957
17958
17959
17960
17961# Check whether --with-dxsdk-lib was given.
17962if test "${with_dxsdk_lib+set}" = set; then :
17963  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17964$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17965fi
17966
17967
17968
17969
17970# Check whether --with-dxsdk-include was given.
17971if test "${with_dxsdk_include+set}" = set; then :
17972  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17973$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17974fi
17975
17976
17977  fi
17978
17979
17980
17981  # If --build AND --host is set, then the configure script will find any
17982  # cross compilation tools in the PATH. Cross compilation tools
17983  # follows the cross compilation standard where they are prefixed with ${host}.
17984  # For example the binary i686-sun-solaris2.10-gcc
17985  # will cross compile for i686-sun-solaris2.10
17986  # If neither of build and host is not set, then build=host and the
17987  # default compiler found in the path will be used.
17988  # Setting only --host, does not seem to be really supported.
17989  # Please set both --build and --host if you want to cross compile.
17990
17991  if test "x$COMPILE_TYPE" = "xcross"; then
17992    # Now we to find a C/C++ compiler that can build executables for the build
17993    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17994    # once. Also, we need to do this before adding a tools dir to the path,
17995    # otherwise we might pick up cross-compilers which don't use standard naming.
17996    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17997    # to wait until they are properly discovered.
17998    for ac_prog in cl cc gcc
17999do
18000  # Extract the first word of "$ac_prog", so it can be a program name with args.
18001set dummy $ac_prog; ac_word=$2
18002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18003$as_echo_n "checking for $ac_word... " >&6; }
18004if ${ac_cv_path_BUILD_CC+:} false; then :
18005  $as_echo_n "(cached) " >&6
18006else
18007  case $BUILD_CC in
18008  [\\/]* | ?:[\\/]*)
18009  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18010  ;;
18011  *)
18012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18013for as_dir in $PATH
18014do
18015  IFS=$as_save_IFS
18016  test -z "$as_dir" && as_dir=.
18017    for ac_exec_ext in '' $ac_executable_extensions; do
18018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18019    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18021    break 2
18022  fi
18023done
18024  done
18025IFS=$as_save_IFS
18026
18027  ;;
18028esac
18029fi
18030BUILD_CC=$ac_cv_path_BUILD_CC
18031if test -n "$BUILD_CC"; then
18032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18033$as_echo "$BUILD_CC" >&6; }
18034else
18035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18036$as_echo "no" >&6; }
18037fi
18038
18039
18040  test -n "$BUILD_CC" && break
18041done
18042
18043
18044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18045
18046  # First separate the path from the arguments. This will split at the first
18047  # space.
18048  complete="$BUILD_CC"
18049  path="${complete%% *}"
18050  tmp="$complete EOL"
18051  arguments="${tmp#* }"
18052
18053  # Input might be given as Windows format, start by converting to
18054  # unix format.
18055  new_path=`$CYGPATH -u "$path"`
18056
18057  # Now try to locate executable using which
18058  new_path=`$WHICH "$new_path" 2> /dev/null`
18059  # bat and cmd files are not always considered executable in cygwin causing which
18060  # to not find them
18061  if test "x$new_path" = x \
18062      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18063      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18064    new_path=`$CYGPATH -u "$path"`
18065  fi
18066  if test "x$new_path" = x; then
18067    # Oops. Which didn't find the executable.
18068    # The splitting of arguments from the executable at a space might have been incorrect,
18069    # since paths with space are more likely in Windows. Give it another try with the whole
18070    # argument.
18071    path="$complete"
18072    arguments="EOL"
18073    new_path=`$CYGPATH -u "$path"`
18074    new_path=`$WHICH "$new_path" 2> /dev/null`
18075    # bat and cmd files are not always considered executable in cygwin causing which
18076    # to not find them
18077    if test "x$new_path" = x \
18078        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18079        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18080      new_path=`$CYGPATH -u "$path"`
18081    fi
18082    if test "x$new_path" = x; then
18083      # It's still not found. Now this is an unrecoverable error.
18084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18085$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18086      has_space=`$ECHO "$complete" | $GREP " "`
18087      if test "x$has_space" != x; then
18088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18090      fi
18091      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18092    fi
18093  fi
18094
18095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18098  # "foo.exe" is OK but "foo" is an error.
18099  #
18100  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18101  # It is also a way to make sure we got the proper file name for the real test later on.
18102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18103  if test "x$test_shortpath" = x; then
18104    # Short path failed, file does not exist as specified.
18105    # Try adding .exe or .cmd
18106    if test -f "${new_path}.exe"; then
18107      input_to_shortpath="${new_path}.exe"
18108    elif test -f "${new_path}.cmd"; then
18109      input_to_shortpath="${new_path}.cmd"
18110    else
18111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18112$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18113      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18114$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18115      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18116    fi
18117  else
18118    input_to_shortpath="$new_path"
18119  fi
18120
18121  # Call helper function which possibly converts this using DOS-style short mode.
18122  # If so, the updated path is stored in $new_path.
18123  new_path="$input_to_shortpath"
18124
18125  input_path="$input_to_shortpath"
18126  # Check if we need to convert this using DOS-style short mode. If the path
18127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18128  # take no chances and rewrite it.
18129  # Note: m4 eats our [], so we need to use [ and ] instead.
18130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18131  if test "x$has_forbidden_chars" != x; then
18132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18136      # Going to short mode and back again did indeed matter. Since short mode is
18137      # case insensitive, let's make it lowercase to improve readability.
18138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18139      # Now convert it back to Unix-stile (cygpath)
18140      input_path=`$CYGPATH -u "$shortmode_path"`
18141      new_path="$input_path"
18142    fi
18143  fi
18144
18145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18146  if test "x$test_cygdrive_prefix" = x; then
18147    # As a simple fix, exclude /usr/bin since it's not a real path.
18148    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18150      # a path prefixed by /cygdrive for fixpath to work.
18151      new_path="$CYGWIN_ROOT_PATH$input_path"
18152    fi
18153  fi
18154
18155  # remove trailing .exe if any
18156  new_path="${new_path/%.exe/}"
18157
18158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18159
18160  # First separate the path from the arguments. This will split at the first
18161  # space.
18162  complete="$BUILD_CC"
18163  path="${complete%% *}"
18164  tmp="$complete EOL"
18165  arguments="${tmp#* }"
18166
18167  # Input might be given as Windows format, start by converting to
18168  # unix format.
18169  new_path="$path"
18170
18171  windows_path="$new_path"
18172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18173    unix_path=`$CYGPATH -u "$windows_path"`
18174    new_path="$unix_path"
18175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18177    new_path="$unix_path"
18178  fi
18179
18180
18181  # Now try to locate executable using which
18182  new_path=`$WHICH "$new_path" 2> /dev/null`
18183
18184  if test "x$new_path" = x; then
18185    # Oops. Which didn't find the executable.
18186    # The splitting of arguments from the executable at a space might have been incorrect,
18187    # since paths with space are more likely in Windows. Give it another try with the whole
18188    # argument.
18189    path="$complete"
18190    arguments="EOL"
18191    new_path="$path"
18192
18193  windows_path="$new_path"
18194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18195    unix_path=`$CYGPATH -u "$windows_path"`
18196    new_path="$unix_path"
18197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18199    new_path="$unix_path"
18200  fi
18201
18202
18203    new_path=`$WHICH "$new_path" 2> /dev/null`
18204
18205    if test "x$new_path" = x; then
18206      # It's still not found. Now this is an unrecoverable error.
18207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18208$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18209      has_space=`$ECHO "$complete" | $GREP " "`
18210      if test "x$has_space" != x; then
18211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18213      fi
18214      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18215    fi
18216  fi
18217
18218  # Now new_path has a complete unix path to the binary
18219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18220    # Keep paths in /bin as-is, but remove trailing .exe if any
18221    new_path="${new_path/%.exe/}"
18222    # Do not save /bin paths to all_fixpath_prefixes!
18223  else
18224    # Not in mixed or Windows style, start by that.
18225    new_path=`cmd //c echo $new_path`
18226
18227  input_path="$new_path"
18228  # Check if we need to convert this using DOS-style short mode. If the path
18229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18230  # take no chances and rewrite it.
18231  # Note: m4 eats our [], so we need to use [ and ] instead.
18232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18233  if test "x$has_forbidden_chars" != x; then
18234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18236  fi
18237
18238    # Output is in $new_path
18239
18240  windows_path="$new_path"
18241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18242    unix_path=`$CYGPATH -u "$windows_path"`
18243    new_path="$unix_path"
18244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18246    new_path="$unix_path"
18247  fi
18248
18249    # remove trailing .exe if any
18250    new_path="${new_path/%.exe/}"
18251
18252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18254  fi
18255
18256  else
18257    # We're on a posix platform. Hooray! :)
18258    # First separate the path from the arguments. This will split at the first
18259    # space.
18260    complete="$BUILD_CC"
18261    path="${complete%% *}"
18262    tmp="$complete EOL"
18263    arguments="${tmp#* }"
18264
18265    # Cannot rely on the command "which" here since it doesn't always work.
18266    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18267    if test -z "$is_absolute_path"; then
18268      # Path to executable is not absolute. Find it.
18269      IFS_save="$IFS"
18270      IFS=:
18271      for p in $PATH; do
18272        if test -f "$p/$path" && test -x "$p/$path"; then
18273          new_path="$p/$path"
18274          break
18275        fi
18276      done
18277      IFS="$IFS_save"
18278    else
18279      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18280$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18281      new_path="$path"
18282    fi
18283
18284    if test "x$new_path" = x; then
18285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18286$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18287      has_space=`$ECHO "$complete" | $GREP " "`
18288      if test "x$has_space" != x; then
18289        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18291      fi
18292      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18293    fi
18294  fi
18295
18296  # Now join together the path and the arguments once again
18297  if test "x$arguments" != xEOL; then
18298    new_complete="$new_path ${arguments% *}"
18299  else
18300    new_complete="$new_path"
18301  fi
18302
18303  if test "x$complete" != "x$new_complete"; then
18304    BUILD_CC="$new_complete"
18305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18306$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18307  fi
18308
18309    for ac_prog in cl CC g++
18310do
18311  # Extract the first word of "$ac_prog", so it can be a program name with args.
18312set dummy $ac_prog; ac_word=$2
18313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18314$as_echo_n "checking for $ac_word... " >&6; }
18315if ${ac_cv_path_BUILD_CXX+:} false; then :
18316  $as_echo_n "(cached) " >&6
18317else
18318  case $BUILD_CXX in
18319  [\\/]* | ?:[\\/]*)
18320  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18321  ;;
18322  *)
18323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18324for as_dir in $PATH
18325do
18326  IFS=$as_save_IFS
18327  test -z "$as_dir" && as_dir=.
18328    for ac_exec_ext in '' $ac_executable_extensions; do
18329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18330    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18332    break 2
18333  fi
18334done
18335  done
18336IFS=$as_save_IFS
18337
18338  ;;
18339esac
18340fi
18341BUILD_CXX=$ac_cv_path_BUILD_CXX
18342if test -n "$BUILD_CXX"; then
18343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18344$as_echo "$BUILD_CXX" >&6; }
18345else
18346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18347$as_echo "no" >&6; }
18348fi
18349
18350
18351  test -n "$BUILD_CXX" && break
18352done
18353
18354
18355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18356
18357  # First separate the path from the arguments. This will split at the first
18358  # space.
18359  complete="$BUILD_CXX"
18360  path="${complete%% *}"
18361  tmp="$complete EOL"
18362  arguments="${tmp#* }"
18363
18364  # Input might be given as Windows format, start by converting to
18365  # unix format.
18366  new_path=`$CYGPATH -u "$path"`
18367
18368  # Now try to locate executable using which
18369  new_path=`$WHICH "$new_path" 2> /dev/null`
18370  # bat and cmd files are not always considered executable in cygwin causing which
18371  # to not find them
18372  if test "x$new_path" = x \
18373      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18374      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18375    new_path=`$CYGPATH -u "$path"`
18376  fi
18377  if test "x$new_path" = x; then
18378    # Oops. Which didn't find the executable.
18379    # The splitting of arguments from the executable at a space might have been incorrect,
18380    # since paths with space are more likely in Windows. Give it another try with the whole
18381    # argument.
18382    path="$complete"
18383    arguments="EOL"
18384    new_path=`$CYGPATH -u "$path"`
18385    new_path=`$WHICH "$new_path" 2> /dev/null`
18386    # bat and cmd files are not always considered executable in cygwin causing which
18387    # to not find them
18388    if test "x$new_path" = x \
18389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18391      new_path=`$CYGPATH -u "$path"`
18392    fi
18393    if test "x$new_path" = x; then
18394      # It's still not found. Now this is an unrecoverable error.
18395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18396$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18397      has_space=`$ECHO "$complete" | $GREP " "`
18398      if test "x$has_space" != x; then
18399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18401      fi
18402      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18403    fi
18404  fi
18405
18406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18409  # "foo.exe" is OK but "foo" is an error.
18410  #
18411  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18412  # It is also a way to make sure we got the proper file name for the real test later on.
18413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18414  if test "x$test_shortpath" = x; then
18415    # Short path failed, file does not exist as specified.
18416    # Try adding .exe or .cmd
18417    if test -f "${new_path}.exe"; then
18418      input_to_shortpath="${new_path}.exe"
18419    elif test -f "${new_path}.cmd"; then
18420      input_to_shortpath="${new_path}.cmd"
18421    else
18422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18423$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18424      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18425$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18426      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18427    fi
18428  else
18429    input_to_shortpath="$new_path"
18430  fi
18431
18432  # Call helper function which possibly converts this using DOS-style short mode.
18433  # If so, the updated path is stored in $new_path.
18434  new_path="$input_to_shortpath"
18435
18436  input_path="$input_to_shortpath"
18437  # Check if we need to convert this using DOS-style short mode. If the path
18438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18439  # take no chances and rewrite it.
18440  # Note: m4 eats our [], so we need to use [ and ] instead.
18441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18442  if test "x$has_forbidden_chars" != x; then
18443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18447      # Going to short mode and back again did indeed matter. Since short mode is
18448      # case insensitive, let's make it lowercase to improve readability.
18449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18450      # Now convert it back to Unix-stile (cygpath)
18451      input_path=`$CYGPATH -u "$shortmode_path"`
18452      new_path="$input_path"
18453    fi
18454  fi
18455
18456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18457  if test "x$test_cygdrive_prefix" = x; then
18458    # As a simple fix, exclude /usr/bin since it's not a real path.
18459    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18461      # a path prefixed by /cygdrive for fixpath to work.
18462      new_path="$CYGWIN_ROOT_PATH$input_path"
18463    fi
18464  fi
18465
18466  # remove trailing .exe if any
18467  new_path="${new_path/%.exe/}"
18468
18469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18470
18471  # First separate the path from the arguments. This will split at the first
18472  # space.
18473  complete="$BUILD_CXX"
18474  path="${complete%% *}"
18475  tmp="$complete EOL"
18476  arguments="${tmp#* }"
18477
18478  # Input might be given as Windows format, start by converting to
18479  # unix format.
18480  new_path="$path"
18481
18482  windows_path="$new_path"
18483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18484    unix_path=`$CYGPATH -u "$windows_path"`
18485    new_path="$unix_path"
18486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18488    new_path="$unix_path"
18489  fi
18490
18491
18492  # Now try to locate executable using which
18493  new_path=`$WHICH "$new_path" 2> /dev/null`
18494
18495  if test "x$new_path" = x; then
18496    # Oops. Which didn't find the executable.
18497    # The splitting of arguments from the executable at a space might have been incorrect,
18498    # since paths with space are more likely in Windows. Give it another try with the whole
18499    # argument.
18500    path="$complete"
18501    arguments="EOL"
18502    new_path="$path"
18503
18504  windows_path="$new_path"
18505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18506    unix_path=`$CYGPATH -u "$windows_path"`
18507    new_path="$unix_path"
18508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18510    new_path="$unix_path"
18511  fi
18512
18513
18514    new_path=`$WHICH "$new_path" 2> /dev/null`
18515
18516    if test "x$new_path" = x; then
18517      # It's still not found. Now this is an unrecoverable error.
18518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18519$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18520      has_space=`$ECHO "$complete" | $GREP " "`
18521      if test "x$has_space" != x; then
18522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18524      fi
18525      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18526    fi
18527  fi
18528
18529  # Now new_path has a complete unix path to the binary
18530  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18531    # Keep paths in /bin as-is, but remove trailing .exe if any
18532    new_path="${new_path/%.exe/}"
18533    # Do not save /bin paths to all_fixpath_prefixes!
18534  else
18535    # Not in mixed or Windows style, start by that.
18536    new_path=`cmd //c echo $new_path`
18537
18538  input_path="$new_path"
18539  # Check if we need to convert this using DOS-style short mode. If the path
18540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18541  # take no chances and rewrite it.
18542  # Note: m4 eats our [], so we need to use [ and ] instead.
18543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18544  if test "x$has_forbidden_chars" != x; then
18545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18547  fi
18548
18549    # Output is in $new_path
18550
18551  windows_path="$new_path"
18552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18553    unix_path=`$CYGPATH -u "$windows_path"`
18554    new_path="$unix_path"
18555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18557    new_path="$unix_path"
18558  fi
18559
18560    # remove trailing .exe if any
18561    new_path="${new_path/%.exe/}"
18562
18563    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18564    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18565  fi
18566
18567  else
18568    # We're on a posix platform. Hooray! :)
18569    # First separate the path from the arguments. This will split at the first
18570    # space.
18571    complete="$BUILD_CXX"
18572    path="${complete%% *}"
18573    tmp="$complete EOL"
18574    arguments="${tmp#* }"
18575
18576    # Cannot rely on the command "which" here since it doesn't always work.
18577    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18578    if test -z "$is_absolute_path"; then
18579      # Path to executable is not absolute. Find it.
18580      IFS_save="$IFS"
18581      IFS=:
18582      for p in $PATH; do
18583        if test -f "$p/$path" && test -x "$p/$path"; then
18584          new_path="$p/$path"
18585          break
18586        fi
18587      done
18588      IFS="$IFS_save"
18589    else
18590      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18591$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18592      new_path="$path"
18593    fi
18594
18595    if test "x$new_path" = x; then
18596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18597$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18598      has_space=`$ECHO "$complete" | $GREP " "`
18599      if test "x$has_space" != x; then
18600        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18601$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18602      fi
18603      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18604    fi
18605  fi
18606
18607  # Now join together the path and the arguments once again
18608  if test "x$arguments" != xEOL; then
18609    new_complete="$new_path ${arguments% *}"
18610  else
18611    new_complete="$new_path"
18612  fi
18613
18614  if test "x$complete" != "x$new_complete"; then
18615    BUILD_CXX="$new_complete"
18616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18617$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18618  fi
18619
18620    # Extract the first word of "ld", so it can be a program name with args.
18621set dummy ld; ac_word=$2
18622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18623$as_echo_n "checking for $ac_word... " >&6; }
18624if ${ac_cv_path_BUILD_LD+:} false; then :
18625  $as_echo_n "(cached) " >&6
18626else
18627  case $BUILD_LD in
18628  [\\/]* | ?:[\\/]*)
18629  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18630  ;;
18631  *)
18632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18633for as_dir in $PATH
18634do
18635  IFS=$as_save_IFS
18636  test -z "$as_dir" && as_dir=.
18637    for ac_exec_ext in '' $ac_executable_extensions; do
18638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18639    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18641    break 2
18642  fi
18643done
18644  done
18645IFS=$as_save_IFS
18646
18647  ;;
18648esac
18649fi
18650BUILD_LD=$ac_cv_path_BUILD_LD
18651if test -n "$BUILD_LD"; then
18652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18653$as_echo "$BUILD_LD" >&6; }
18654else
18655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18656$as_echo "no" >&6; }
18657fi
18658
18659
18660
18661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18662
18663  # First separate the path from the arguments. This will split at the first
18664  # space.
18665  complete="$BUILD_LD"
18666  path="${complete%% *}"
18667  tmp="$complete EOL"
18668  arguments="${tmp#* }"
18669
18670  # Input might be given as Windows format, start by converting to
18671  # unix format.
18672  new_path=`$CYGPATH -u "$path"`
18673
18674  # Now try to locate executable using which
18675  new_path=`$WHICH "$new_path" 2> /dev/null`
18676  # bat and cmd files are not always considered executable in cygwin causing which
18677  # to not find them
18678  if test "x$new_path" = x \
18679      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18680      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18681    new_path=`$CYGPATH -u "$path"`
18682  fi
18683  if test "x$new_path" = x; then
18684    # Oops. Which didn't find the executable.
18685    # The splitting of arguments from the executable at a space might have been incorrect,
18686    # since paths with space are more likely in Windows. Give it another try with the whole
18687    # argument.
18688    path="$complete"
18689    arguments="EOL"
18690    new_path=`$CYGPATH -u "$path"`
18691    new_path=`$WHICH "$new_path" 2> /dev/null`
18692    # bat and cmd files are not always considered executable in cygwin causing which
18693    # to not find them
18694    if test "x$new_path" = x \
18695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18697      new_path=`$CYGPATH -u "$path"`
18698    fi
18699    if test "x$new_path" = x; then
18700      # It's still not found. Now this is an unrecoverable error.
18701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18702$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18703      has_space=`$ECHO "$complete" | $GREP " "`
18704      if test "x$has_space" != x; then
18705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18707      fi
18708      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18709    fi
18710  fi
18711
18712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18715  # "foo.exe" is OK but "foo" is an error.
18716  #
18717  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18718  # It is also a way to make sure we got the proper file name for the real test later on.
18719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18720  if test "x$test_shortpath" = x; then
18721    # Short path failed, file does not exist as specified.
18722    # Try adding .exe or .cmd
18723    if test -f "${new_path}.exe"; then
18724      input_to_shortpath="${new_path}.exe"
18725    elif test -f "${new_path}.cmd"; then
18726      input_to_shortpath="${new_path}.cmd"
18727    else
18728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18729$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18730      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18731$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18732      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18733    fi
18734  else
18735    input_to_shortpath="$new_path"
18736  fi
18737
18738  # Call helper function which possibly converts this using DOS-style short mode.
18739  # If so, the updated path is stored in $new_path.
18740  new_path="$input_to_shortpath"
18741
18742  input_path="$input_to_shortpath"
18743  # Check if we need to convert this using DOS-style short mode. If the path
18744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18745  # take no chances and rewrite it.
18746  # Note: m4 eats our [], so we need to use [ and ] instead.
18747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18748  if test "x$has_forbidden_chars" != x; then
18749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18753      # Going to short mode and back again did indeed matter. Since short mode is
18754      # case insensitive, let's make it lowercase to improve readability.
18755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18756      # Now convert it back to Unix-stile (cygpath)
18757      input_path=`$CYGPATH -u "$shortmode_path"`
18758      new_path="$input_path"
18759    fi
18760  fi
18761
18762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18763  if test "x$test_cygdrive_prefix" = x; then
18764    # As a simple fix, exclude /usr/bin since it's not a real path.
18765    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18767      # a path prefixed by /cygdrive for fixpath to work.
18768      new_path="$CYGWIN_ROOT_PATH$input_path"
18769    fi
18770  fi
18771
18772  # remove trailing .exe if any
18773  new_path="${new_path/%.exe/}"
18774
18775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18776
18777  # First separate the path from the arguments. This will split at the first
18778  # space.
18779  complete="$BUILD_LD"
18780  path="${complete%% *}"
18781  tmp="$complete EOL"
18782  arguments="${tmp#* }"
18783
18784  # Input might be given as Windows format, start by converting to
18785  # unix format.
18786  new_path="$path"
18787
18788  windows_path="$new_path"
18789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18790    unix_path=`$CYGPATH -u "$windows_path"`
18791    new_path="$unix_path"
18792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18794    new_path="$unix_path"
18795  fi
18796
18797
18798  # Now try to locate executable using which
18799  new_path=`$WHICH "$new_path" 2> /dev/null`
18800
18801  if test "x$new_path" = x; then
18802    # Oops. Which didn't find the executable.
18803    # The splitting of arguments from the executable at a space might have been incorrect,
18804    # since paths with space are more likely in Windows. Give it another try with the whole
18805    # argument.
18806    path="$complete"
18807    arguments="EOL"
18808    new_path="$path"
18809
18810  windows_path="$new_path"
18811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18812    unix_path=`$CYGPATH -u "$windows_path"`
18813    new_path="$unix_path"
18814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18816    new_path="$unix_path"
18817  fi
18818
18819
18820    new_path=`$WHICH "$new_path" 2> /dev/null`
18821
18822    if test "x$new_path" = x; then
18823      # It's still not found. Now this is an unrecoverable error.
18824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18825$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18826      has_space=`$ECHO "$complete" | $GREP " "`
18827      if test "x$has_space" != x; then
18828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18830      fi
18831      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18832    fi
18833  fi
18834
18835  # Now new_path has a complete unix path to the binary
18836  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18837    # Keep paths in /bin as-is, but remove trailing .exe if any
18838    new_path="${new_path/%.exe/}"
18839    # Do not save /bin paths to all_fixpath_prefixes!
18840  else
18841    # Not in mixed or Windows style, start by that.
18842    new_path=`cmd //c echo $new_path`
18843
18844  input_path="$new_path"
18845  # Check if we need to convert this using DOS-style short mode. If the path
18846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18847  # take no chances and rewrite it.
18848  # Note: m4 eats our [], so we need to use [ and ] instead.
18849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18850  if test "x$has_forbidden_chars" != x; then
18851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18853  fi
18854
18855    # Output is in $new_path
18856
18857  windows_path="$new_path"
18858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18859    unix_path=`$CYGPATH -u "$windows_path"`
18860    new_path="$unix_path"
18861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18863    new_path="$unix_path"
18864  fi
18865
18866    # remove trailing .exe if any
18867    new_path="${new_path/%.exe/}"
18868
18869    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18870    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18871  fi
18872
18873  else
18874    # We're on a posix platform. Hooray! :)
18875    # First separate the path from the arguments. This will split at the first
18876    # space.
18877    complete="$BUILD_LD"
18878    path="${complete%% *}"
18879    tmp="$complete EOL"
18880    arguments="${tmp#* }"
18881
18882    # Cannot rely on the command "which" here since it doesn't always work.
18883    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18884    if test -z "$is_absolute_path"; then
18885      # Path to executable is not absolute. Find it.
18886      IFS_save="$IFS"
18887      IFS=:
18888      for p in $PATH; do
18889        if test -f "$p/$path" && test -x "$p/$path"; then
18890          new_path="$p/$path"
18891          break
18892        fi
18893      done
18894      IFS="$IFS_save"
18895    else
18896      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18897$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18898      new_path="$path"
18899    fi
18900
18901    if test "x$new_path" = x; then
18902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18903$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18904      has_space=`$ECHO "$complete" | $GREP " "`
18905      if test "x$has_space" != x; then
18906        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18907$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18908      fi
18909      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18910    fi
18911  fi
18912
18913  # Now join together the path and the arguments once again
18914  if test "x$arguments" != xEOL; then
18915    new_complete="$new_path ${arguments% *}"
18916  else
18917    new_complete="$new_path"
18918  fi
18919
18920  if test "x$complete" != "x$new_complete"; then
18921    BUILD_LD="$new_complete"
18922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18923$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18924  fi
18925
18926  fi
18927
18928
18929
18930
18931  # If a devkit is found on the builddeps server, then prepend its path to the
18932  # PATH variable. If there are cross compilers available in the devkit, these
18933  # will be found by AC_PROG_CC et al.
18934  DEVKIT=
18935
18936
18937  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18938    # Source the builddeps file again, to make sure it uses the latest variables!
18939    . $builddepsfile
18940    # Look for a target and build machine specific resource!
18941    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18942    if test "x$resource" = x; then
18943      # Ok, lets instead look for a target specific resource
18944      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18945    fi
18946    if test "x$resource" = x; then
18947      # Ok, lets instead look for a build specific resource
18948      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18949    fi
18950    if test "x$resource" = x; then
18951      # Ok, lets instead look for a generic resource
18952      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18953      resource=${builddep_devkit}
18954    fi
18955    if test "x$resource" != x; then
18956      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18957$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18958      # If the resource in the builddeps.conf file is an existing directory,
18959      # for example /java/linux/cups
18960      if test -d ${resource}; then
18961        depdir=${resource}
18962      else
18963
18964  # devkit is for example mymodule
18965  # $resource is for example libs/general/libmymod_1_2_3.zip
18966  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18967  # $with_builddeps_dir is for example /localhome/builddeps
18968  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18969  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18970  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18971  filename=`basename $resource`
18972  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18973  filebase=${filename%%.*}
18974  extension=${filename#*.}
18975  installdir=$with_builddeps_dir/$filebase
18976  if test ! -f $installdir/$filename.unpacked; then
18977    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18978$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18979    if test ! -d $installdir; then
18980      mkdir -p $installdir
18981    fi
18982    if test ! -d $installdir; then
18983      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18984    fi
18985    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18986    touch $tmpfile
18987    if test ! -f $tmpfile; then
18988      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18989    fi
18990
18991  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18992  # $tmpfile is the local file name for the downloaded file.
18993  VALID_TOOL=no
18994  if test "x$BDEPS_FTP" = xwget; then
18995    VALID_TOOL=yes
18996    wget -O $tmpfile $with_builddeps_server/$resource
18997  fi
18998  if test "x$BDEPS_FTP" = xlftp; then
18999    VALID_TOOL=yes
19000    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19001  fi
19002  if test "x$BDEPS_FTP" = xftp; then
19003    VALID_TOOL=yes
19004    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19005    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19006    FTPUSERPWD=${FTPSERVER%%@*}
19007    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19008      FTPUSER=${userpwd%%:*}
19009      FTPPWD=${userpwd#*@}
19010      FTPSERVER=${FTPSERVER#*@}
19011    else
19012      FTPUSER=ftp
19013      FTPPWD=ftp
19014    fi
19015    # the "pass" command does not work on some
19016    # ftp clients (read ftp.exe) but if it works,
19017    # passive mode is better!
19018    ( \
19019        echo "user $FTPUSER $FTPPWD"        ; \
19020        echo "pass"                         ; \
19021        echo "bin"                          ; \
19022        echo "get $FTPPATH $tmpfile"              ; \
19023    ) | ftp -in $FTPSERVER
19024  fi
19025  if test "x$VALID_TOOL" != xyes; then
19026    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19027  fi
19028
19029    mv $tmpfile $installdir/$filename
19030    if test ! -s $installdir/$filename; then
19031      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19032    fi
19033    case "$extension" in
19034      zip)  echo "Unzipping $installdir/$filename..."
19035        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19036        ;;
19037      tar.gz) echo "Untaring $installdir/$filename..."
19038        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19039        ;;
19040      tgz) echo "Untaring $installdir/$filename..."
19041        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19042        ;;
19043      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19044        ;;
19045    esac
19046  fi
19047  if test -f $installdir/$filename.unpacked; then
19048    depdir=$installdir
19049  fi
19050
19051      fi
19052      # Source the builddeps file again, because in the previous command, the depdir
19053      # was updated to point at the current build dependency install directory.
19054      . $builddepsfile
19055      # Now extract variables from the builddeps.conf files.
19056      theroot=${builddep_devkit_ROOT}
19057      thecflags=${builddep_devkit_CFLAGS}
19058      thelibs=${builddep_devkit_LIBS}
19059      if test "x$depdir" = x; then
19060        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19061      fi
19062      DEVKIT=$depdir
19063      if test "x$theroot" != x; then
19064        DEVKIT="$theroot"
19065      fi
19066      if test "x$thecflags" != x; then
19067        DEVKIT_CFLAGS="$thecflags"
19068      fi
19069      if test "x$thelibs" != x; then
19070        DEVKIT_LIBS="$thelibs"
19071      fi
19072
19073        # Found devkit
19074        PATH="$DEVKIT/bin:$PATH"
19075        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19076        if test "x$x_includes" = "xNONE"; then
19077          x_includes="$SYS_ROOT/usr/include/X11"
19078        fi
19079        if test "x$x_libraries" = "xNONE"; then
19080          x_libraries="$SYS_ROOT/usr/lib"
19081        fi
19082
19083
19084    fi
19085
19086  fi
19087
19088
19089  # Store the CFLAGS etal passed to the configure script.
19090  ORG_CFLAGS="$CFLAGS"
19091  ORG_CXXFLAGS="$CXXFLAGS"
19092  ORG_OBJCFLAGS="$OBJCFLAGS"
19093
19094  # autoconf magic only relies on PATH, so update it if tools dir is specified
19095  OLD_PATH="$PATH"
19096  if test "x$TOOLS_DIR" != x; then
19097    PATH=$TOOLS_DIR:$PATH
19098  fi
19099
19100
19101  ### Locate C compiler (CC)
19102
19103  # On windows, only cl.exe is supported.
19104  # On Solaris, cc is preferred to gcc.
19105  # Elsewhere, gcc is preferred to cc.
19106
19107  if test "x$CC" != x; then
19108    COMPILER_CHECK_LIST="$CC"
19109  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19110    COMPILER_CHECK_LIST="cl"
19111  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19112    COMPILER_CHECK_LIST="cc gcc"
19113  else
19114    COMPILER_CHECK_LIST="gcc cc"
19115  fi
19116
19117
19118  COMPILER_NAME=C
19119
19120  CC=
19121  # If TOOLS_DIR is set, check for all compiler names in there first
19122  # before checking the rest of the PATH.
19123  if test -n "$TOOLS_DIR"; then
19124    PATH_save="$PATH"
19125    PATH="$TOOLS_DIR"
19126    for ac_prog in $COMPILER_CHECK_LIST
19127do
19128  # Extract the first word of "$ac_prog", so it can be a program name with args.
19129set dummy $ac_prog; ac_word=$2
19130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19131$as_echo_n "checking for $ac_word... " >&6; }
19132if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19133  $as_echo_n "(cached) " >&6
19134else
19135  case $TOOLS_DIR_CC in
19136  [\\/]* | ?:[\\/]*)
19137  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19138  ;;
19139  *)
19140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19141for as_dir in $PATH
19142do
19143  IFS=$as_save_IFS
19144  test -z "$as_dir" && as_dir=.
19145    for ac_exec_ext in '' $ac_executable_extensions; do
19146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19147    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19149    break 2
19150  fi
19151done
19152  done
19153IFS=$as_save_IFS
19154
19155  ;;
19156esac
19157fi
19158TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19159if test -n "$TOOLS_DIR_CC"; then
19160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19161$as_echo "$TOOLS_DIR_CC" >&6; }
19162else
19163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19164$as_echo "no" >&6; }
19165fi
19166
19167
19168  test -n "$TOOLS_DIR_CC" && break
19169done
19170
19171    CC=$TOOLS_DIR_CC
19172    PATH="$PATH_save"
19173  fi
19174
19175  # AC_PATH_PROGS can't be run multiple times with the same variable,
19176  # so create a new name for this run.
19177  if test "x$CC" = x; then
19178    for ac_prog in $COMPILER_CHECK_LIST
19179do
19180  # Extract the first word of "$ac_prog", so it can be a program name with args.
19181set dummy $ac_prog; ac_word=$2
19182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19183$as_echo_n "checking for $ac_word... " >&6; }
19184if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19185  $as_echo_n "(cached) " >&6
19186else
19187  case $POTENTIAL_CC in
19188  [\\/]* | ?:[\\/]*)
19189  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19190  ;;
19191  *)
19192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19193for as_dir in $PATH
19194do
19195  IFS=$as_save_IFS
19196  test -z "$as_dir" && as_dir=.
19197    for ac_exec_ext in '' $ac_executable_extensions; do
19198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19199    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19201    break 2
19202  fi
19203done
19204  done
19205IFS=$as_save_IFS
19206
19207  ;;
19208esac
19209fi
19210POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19211if test -n "$POTENTIAL_CC"; then
19212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19213$as_echo "$POTENTIAL_CC" >&6; }
19214else
19215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19216$as_echo "no" >&6; }
19217fi
19218
19219
19220  test -n "$POTENTIAL_CC" && break
19221done
19222
19223    CC=$POTENTIAL_CC
19224  fi
19225
19226  if test "x$CC" = x; then
19227
19228  # Print a helpful message on how to acquire the necessary build dependency.
19229  # devkit is the help tag: freetype, cups, pulse, alsa etc
19230  MISSING_DEPENDENCY=devkit
19231
19232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19233    cygwin_help $MISSING_DEPENDENCY
19234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19235    msys_help $MISSING_DEPENDENCY
19236  else
19237    PKGHANDLER_COMMAND=
19238
19239    case $PKGHANDLER in
19240      apt-get)
19241        apt_help     $MISSING_DEPENDENCY ;;
19242      yum)
19243        yum_help     $MISSING_DEPENDENCY ;;
19244      port)
19245        port_help    $MISSING_DEPENDENCY ;;
19246      pkgutil)
19247        pkgutil_help $MISSING_DEPENDENCY ;;
19248      pkgadd)
19249        pkgadd_help  $MISSING_DEPENDENCY ;;
19250      * )
19251        break ;;
19252    esac
19253
19254    if test "x$PKGHANDLER_COMMAND" != x; then
19255      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19256    fi
19257  fi
19258
19259    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19260  fi
19261
19262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19263
19264  # First separate the path from the arguments. This will split at the first
19265  # space.
19266  complete="$CC"
19267  path="${complete%% *}"
19268  tmp="$complete EOL"
19269  arguments="${tmp#* }"
19270
19271  # Input might be given as Windows format, start by converting to
19272  # unix format.
19273  new_path=`$CYGPATH -u "$path"`
19274
19275  # Now try to locate executable using which
19276  new_path=`$WHICH "$new_path" 2> /dev/null`
19277  # bat and cmd files are not always considered executable in cygwin causing which
19278  # to not find them
19279  if test "x$new_path" = x \
19280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19282    new_path=`$CYGPATH -u "$path"`
19283  fi
19284  if test "x$new_path" = x; then
19285    # Oops. Which didn't find the executable.
19286    # The splitting of arguments from the executable at a space might have been incorrect,
19287    # since paths with space are more likely in Windows. Give it another try with the whole
19288    # argument.
19289    path="$complete"
19290    arguments="EOL"
19291    new_path=`$CYGPATH -u "$path"`
19292    new_path=`$WHICH "$new_path" 2> /dev/null`
19293    # bat and cmd files are not always considered executable in cygwin causing which
19294    # to not find them
19295    if test "x$new_path" = x \
19296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19298      new_path=`$CYGPATH -u "$path"`
19299    fi
19300    if test "x$new_path" = x; then
19301      # It's still not found. Now this is an unrecoverable error.
19302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19303$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19304      has_space=`$ECHO "$complete" | $GREP " "`
19305      if test "x$has_space" != x; then
19306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19308      fi
19309      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19310    fi
19311  fi
19312
19313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19316  # "foo.exe" is OK but "foo" is an error.
19317  #
19318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19319  # It is also a way to make sure we got the proper file name for the real test later on.
19320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19321  if test "x$test_shortpath" = x; then
19322    # Short path failed, file does not exist as specified.
19323    # Try adding .exe or .cmd
19324    if test -f "${new_path}.exe"; then
19325      input_to_shortpath="${new_path}.exe"
19326    elif test -f "${new_path}.cmd"; then
19327      input_to_shortpath="${new_path}.cmd"
19328    else
19329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19330$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19333      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19334    fi
19335  else
19336    input_to_shortpath="$new_path"
19337  fi
19338
19339  # Call helper function which possibly converts this using DOS-style short mode.
19340  # If so, the updated path is stored in $new_path.
19341  new_path="$input_to_shortpath"
19342
19343  input_path="$input_to_shortpath"
19344  # Check if we need to convert this using DOS-style short mode. If the path
19345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19346  # take no chances and rewrite it.
19347  # Note: m4 eats our [], so we need to use [ and ] instead.
19348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19349  if test "x$has_forbidden_chars" != x; then
19350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19354      # Going to short mode and back again did indeed matter. Since short mode is
19355      # case insensitive, let's make it lowercase to improve readability.
19356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19357      # Now convert it back to Unix-stile (cygpath)
19358      input_path=`$CYGPATH -u "$shortmode_path"`
19359      new_path="$input_path"
19360    fi
19361  fi
19362
19363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19364  if test "x$test_cygdrive_prefix" = x; then
19365    # As a simple fix, exclude /usr/bin since it's not a real path.
19366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19368      # a path prefixed by /cygdrive for fixpath to work.
19369      new_path="$CYGWIN_ROOT_PATH$input_path"
19370    fi
19371  fi
19372
19373  # remove trailing .exe if any
19374  new_path="${new_path/%.exe/}"
19375
19376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19377
19378  # First separate the path from the arguments. This will split at the first
19379  # space.
19380  complete="$CC"
19381  path="${complete%% *}"
19382  tmp="$complete EOL"
19383  arguments="${tmp#* }"
19384
19385  # Input might be given as Windows format, start by converting to
19386  # unix format.
19387  new_path="$path"
19388
19389  windows_path="$new_path"
19390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19391    unix_path=`$CYGPATH -u "$windows_path"`
19392    new_path="$unix_path"
19393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19395    new_path="$unix_path"
19396  fi
19397
19398
19399  # Now try to locate executable using which
19400  new_path=`$WHICH "$new_path" 2> /dev/null`
19401
19402  if test "x$new_path" = x; then
19403    # Oops. Which didn't find the executable.
19404    # The splitting of arguments from the executable at a space might have been incorrect,
19405    # since paths with space are more likely in Windows. Give it another try with the whole
19406    # argument.
19407    path="$complete"
19408    arguments="EOL"
19409    new_path="$path"
19410
19411  windows_path="$new_path"
19412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19413    unix_path=`$CYGPATH -u "$windows_path"`
19414    new_path="$unix_path"
19415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19417    new_path="$unix_path"
19418  fi
19419
19420
19421    new_path=`$WHICH "$new_path" 2> /dev/null`
19422
19423    if test "x$new_path" = x; then
19424      # It's still not found. Now this is an unrecoverable error.
19425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19426$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19427      has_space=`$ECHO "$complete" | $GREP " "`
19428      if test "x$has_space" != x; then
19429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19431      fi
19432      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19433    fi
19434  fi
19435
19436  # Now new_path has a complete unix path to the binary
19437  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19438    # Keep paths in /bin as-is, but remove trailing .exe if any
19439    new_path="${new_path/%.exe/}"
19440    # Do not save /bin paths to all_fixpath_prefixes!
19441  else
19442    # Not in mixed or Windows style, start by that.
19443    new_path=`cmd //c echo $new_path`
19444
19445  input_path="$new_path"
19446  # Check if we need to convert this using DOS-style short mode. If the path
19447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19448  # take no chances and rewrite it.
19449  # Note: m4 eats our [], so we need to use [ and ] instead.
19450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19451  if test "x$has_forbidden_chars" != x; then
19452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19454  fi
19455
19456    # Output is in $new_path
19457
19458  windows_path="$new_path"
19459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19460    unix_path=`$CYGPATH -u "$windows_path"`
19461    new_path="$unix_path"
19462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19464    new_path="$unix_path"
19465  fi
19466
19467    # remove trailing .exe if any
19468    new_path="${new_path/%.exe/}"
19469
19470    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19471    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19472  fi
19473
19474  else
19475    # We're on a posix platform. Hooray! :)
19476    # First separate the path from the arguments. This will split at the first
19477    # space.
19478    complete="$CC"
19479    path="${complete%% *}"
19480    tmp="$complete EOL"
19481    arguments="${tmp#* }"
19482
19483    # Cannot rely on the command "which" here since it doesn't always work.
19484    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19485    if test -z "$is_absolute_path"; then
19486      # Path to executable is not absolute. Find it.
19487      IFS_save="$IFS"
19488      IFS=:
19489      for p in $PATH; do
19490        if test -f "$p/$path" && test -x "$p/$path"; then
19491          new_path="$p/$path"
19492          break
19493        fi
19494      done
19495      IFS="$IFS_save"
19496    else
19497      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19498$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19499      new_path="$path"
19500    fi
19501
19502    if test "x$new_path" = x; then
19503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19504$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19505      has_space=`$ECHO "$complete" | $GREP " "`
19506      if test "x$has_space" != x; then
19507        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19509      fi
19510      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19511    fi
19512  fi
19513
19514  # Now join together the path and the arguments once again
19515  if test "x$arguments" != xEOL; then
19516    new_complete="$new_path ${arguments% *}"
19517  else
19518    new_complete="$new_path"
19519  fi
19520
19521  if test "x$complete" != "x$new_complete"; then
19522    CC="$new_complete"
19523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19524$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19525  fi
19526
19527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19528$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19529  TEST_COMPILER="$CC"
19530
19531  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19532    # Follow a chain of symbolic links. Use readlink
19533    # where it exists, else fall back to horribly
19534    # complicated shell code.
19535    if test "x$READLINK_TESTED" != yes; then
19536      # On MacOSX there is a readlink tool with a different
19537      # purpose than the GNU readlink tool. Check the found readlink.
19538      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19539      if test "x$ISGNU" = x; then
19540        # A readlink that we do not know how to use.
19541        # Are there other non-GNU readlinks out there?
19542        READLINK_TESTED=yes
19543        READLINK=
19544      fi
19545    fi
19546
19547    if test "x$READLINK" != x; then
19548      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19549    else
19550      # Save the current directory for restoring afterwards
19551      STARTDIR=$PWD
19552      COUNTER=0
19553      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19554      sym_link_file=`$BASENAME $TEST_COMPILER`
19555      cd $sym_link_dir
19556      # Use -P flag to resolve symlinks in directories.
19557      cd `$THEPWDCMD -P`
19558      sym_link_dir=`$THEPWDCMD -P`
19559      # Resolve file symlinks
19560      while test $COUNTER -lt 20; do
19561        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19562        if test "x$ISLINK" == x; then
19563          # This is not a symbolic link! We are done!
19564          break
19565        fi
19566        # Again resolve directory symlinks since the target of the just found
19567        # link could be in a different directory
19568        cd `$DIRNAME $ISLINK`
19569        sym_link_dir=`$THEPWDCMD -P`
19570        sym_link_file=`$BASENAME $ISLINK`
19571        let COUNTER=COUNTER+1
19572      done
19573      cd $STARTDIR
19574      TEST_COMPILER=$sym_link_dir/$sym_link_file
19575    fi
19576  fi
19577
19578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19579$as_echo "$TEST_COMPILER" >&6; }
19580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19581$as_echo_n "checking if CC is disguised ccache... " >&6; }
19582
19583  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19584  if test "x$COMPILER_BASENAME" = "xccache"; then
19585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19586$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19587    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19588    # We want to control ccache invocation ourselves, so ignore this cc and try
19589    # searching again.
19590
19591    # Remove the path to the fake ccache cc from the PATH
19592    RETRY_COMPILER_SAVED_PATH="$PATH"
19593    COMPILER_DIRNAME=`$DIRNAME $CC`
19594    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19595
19596    # Try again looking for our compiler
19597    if test -n "$ac_tool_prefix"; then
19598  for ac_prog in $COMPILER_CHECK_LIST
19599  do
19600    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19601set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19603$as_echo_n "checking for $ac_word... " >&6; }
19604if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19605  $as_echo_n "(cached) " >&6
19606else
19607  if test -n "$PROPER_COMPILER_CC"; then
19608  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19609else
19610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19611for as_dir in $PATH
19612do
19613  IFS=$as_save_IFS
19614  test -z "$as_dir" && as_dir=.
19615    for ac_exec_ext in '' $ac_executable_extensions; do
19616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19617    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19619    break 2
19620  fi
19621done
19622  done
19623IFS=$as_save_IFS
19624
19625fi
19626fi
19627PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19628if test -n "$PROPER_COMPILER_CC"; then
19629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19630$as_echo "$PROPER_COMPILER_CC" >&6; }
19631else
19632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19633$as_echo "no" >&6; }
19634fi
19635
19636
19637    test -n "$PROPER_COMPILER_CC" && break
19638  done
19639fi
19640if test -z "$PROPER_COMPILER_CC"; then
19641  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19642  for ac_prog in $COMPILER_CHECK_LIST
19643do
19644  # Extract the first word of "$ac_prog", so it can be a program name with args.
19645set dummy $ac_prog; ac_word=$2
19646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19647$as_echo_n "checking for $ac_word... " >&6; }
19648if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19649  $as_echo_n "(cached) " >&6
19650else
19651  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19652  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19653else
19654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19655for as_dir in $PATH
19656do
19657  IFS=$as_save_IFS
19658  test -z "$as_dir" && as_dir=.
19659    for ac_exec_ext in '' $ac_executable_extensions; do
19660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19661    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19663    break 2
19664  fi
19665done
19666  done
19667IFS=$as_save_IFS
19668
19669fi
19670fi
19671ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19672if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19674$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19675else
19676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19677$as_echo "no" >&6; }
19678fi
19679
19680
19681  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19682done
19683
19684  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19685    PROPER_COMPILER_CC=""
19686  else
19687    case $cross_compiling:$ac_tool_warned in
19688yes:)
19689{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19691ac_tool_warned=yes ;;
19692esac
19693    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19694  fi
19695fi
19696
19697
19698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19699
19700  # First separate the path from the arguments. This will split at the first
19701  # space.
19702  complete="$PROPER_COMPILER_CC"
19703  path="${complete%% *}"
19704  tmp="$complete EOL"
19705  arguments="${tmp#* }"
19706
19707  # Input might be given as Windows format, start by converting to
19708  # unix format.
19709  new_path=`$CYGPATH -u "$path"`
19710
19711  # Now try to locate executable using which
19712  new_path=`$WHICH "$new_path" 2> /dev/null`
19713  # bat and cmd files are not always considered executable in cygwin causing which
19714  # to not find them
19715  if test "x$new_path" = x \
19716      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19717      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19718    new_path=`$CYGPATH -u "$path"`
19719  fi
19720  if test "x$new_path" = x; then
19721    # Oops. Which didn't find the executable.
19722    # The splitting of arguments from the executable at a space might have been incorrect,
19723    # since paths with space are more likely in Windows. Give it another try with the whole
19724    # argument.
19725    path="$complete"
19726    arguments="EOL"
19727    new_path=`$CYGPATH -u "$path"`
19728    new_path=`$WHICH "$new_path" 2> /dev/null`
19729    # bat and cmd files are not always considered executable in cygwin causing which
19730    # to not find them
19731    if test "x$new_path" = x \
19732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19734      new_path=`$CYGPATH -u "$path"`
19735    fi
19736    if test "x$new_path" = x; then
19737      # It's still not found. Now this is an unrecoverable error.
19738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19739$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19740      has_space=`$ECHO "$complete" | $GREP " "`
19741      if test "x$has_space" != x; then
19742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19744      fi
19745      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19746    fi
19747  fi
19748
19749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19752  # "foo.exe" is OK but "foo" is an error.
19753  #
19754  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19755  # It is also a way to make sure we got the proper file name for the real test later on.
19756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19757  if test "x$test_shortpath" = x; then
19758    # Short path failed, file does not exist as specified.
19759    # Try adding .exe or .cmd
19760    if test -f "${new_path}.exe"; then
19761      input_to_shortpath="${new_path}.exe"
19762    elif test -f "${new_path}.cmd"; then
19763      input_to_shortpath="${new_path}.cmd"
19764    else
19765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19766$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19769      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19770    fi
19771  else
19772    input_to_shortpath="$new_path"
19773  fi
19774
19775  # Call helper function which possibly converts this using DOS-style short mode.
19776  # If so, the updated path is stored in $new_path.
19777  new_path="$input_to_shortpath"
19778
19779  input_path="$input_to_shortpath"
19780  # Check if we need to convert this using DOS-style short mode. If the path
19781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19782  # take no chances and rewrite it.
19783  # Note: m4 eats our [], so we need to use [ and ] instead.
19784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19785  if test "x$has_forbidden_chars" != x; then
19786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19790      # Going to short mode and back again did indeed matter. Since short mode is
19791      # case insensitive, let's make it lowercase to improve readability.
19792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19793      # Now convert it back to Unix-stile (cygpath)
19794      input_path=`$CYGPATH -u "$shortmode_path"`
19795      new_path="$input_path"
19796    fi
19797  fi
19798
19799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19800  if test "x$test_cygdrive_prefix" = x; then
19801    # As a simple fix, exclude /usr/bin since it's not a real path.
19802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19804      # a path prefixed by /cygdrive for fixpath to work.
19805      new_path="$CYGWIN_ROOT_PATH$input_path"
19806    fi
19807  fi
19808
19809  # remove trailing .exe if any
19810  new_path="${new_path/%.exe/}"
19811
19812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19813
19814  # First separate the path from the arguments. This will split at the first
19815  # space.
19816  complete="$PROPER_COMPILER_CC"
19817  path="${complete%% *}"
19818  tmp="$complete EOL"
19819  arguments="${tmp#* }"
19820
19821  # Input might be given as Windows format, start by converting to
19822  # unix format.
19823  new_path="$path"
19824
19825  windows_path="$new_path"
19826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19827    unix_path=`$CYGPATH -u "$windows_path"`
19828    new_path="$unix_path"
19829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19831    new_path="$unix_path"
19832  fi
19833
19834
19835  # Now try to locate executable using which
19836  new_path=`$WHICH "$new_path" 2> /dev/null`
19837
19838  if test "x$new_path" = x; then
19839    # Oops. Which didn't find the executable.
19840    # The splitting of arguments from the executable at a space might have been incorrect,
19841    # since paths with space are more likely in Windows. Give it another try with the whole
19842    # argument.
19843    path="$complete"
19844    arguments="EOL"
19845    new_path="$path"
19846
19847  windows_path="$new_path"
19848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19849    unix_path=`$CYGPATH -u "$windows_path"`
19850    new_path="$unix_path"
19851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19853    new_path="$unix_path"
19854  fi
19855
19856
19857    new_path=`$WHICH "$new_path" 2> /dev/null`
19858
19859    if test "x$new_path" = x; then
19860      # It's still not found. Now this is an unrecoverable error.
19861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19862$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19863      has_space=`$ECHO "$complete" | $GREP " "`
19864      if test "x$has_space" != x; then
19865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19867      fi
19868      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19869    fi
19870  fi
19871
19872  # Now new_path has a complete unix path to the binary
19873  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19874    # Keep paths in /bin as-is, but remove trailing .exe if any
19875    new_path="${new_path/%.exe/}"
19876    # Do not save /bin paths to all_fixpath_prefixes!
19877  else
19878    # Not in mixed or Windows style, start by that.
19879    new_path=`cmd //c echo $new_path`
19880
19881  input_path="$new_path"
19882  # Check if we need to convert this using DOS-style short mode. If the path
19883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19884  # take no chances and rewrite it.
19885  # Note: m4 eats our [], so we need to use [ and ] instead.
19886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19887  if test "x$has_forbidden_chars" != x; then
19888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19890  fi
19891
19892    # Output is in $new_path
19893
19894  windows_path="$new_path"
19895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19896    unix_path=`$CYGPATH -u "$windows_path"`
19897    new_path="$unix_path"
19898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19900    new_path="$unix_path"
19901  fi
19902
19903    # remove trailing .exe if any
19904    new_path="${new_path/%.exe/}"
19905
19906    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19907    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19908  fi
19909
19910  else
19911    # We're on a posix platform. Hooray! :)
19912    # First separate the path from the arguments. This will split at the first
19913    # space.
19914    complete="$PROPER_COMPILER_CC"
19915    path="${complete%% *}"
19916    tmp="$complete EOL"
19917    arguments="${tmp#* }"
19918
19919    # Cannot rely on the command "which" here since it doesn't always work.
19920    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19921    if test -z "$is_absolute_path"; then
19922      # Path to executable is not absolute. Find it.
19923      IFS_save="$IFS"
19924      IFS=:
19925      for p in $PATH; do
19926        if test -f "$p/$path" && test -x "$p/$path"; then
19927          new_path="$p/$path"
19928          break
19929        fi
19930      done
19931      IFS="$IFS_save"
19932    else
19933      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19934$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19935      new_path="$path"
19936    fi
19937
19938    if test "x$new_path" = x; then
19939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19940$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19941      has_space=`$ECHO "$complete" | $GREP " "`
19942      if test "x$has_space" != x; then
19943        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19944$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19945      fi
19946      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19947    fi
19948  fi
19949
19950  # Now join together the path and the arguments once again
19951  if test "x$arguments" != xEOL; then
19952    new_complete="$new_path ${arguments% *}"
19953  else
19954    new_complete="$new_path"
19955  fi
19956
19957  if test "x$complete" != "x$new_complete"; then
19958    PROPER_COMPILER_CC="$new_complete"
19959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19960$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19961  fi
19962
19963    PATH="$RETRY_COMPILER_SAVED_PATH"
19964
19965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19966$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19967
19968  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19969    # Follow a chain of symbolic links. Use readlink
19970    # where it exists, else fall back to horribly
19971    # complicated shell code.
19972    if test "x$READLINK_TESTED" != yes; then
19973      # On MacOSX there is a readlink tool with a different
19974      # purpose than the GNU readlink tool. Check the found readlink.
19975      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19976      if test "x$ISGNU" = x; then
19977        # A readlink that we do not know how to use.
19978        # Are there other non-GNU readlinks out there?
19979        READLINK_TESTED=yes
19980        READLINK=
19981      fi
19982    fi
19983
19984    if test "x$READLINK" != x; then
19985      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19986    else
19987      # Save the current directory for restoring afterwards
19988      STARTDIR=$PWD
19989      COUNTER=0
19990      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19991      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19992      cd $sym_link_dir
19993      # Use -P flag to resolve symlinks in directories.
19994      cd `$THEPWDCMD -P`
19995      sym_link_dir=`$THEPWDCMD -P`
19996      # Resolve file symlinks
19997      while test $COUNTER -lt 20; do
19998        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19999        if test "x$ISLINK" == x; then
20000          # This is not a symbolic link! We are done!
20001          break
20002        fi
20003        # Again resolve directory symlinks since the target of the just found
20004        # link could be in a different directory
20005        cd `$DIRNAME $ISLINK`
20006        sym_link_dir=`$THEPWDCMD -P`
20007        sym_link_file=`$BASENAME $ISLINK`
20008        let COUNTER=COUNTER+1
20009      done
20010      cd $STARTDIR
20011      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20012    fi
20013  fi
20014
20015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20016$as_echo "$PROPER_COMPILER_CC" >&6; }
20017    CC="$PROPER_COMPILER_CC"
20018  else
20019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20020$as_echo "no, keeping CC" >&6; }
20021    CC="$TEST_COMPILER"
20022  fi
20023
20024  COMPILER=$CC
20025  COMPILER_NAME=$COMPILER_NAME
20026
20027  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20028    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20029    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20030    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20031    if test $? -ne 0; then
20032      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20033
20034      { $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
20035$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20036      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20037$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20038      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20039    else
20040      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20041      COMPILER_VENDOR="Sun Studio"
20042    fi
20043  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20044    # First line typically looks something like:
20045    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20046    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20047    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20048    COMPILER_VENDOR="Microsoft CL.EXE"
20049    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20050    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20051      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20052        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20053      fi
20054    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20055      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20056        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20057      fi
20058    fi
20059  else
20060    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20061    # Check that this is likely to be GCC.
20062    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20063    if test $? -ne 0; then
20064      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20065$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20066      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20067$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20068      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20069    fi
20070
20071    # First line typically looks something like:
20072    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20073    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20074    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20075  fi
20076  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20077  CC_VERSION="$COMPILER_VERSION"
20078  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20079  CC_VENDOR="$COMPILER_VENDOR"
20080
20081  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20082$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20083
20084
20085  # Now that we have resolved CC ourself, let autoconf have its go at it
20086  ac_ext=c
20087ac_cpp='$CPP $CPPFLAGS'
20088ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20089ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20090ac_compiler_gnu=$ac_cv_c_compiler_gnu
20091if test -n "$ac_tool_prefix"; then
20092  for ac_prog in $CC
20093  do
20094    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20095set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20097$as_echo_n "checking for $ac_word... " >&6; }
20098if ${ac_cv_prog_CC+:} false; then :
20099  $as_echo_n "(cached) " >&6
20100else
20101  if test -n "$CC"; then
20102  ac_cv_prog_CC="$CC" # Let the user override the test.
20103else
20104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20105for as_dir in $PATH
20106do
20107  IFS=$as_save_IFS
20108  test -z "$as_dir" && as_dir=.
20109    for ac_exec_ext in '' $ac_executable_extensions; do
20110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20111    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20113    break 2
20114  fi
20115done
20116  done
20117IFS=$as_save_IFS
20118
20119fi
20120fi
20121CC=$ac_cv_prog_CC
20122if test -n "$CC"; then
20123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20124$as_echo "$CC" >&6; }
20125else
20126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20127$as_echo "no" >&6; }
20128fi
20129
20130
20131    test -n "$CC" && break
20132  done
20133fi
20134if test -z "$CC"; then
20135  ac_ct_CC=$CC
20136  for ac_prog in $CC
20137do
20138  # Extract the first word of "$ac_prog", so it can be a program name with args.
20139set dummy $ac_prog; ac_word=$2
20140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20141$as_echo_n "checking for $ac_word... " >&6; }
20142if ${ac_cv_prog_ac_ct_CC+:} false; then :
20143  $as_echo_n "(cached) " >&6
20144else
20145  if test -n "$ac_ct_CC"; then
20146  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20147else
20148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20149for as_dir in $PATH
20150do
20151  IFS=$as_save_IFS
20152  test -z "$as_dir" && as_dir=.
20153    for ac_exec_ext in '' $ac_executable_extensions; do
20154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20155    ac_cv_prog_ac_ct_CC="$ac_prog"
20156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20157    break 2
20158  fi
20159done
20160  done
20161IFS=$as_save_IFS
20162
20163fi
20164fi
20165ac_ct_CC=$ac_cv_prog_ac_ct_CC
20166if test -n "$ac_ct_CC"; then
20167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20168$as_echo "$ac_ct_CC" >&6; }
20169else
20170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20171$as_echo "no" >&6; }
20172fi
20173
20174
20175  test -n "$ac_ct_CC" && break
20176done
20177
20178  if test "x$ac_ct_CC" = x; then
20179    CC=""
20180  else
20181    case $cross_compiling:$ac_tool_warned in
20182yes:)
20183{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20184$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20185ac_tool_warned=yes ;;
20186esac
20187    CC=$ac_ct_CC
20188  fi
20189fi
20190
20191
20192test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20194as_fn_error $? "no acceptable C compiler found in \$PATH
20195See \`config.log' for more details" "$LINENO" 5; }
20196
20197# Provide some information about the compiler.
20198$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20199set X $ac_compile
20200ac_compiler=$2
20201for ac_option in --version -v -V -qversion; do
20202  { { ac_try="$ac_compiler $ac_option >&5"
20203case "(($ac_try" in
20204  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20205  *) ac_try_echo=$ac_try;;
20206esac
20207eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20208$as_echo "$ac_try_echo"; } >&5
20209  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20210  ac_status=$?
20211  if test -s conftest.err; then
20212    sed '10a\
20213... rest of stderr output deleted ...
20214         10q' conftest.err >conftest.er1
20215    cat conftest.er1 >&5
20216  fi
20217  rm -f conftest.er1 conftest.err
20218  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20219  test $ac_status = 0; }
20220done
20221
20222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20223/* end confdefs.h.  */
20224
20225int
20226main ()
20227{
20228
20229  ;
20230  return 0;
20231}
20232_ACEOF
20233ac_clean_files_save=$ac_clean_files
20234ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20235# Try to create an executable without -o first, disregard a.out.
20236# It will help us diagnose broken compilers, and finding out an intuition
20237# of exeext.
20238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20239$as_echo_n "checking whether the C compiler works... " >&6; }
20240ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20241
20242# The possible output files:
20243ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20244
20245ac_rmfiles=
20246for ac_file in $ac_files
20247do
20248  case $ac_file in
20249    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20250    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20251  esac
20252done
20253rm -f $ac_rmfiles
20254
20255if { { ac_try="$ac_link_default"
20256case "(($ac_try" in
20257  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20258  *) ac_try_echo=$ac_try;;
20259esac
20260eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20261$as_echo "$ac_try_echo"; } >&5
20262  (eval "$ac_link_default") 2>&5
20263  ac_status=$?
20264  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20265  test $ac_status = 0; }; then :
20266  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20267# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20268# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20269# so that the user can short-circuit this test for compilers unknown to
20270# Autoconf.
20271for ac_file in $ac_files ''
20272do
20273  test -f "$ac_file" || continue
20274  case $ac_file in
20275    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20276	;;
20277    [ab].out )
20278	# We found the default executable, but exeext='' is most
20279	# certainly right.
20280	break;;
20281    *.* )
20282	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20283	then :; else
20284	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20285	fi
20286	# We set ac_cv_exeext here because the later test for it is not
20287	# safe: cross compilers may not add the suffix if given an `-o'
20288	# argument, so we may need to know it at that point already.
20289	# Even if this section looks crufty: it has the advantage of
20290	# actually working.
20291	break;;
20292    * )
20293	break;;
20294  esac
20295done
20296test "$ac_cv_exeext" = no && ac_cv_exeext=
20297
20298else
20299  ac_file=''
20300fi
20301if test -z "$ac_file"; then :
20302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20303$as_echo "no" >&6; }
20304$as_echo "$as_me: failed program was:" >&5
20305sed 's/^/| /' conftest.$ac_ext >&5
20306
20307{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20308$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20309as_fn_error 77 "C compiler cannot create executables
20310See \`config.log' for more details" "$LINENO" 5; }
20311else
20312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20313$as_echo "yes" >&6; }
20314fi
20315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20316$as_echo_n "checking for C compiler default output file name... " >&6; }
20317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20318$as_echo "$ac_file" >&6; }
20319ac_exeext=$ac_cv_exeext
20320
20321rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20322ac_clean_files=$ac_clean_files_save
20323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20324$as_echo_n "checking for suffix of executables... " >&6; }
20325if { { ac_try="$ac_link"
20326case "(($ac_try" in
20327  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20328  *) ac_try_echo=$ac_try;;
20329esac
20330eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20331$as_echo "$ac_try_echo"; } >&5
20332  (eval "$ac_link") 2>&5
20333  ac_status=$?
20334  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20335  test $ac_status = 0; }; then :
20336  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20337# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20338# work properly (i.e., refer to `conftest.exe'), while it won't with
20339# `rm'.
20340for ac_file in conftest.exe conftest conftest.*; do
20341  test -f "$ac_file" || continue
20342  case $ac_file in
20343    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20344    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20345	  break;;
20346    * ) break;;
20347  esac
20348done
20349else
20350  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20351$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20352as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20353See \`config.log' for more details" "$LINENO" 5; }
20354fi
20355rm -f conftest conftest$ac_cv_exeext
20356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20357$as_echo "$ac_cv_exeext" >&6; }
20358
20359rm -f conftest.$ac_ext
20360EXEEXT=$ac_cv_exeext
20361ac_exeext=$EXEEXT
20362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20363/* end confdefs.h.  */
20364#include <stdio.h>
20365int
20366main ()
20367{
20368FILE *f = fopen ("conftest.out", "w");
20369 return ferror (f) || fclose (f) != 0;
20370
20371  ;
20372  return 0;
20373}
20374_ACEOF
20375ac_clean_files="$ac_clean_files conftest.out"
20376# Check that the compiler produces executables we can run.  If not, either
20377# the compiler is broken, or we cross compile.
20378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20379$as_echo_n "checking whether we are cross compiling... " >&6; }
20380if test "$cross_compiling" != yes; then
20381  { { ac_try="$ac_link"
20382case "(($ac_try" in
20383  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20384  *) ac_try_echo=$ac_try;;
20385esac
20386eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20387$as_echo "$ac_try_echo"; } >&5
20388  (eval "$ac_link") 2>&5
20389  ac_status=$?
20390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20391  test $ac_status = 0; }
20392  if { ac_try='./conftest$ac_cv_exeext'
20393  { { case "(($ac_try" in
20394  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20395  *) ac_try_echo=$ac_try;;
20396esac
20397eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20398$as_echo "$ac_try_echo"; } >&5
20399  (eval "$ac_try") 2>&5
20400  ac_status=$?
20401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20402  test $ac_status = 0; }; }; then
20403    cross_compiling=no
20404  else
20405    if test "$cross_compiling" = maybe; then
20406	cross_compiling=yes
20407    else
20408	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20410as_fn_error $? "cannot run C compiled programs.
20411If you meant to cross compile, use \`--host'.
20412See \`config.log' for more details" "$LINENO" 5; }
20413    fi
20414  fi
20415fi
20416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20417$as_echo "$cross_compiling" >&6; }
20418
20419rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20420ac_clean_files=$ac_clean_files_save
20421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20422$as_echo_n "checking for suffix of object files... " >&6; }
20423if ${ac_cv_objext+:} false; then :
20424  $as_echo_n "(cached) " >&6
20425else
20426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20427/* end confdefs.h.  */
20428
20429int
20430main ()
20431{
20432
20433  ;
20434  return 0;
20435}
20436_ACEOF
20437rm -f conftest.o conftest.obj
20438if { { ac_try="$ac_compile"
20439case "(($ac_try" in
20440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20441  *) ac_try_echo=$ac_try;;
20442esac
20443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20444$as_echo "$ac_try_echo"; } >&5
20445  (eval "$ac_compile") 2>&5
20446  ac_status=$?
20447  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20448  test $ac_status = 0; }; then :
20449  for ac_file in conftest.o conftest.obj conftest.*; do
20450  test -f "$ac_file" || continue;
20451  case $ac_file in
20452    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20453    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20454       break;;
20455  esac
20456done
20457else
20458  $as_echo "$as_me: failed program was:" >&5
20459sed 's/^/| /' conftest.$ac_ext >&5
20460
20461{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20463as_fn_error $? "cannot compute suffix of object files: cannot compile
20464See \`config.log' for more details" "$LINENO" 5; }
20465fi
20466rm -f conftest.$ac_cv_objext conftest.$ac_ext
20467fi
20468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20469$as_echo "$ac_cv_objext" >&6; }
20470OBJEXT=$ac_cv_objext
20471ac_objext=$OBJEXT
20472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20473$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20474if ${ac_cv_c_compiler_gnu+:} false; then :
20475  $as_echo_n "(cached) " >&6
20476else
20477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20478/* end confdefs.h.  */
20479
20480int
20481main ()
20482{
20483#ifndef __GNUC__
20484       choke me
20485#endif
20486
20487  ;
20488  return 0;
20489}
20490_ACEOF
20491if ac_fn_c_try_compile "$LINENO"; then :
20492  ac_compiler_gnu=yes
20493else
20494  ac_compiler_gnu=no
20495fi
20496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20497ac_cv_c_compiler_gnu=$ac_compiler_gnu
20498
20499fi
20500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20501$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20502if test $ac_compiler_gnu = yes; then
20503  GCC=yes
20504else
20505  GCC=
20506fi
20507ac_test_CFLAGS=${CFLAGS+set}
20508ac_save_CFLAGS=$CFLAGS
20509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20510$as_echo_n "checking whether $CC accepts -g... " >&6; }
20511if ${ac_cv_prog_cc_g+:} false; then :
20512  $as_echo_n "(cached) " >&6
20513else
20514  ac_save_c_werror_flag=$ac_c_werror_flag
20515   ac_c_werror_flag=yes
20516   ac_cv_prog_cc_g=no
20517   CFLAGS="-g"
20518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20519/* end confdefs.h.  */
20520
20521int
20522main ()
20523{
20524
20525  ;
20526  return 0;
20527}
20528_ACEOF
20529if ac_fn_c_try_compile "$LINENO"; then :
20530  ac_cv_prog_cc_g=yes
20531else
20532  CFLAGS=""
20533      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20534/* end confdefs.h.  */
20535
20536int
20537main ()
20538{
20539
20540  ;
20541  return 0;
20542}
20543_ACEOF
20544if ac_fn_c_try_compile "$LINENO"; then :
20545
20546else
20547  ac_c_werror_flag=$ac_save_c_werror_flag
20548	 CFLAGS="-g"
20549	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20550/* end confdefs.h.  */
20551
20552int
20553main ()
20554{
20555
20556  ;
20557  return 0;
20558}
20559_ACEOF
20560if ac_fn_c_try_compile "$LINENO"; then :
20561  ac_cv_prog_cc_g=yes
20562fi
20563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20564fi
20565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20566fi
20567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20568   ac_c_werror_flag=$ac_save_c_werror_flag
20569fi
20570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20571$as_echo "$ac_cv_prog_cc_g" >&6; }
20572if test "$ac_test_CFLAGS" = set; then
20573  CFLAGS=$ac_save_CFLAGS
20574elif test $ac_cv_prog_cc_g = yes; then
20575  if test "$GCC" = yes; then
20576    CFLAGS="-g -O2"
20577  else
20578    CFLAGS="-g"
20579  fi
20580else
20581  if test "$GCC" = yes; then
20582    CFLAGS="-O2"
20583  else
20584    CFLAGS=
20585  fi
20586fi
20587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20588$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20589if ${ac_cv_prog_cc_c89+:} false; then :
20590  $as_echo_n "(cached) " >&6
20591else
20592  ac_cv_prog_cc_c89=no
20593ac_save_CC=$CC
20594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20595/* end confdefs.h.  */
20596#include <stdarg.h>
20597#include <stdio.h>
20598struct stat;
20599/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20600struct buf { int x; };
20601FILE * (*rcsopen) (struct buf *, struct stat *, int);
20602static char *e (p, i)
20603     char **p;
20604     int i;
20605{
20606  return p[i];
20607}
20608static char *f (char * (*g) (char **, int), char **p, ...)
20609{
20610  char *s;
20611  va_list v;
20612  va_start (v,p);
20613  s = g (p, va_arg (v,int));
20614  va_end (v);
20615  return s;
20616}
20617
20618/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20619   function prototypes and stuff, but not '\xHH' hex character constants.
20620   These don't provoke an error unfortunately, instead are silently treated
20621   as 'x'.  The following induces an error, until -std is added to get
20622   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20623   array size at least.  It's necessary to write '\x00'==0 to get something
20624   that's true only with -std.  */
20625int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20626
20627/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20628   inside strings and character constants.  */
20629#define FOO(x) 'x'
20630int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20631
20632int test (int i, double x);
20633struct s1 {int (*f) (int a);};
20634struct s2 {int (*f) (double a);};
20635int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20636int argc;
20637char **argv;
20638int
20639main ()
20640{
20641return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20642  ;
20643  return 0;
20644}
20645_ACEOF
20646for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20647	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20648do
20649  CC="$ac_save_CC $ac_arg"
20650  if ac_fn_c_try_compile "$LINENO"; then :
20651  ac_cv_prog_cc_c89=$ac_arg
20652fi
20653rm -f core conftest.err conftest.$ac_objext
20654  test "x$ac_cv_prog_cc_c89" != "xno" && break
20655done
20656rm -f conftest.$ac_ext
20657CC=$ac_save_CC
20658
20659fi
20660# AC_CACHE_VAL
20661case "x$ac_cv_prog_cc_c89" in
20662  x)
20663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20664$as_echo "none needed" >&6; } ;;
20665  xno)
20666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20667$as_echo "unsupported" >&6; } ;;
20668  *)
20669    CC="$CC $ac_cv_prog_cc_c89"
20670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20671$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20672esac
20673if test "x$ac_cv_prog_cc_c89" != xno; then :
20674
20675fi
20676
20677ac_ext=cpp
20678ac_cpp='$CXXCPP $CPPFLAGS'
20679ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20680ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20681ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20682
20683
20684  ### Locate C++ compiler (CXX)
20685
20686  if test "x$CXX" != x; then
20687    COMPILER_CHECK_LIST="$CXX"
20688  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20689    COMPILER_CHECK_LIST="cl"
20690  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20691    COMPILER_CHECK_LIST="CC g++"
20692  else
20693    COMPILER_CHECK_LIST="g++ CC"
20694  fi
20695
20696
20697  COMPILER_NAME=C++
20698
20699  CXX=
20700  # If TOOLS_DIR is set, check for all compiler names in there first
20701  # before checking the rest of the PATH.
20702  if test -n "$TOOLS_DIR"; then
20703    PATH_save="$PATH"
20704    PATH="$TOOLS_DIR"
20705    for ac_prog in $COMPILER_CHECK_LIST
20706do
20707  # Extract the first word of "$ac_prog", so it can be a program name with args.
20708set dummy $ac_prog; ac_word=$2
20709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20710$as_echo_n "checking for $ac_word... " >&6; }
20711if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20712  $as_echo_n "(cached) " >&6
20713else
20714  case $TOOLS_DIR_CXX in
20715  [\\/]* | ?:[\\/]*)
20716  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20717  ;;
20718  *)
20719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20720for as_dir in $PATH
20721do
20722  IFS=$as_save_IFS
20723  test -z "$as_dir" && as_dir=.
20724    for ac_exec_ext in '' $ac_executable_extensions; do
20725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20726    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20728    break 2
20729  fi
20730done
20731  done
20732IFS=$as_save_IFS
20733
20734  ;;
20735esac
20736fi
20737TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20738if test -n "$TOOLS_DIR_CXX"; then
20739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20740$as_echo "$TOOLS_DIR_CXX" >&6; }
20741else
20742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20743$as_echo "no" >&6; }
20744fi
20745
20746
20747  test -n "$TOOLS_DIR_CXX" && break
20748done
20749
20750    CXX=$TOOLS_DIR_CXX
20751    PATH="$PATH_save"
20752  fi
20753
20754  # AC_PATH_PROGS can't be run multiple times with the same variable,
20755  # so create a new name for this run.
20756  if test "x$CXX" = x; then
20757    for ac_prog in $COMPILER_CHECK_LIST
20758do
20759  # Extract the first word of "$ac_prog", so it can be a program name with args.
20760set dummy $ac_prog; ac_word=$2
20761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20762$as_echo_n "checking for $ac_word... " >&6; }
20763if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20764  $as_echo_n "(cached) " >&6
20765else
20766  case $POTENTIAL_CXX in
20767  [\\/]* | ?:[\\/]*)
20768  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20769  ;;
20770  *)
20771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20772for as_dir in $PATH
20773do
20774  IFS=$as_save_IFS
20775  test -z "$as_dir" && as_dir=.
20776    for ac_exec_ext in '' $ac_executable_extensions; do
20777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20778    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20780    break 2
20781  fi
20782done
20783  done
20784IFS=$as_save_IFS
20785
20786  ;;
20787esac
20788fi
20789POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20790if test -n "$POTENTIAL_CXX"; then
20791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20792$as_echo "$POTENTIAL_CXX" >&6; }
20793else
20794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20795$as_echo "no" >&6; }
20796fi
20797
20798
20799  test -n "$POTENTIAL_CXX" && break
20800done
20801
20802    CXX=$POTENTIAL_CXX
20803  fi
20804
20805  if test "x$CXX" = x; then
20806
20807  # Print a helpful message on how to acquire the necessary build dependency.
20808  # devkit is the help tag: freetype, cups, pulse, alsa etc
20809  MISSING_DEPENDENCY=devkit
20810
20811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20812    cygwin_help $MISSING_DEPENDENCY
20813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20814    msys_help $MISSING_DEPENDENCY
20815  else
20816    PKGHANDLER_COMMAND=
20817
20818    case $PKGHANDLER in
20819      apt-get)
20820        apt_help     $MISSING_DEPENDENCY ;;
20821      yum)
20822        yum_help     $MISSING_DEPENDENCY ;;
20823      port)
20824        port_help    $MISSING_DEPENDENCY ;;
20825      pkgutil)
20826        pkgutil_help $MISSING_DEPENDENCY ;;
20827      pkgadd)
20828        pkgadd_help  $MISSING_DEPENDENCY ;;
20829      * )
20830        break ;;
20831    esac
20832
20833    if test "x$PKGHANDLER_COMMAND" != x; then
20834      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20835    fi
20836  fi
20837
20838    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20839  fi
20840
20841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20842
20843  # First separate the path from the arguments. This will split at the first
20844  # space.
20845  complete="$CXX"
20846  path="${complete%% *}"
20847  tmp="$complete EOL"
20848  arguments="${tmp#* }"
20849
20850  # Input might be given as Windows format, start by converting to
20851  # unix format.
20852  new_path=`$CYGPATH -u "$path"`
20853
20854  # Now try to locate executable using which
20855  new_path=`$WHICH "$new_path" 2> /dev/null`
20856  # bat and cmd files are not always considered executable in cygwin causing which
20857  # to not find them
20858  if test "x$new_path" = x \
20859      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20860      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20861    new_path=`$CYGPATH -u "$path"`
20862  fi
20863  if test "x$new_path" = x; then
20864    # Oops. Which didn't find the executable.
20865    # The splitting of arguments from the executable at a space might have been incorrect,
20866    # since paths with space are more likely in Windows. Give it another try with the whole
20867    # argument.
20868    path="$complete"
20869    arguments="EOL"
20870    new_path=`$CYGPATH -u "$path"`
20871    new_path=`$WHICH "$new_path" 2> /dev/null`
20872    # bat and cmd files are not always considered executable in cygwin causing which
20873    # to not find them
20874    if test "x$new_path" = x \
20875        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20876        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20877      new_path=`$CYGPATH -u "$path"`
20878    fi
20879    if test "x$new_path" = x; then
20880      # It's still not found. Now this is an unrecoverable error.
20881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20882$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20883      has_space=`$ECHO "$complete" | $GREP " "`
20884      if test "x$has_space" != x; then
20885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20887      fi
20888      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20889    fi
20890  fi
20891
20892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20895  # "foo.exe" is OK but "foo" is an error.
20896  #
20897  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20898  # It is also a way to make sure we got the proper file name for the real test later on.
20899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20900  if test "x$test_shortpath" = x; then
20901    # Short path failed, file does not exist as specified.
20902    # Try adding .exe or .cmd
20903    if test -f "${new_path}.exe"; then
20904      input_to_shortpath="${new_path}.exe"
20905    elif test -f "${new_path}.cmd"; then
20906      input_to_shortpath="${new_path}.cmd"
20907    else
20908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20909$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20910      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20911$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20912      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20913    fi
20914  else
20915    input_to_shortpath="$new_path"
20916  fi
20917
20918  # Call helper function which possibly converts this using DOS-style short mode.
20919  # If so, the updated path is stored in $new_path.
20920  new_path="$input_to_shortpath"
20921
20922  input_path="$input_to_shortpath"
20923  # Check if we need to convert this using DOS-style short mode. If the path
20924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20925  # take no chances and rewrite it.
20926  # Note: m4 eats our [], so we need to use [ and ] instead.
20927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20928  if test "x$has_forbidden_chars" != x; then
20929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20933      # Going to short mode and back again did indeed matter. Since short mode is
20934      # case insensitive, let's make it lowercase to improve readability.
20935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20936      # Now convert it back to Unix-stile (cygpath)
20937      input_path=`$CYGPATH -u "$shortmode_path"`
20938      new_path="$input_path"
20939    fi
20940  fi
20941
20942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20943  if test "x$test_cygdrive_prefix" = x; then
20944    # As a simple fix, exclude /usr/bin since it's not a real path.
20945    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20947      # a path prefixed by /cygdrive for fixpath to work.
20948      new_path="$CYGWIN_ROOT_PATH$input_path"
20949    fi
20950  fi
20951
20952  # remove trailing .exe if any
20953  new_path="${new_path/%.exe/}"
20954
20955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20956
20957  # First separate the path from the arguments. This will split at the first
20958  # space.
20959  complete="$CXX"
20960  path="${complete%% *}"
20961  tmp="$complete EOL"
20962  arguments="${tmp#* }"
20963
20964  # Input might be given as Windows format, start by converting to
20965  # unix format.
20966  new_path="$path"
20967
20968  windows_path="$new_path"
20969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20970    unix_path=`$CYGPATH -u "$windows_path"`
20971    new_path="$unix_path"
20972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20974    new_path="$unix_path"
20975  fi
20976
20977
20978  # Now try to locate executable using which
20979  new_path=`$WHICH "$new_path" 2> /dev/null`
20980
20981  if test "x$new_path" = x; then
20982    # Oops. Which didn't find the executable.
20983    # The splitting of arguments from the executable at a space might have been incorrect,
20984    # since paths with space are more likely in Windows. Give it another try with the whole
20985    # argument.
20986    path="$complete"
20987    arguments="EOL"
20988    new_path="$path"
20989
20990  windows_path="$new_path"
20991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20992    unix_path=`$CYGPATH -u "$windows_path"`
20993    new_path="$unix_path"
20994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20996    new_path="$unix_path"
20997  fi
20998
20999
21000    new_path=`$WHICH "$new_path" 2> /dev/null`
21001
21002    if test "x$new_path" = x; then
21003      # It's still not found. Now this is an unrecoverable error.
21004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21005$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21006      has_space=`$ECHO "$complete" | $GREP " "`
21007      if test "x$has_space" != x; then
21008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21010      fi
21011      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21012    fi
21013  fi
21014
21015  # Now new_path has a complete unix path to the binary
21016  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21017    # Keep paths in /bin as-is, but remove trailing .exe if any
21018    new_path="${new_path/%.exe/}"
21019    # Do not save /bin paths to all_fixpath_prefixes!
21020  else
21021    # Not in mixed or Windows style, start by that.
21022    new_path=`cmd //c echo $new_path`
21023
21024  input_path="$new_path"
21025  # Check if we need to convert this using DOS-style short mode. If the path
21026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21027  # take no chances and rewrite it.
21028  # Note: m4 eats our [], so we need to use [ and ] instead.
21029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21030  if test "x$has_forbidden_chars" != x; then
21031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21033  fi
21034
21035    # Output is in $new_path
21036
21037  windows_path="$new_path"
21038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21039    unix_path=`$CYGPATH -u "$windows_path"`
21040    new_path="$unix_path"
21041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21043    new_path="$unix_path"
21044  fi
21045
21046    # remove trailing .exe if any
21047    new_path="${new_path/%.exe/}"
21048
21049    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21050    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21051  fi
21052
21053  else
21054    # We're on a posix platform. Hooray! :)
21055    # First separate the path from the arguments. This will split at the first
21056    # space.
21057    complete="$CXX"
21058    path="${complete%% *}"
21059    tmp="$complete EOL"
21060    arguments="${tmp#* }"
21061
21062    # Cannot rely on the command "which" here since it doesn't always work.
21063    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21064    if test -z "$is_absolute_path"; then
21065      # Path to executable is not absolute. Find it.
21066      IFS_save="$IFS"
21067      IFS=:
21068      for p in $PATH; do
21069        if test -f "$p/$path" && test -x "$p/$path"; then
21070          new_path="$p/$path"
21071          break
21072        fi
21073      done
21074      IFS="$IFS_save"
21075    else
21076      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21077$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21078      new_path="$path"
21079    fi
21080
21081    if test "x$new_path" = x; then
21082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21083$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21084      has_space=`$ECHO "$complete" | $GREP " "`
21085      if test "x$has_space" != x; then
21086        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21088      fi
21089      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21090    fi
21091  fi
21092
21093  # Now join together the path and the arguments once again
21094  if test "x$arguments" != xEOL; then
21095    new_complete="$new_path ${arguments% *}"
21096  else
21097    new_complete="$new_path"
21098  fi
21099
21100  if test "x$complete" != "x$new_complete"; then
21101    CXX="$new_complete"
21102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21103$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21104  fi
21105
21106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21107$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21108  TEST_COMPILER="$CXX"
21109
21110  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21111    # Follow a chain of symbolic links. Use readlink
21112    # where it exists, else fall back to horribly
21113    # complicated shell code.
21114    if test "x$READLINK_TESTED" != yes; then
21115      # On MacOSX there is a readlink tool with a different
21116      # purpose than the GNU readlink tool. Check the found readlink.
21117      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21118      if test "x$ISGNU" = x; then
21119        # A readlink that we do not know how to use.
21120        # Are there other non-GNU readlinks out there?
21121        READLINK_TESTED=yes
21122        READLINK=
21123      fi
21124    fi
21125
21126    if test "x$READLINK" != x; then
21127      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21128    else
21129      # Save the current directory for restoring afterwards
21130      STARTDIR=$PWD
21131      COUNTER=0
21132      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21133      sym_link_file=`$BASENAME $TEST_COMPILER`
21134      cd $sym_link_dir
21135      # Use -P flag to resolve symlinks in directories.
21136      cd `$THEPWDCMD -P`
21137      sym_link_dir=`$THEPWDCMD -P`
21138      # Resolve file symlinks
21139      while test $COUNTER -lt 20; do
21140        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21141        if test "x$ISLINK" == x; then
21142          # This is not a symbolic link! We are done!
21143          break
21144        fi
21145        # Again resolve directory symlinks since the target of the just found
21146        # link could be in a different directory
21147        cd `$DIRNAME $ISLINK`
21148        sym_link_dir=`$THEPWDCMD -P`
21149        sym_link_file=`$BASENAME $ISLINK`
21150        let COUNTER=COUNTER+1
21151      done
21152      cd $STARTDIR
21153      TEST_COMPILER=$sym_link_dir/$sym_link_file
21154    fi
21155  fi
21156
21157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21158$as_echo "$TEST_COMPILER" >&6; }
21159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21160$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21161
21162  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21163  if test "x$COMPILER_BASENAME" = "xccache"; then
21164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21165$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21166    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21167    # We want to control ccache invocation ourselves, so ignore this cc and try
21168    # searching again.
21169
21170    # Remove the path to the fake ccache cc from the PATH
21171    RETRY_COMPILER_SAVED_PATH="$PATH"
21172    COMPILER_DIRNAME=`$DIRNAME $CXX`
21173    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21174
21175    # Try again looking for our compiler
21176    if test -n "$ac_tool_prefix"; then
21177  for ac_prog in $COMPILER_CHECK_LIST
21178  do
21179    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21180set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21182$as_echo_n "checking for $ac_word... " >&6; }
21183if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21184  $as_echo_n "(cached) " >&6
21185else
21186  if test -n "$PROPER_COMPILER_CXX"; then
21187  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21188else
21189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21190for as_dir in $PATH
21191do
21192  IFS=$as_save_IFS
21193  test -z "$as_dir" && as_dir=.
21194    for ac_exec_ext in '' $ac_executable_extensions; do
21195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21196    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21198    break 2
21199  fi
21200done
21201  done
21202IFS=$as_save_IFS
21203
21204fi
21205fi
21206PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21207if test -n "$PROPER_COMPILER_CXX"; then
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21209$as_echo "$PROPER_COMPILER_CXX" >&6; }
21210else
21211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21212$as_echo "no" >&6; }
21213fi
21214
21215
21216    test -n "$PROPER_COMPILER_CXX" && break
21217  done
21218fi
21219if test -z "$PROPER_COMPILER_CXX"; then
21220  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21221  for ac_prog in $COMPILER_CHECK_LIST
21222do
21223  # Extract the first word of "$ac_prog", so it can be a program name with args.
21224set dummy $ac_prog; ac_word=$2
21225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21226$as_echo_n "checking for $ac_word... " >&6; }
21227if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21228  $as_echo_n "(cached) " >&6
21229else
21230  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21231  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21232else
21233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21234for as_dir in $PATH
21235do
21236  IFS=$as_save_IFS
21237  test -z "$as_dir" && as_dir=.
21238    for ac_exec_ext in '' $ac_executable_extensions; do
21239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21240    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21242    break 2
21243  fi
21244done
21245  done
21246IFS=$as_save_IFS
21247
21248fi
21249fi
21250ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21251if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21253$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21254else
21255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21256$as_echo "no" >&6; }
21257fi
21258
21259
21260  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21261done
21262
21263  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21264    PROPER_COMPILER_CXX=""
21265  else
21266    case $cross_compiling:$ac_tool_warned in
21267yes:)
21268{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21269$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21270ac_tool_warned=yes ;;
21271esac
21272    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21273  fi
21274fi
21275
21276
21277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21278
21279  # First separate the path from the arguments. This will split at the first
21280  # space.
21281  complete="$PROPER_COMPILER_CXX"
21282  path="${complete%% *}"
21283  tmp="$complete EOL"
21284  arguments="${tmp#* }"
21285
21286  # Input might be given as Windows format, start by converting to
21287  # unix format.
21288  new_path=`$CYGPATH -u "$path"`
21289
21290  # Now try to locate executable using which
21291  new_path=`$WHICH "$new_path" 2> /dev/null`
21292  # bat and cmd files are not always considered executable in cygwin causing which
21293  # to not find them
21294  if test "x$new_path" = x \
21295      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21296      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21297    new_path=`$CYGPATH -u "$path"`
21298  fi
21299  if test "x$new_path" = x; then
21300    # Oops. Which didn't find the executable.
21301    # The splitting of arguments from the executable at a space might have been incorrect,
21302    # since paths with space are more likely in Windows. Give it another try with the whole
21303    # argument.
21304    path="$complete"
21305    arguments="EOL"
21306    new_path=`$CYGPATH -u "$path"`
21307    new_path=`$WHICH "$new_path" 2> /dev/null`
21308    # bat and cmd files are not always considered executable in cygwin causing which
21309    # to not find them
21310    if test "x$new_path" = x \
21311        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21312        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21313      new_path=`$CYGPATH -u "$path"`
21314    fi
21315    if test "x$new_path" = x; then
21316      # It's still not found. Now this is an unrecoverable error.
21317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21318$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21319      has_space=`$ECHO "$complete" | $GREP " "`
21320      if test "x$has_space" != x; then
21321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21323      fi
21324      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21325    fi
21326  fi
21327
21328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21331  # "foo.exe" is OK but "foo" is an error.
21332  #
21333  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21334  # It is also a way to make sure we got the proper file name for the real test later on.
21335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21336  if test "x$test_shortpath" = x; then
21337    # Short path failed, file does not exist as specified.
21338    # Try adding .exe or .cmd
21339    if test -f "${new_path}.exe"; then
21340      input_to_shortpath="${new_path}.exe"
21341    elif test -f "${new_path}.cmd"; then
21342      input_to_shortpath="${new_path}.cmd"
21343    else
21344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21345$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21346      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21347$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21348      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21349    fi
21350  else
21351    input_to_shortpath="$new_path"
21352  fi
21353
21354  # Call helper function which possibly converts this using DOS-style short mode.
21355  # If so, the updated path is stored in $new_path.
21356  new_path="$input_to_shortpath"
21357
21358  input_path="$input_to_shortpath"
21359  # Check if we need to convert this using DOS-style short mode. If the path
21360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21361  # take no chances and rewrite it.
21362  # Note: m4 eats our [], so we need to use [ and ] instead.
21363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21364  if test "x$has_forbidden_chars" != x; then
21365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21369      # Going to short mode and back again did indeed matter. Since short mode is
21370      # case insensitive, let's make it lowercase to improve readability.
21371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21372      # Now convert it back to Unix-stile (cygpath)
21373      input_path=`$CYGPATH -u "$shortmode_path"`
21374      new_path="$input_path"
21375    fi
21376  fi
21377
21378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21379  if test "x$test_cygdrive_prefix" = x; then
21380    # As a simple fix, exclude /usr/bin since it's not a real path.
21381    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21383      # a path prefixed by /cygdrive for fixpath to work.
21384      new_path="$CYGWIN_ROOT_PATH$input_path"
21385    fi
21386  fi
21387
21388  # remove trailing .exe if any
21389  new_path="${new_path/%.exe/}"
21390
21391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21392
21393  # First separate the path from the arguments. This will split at the first
21394  # space.
21395  complete="$PROPER_COMPILER_CXX"
21396  path="${complete%% *}"
21397  tmp="$complete EOL"
21398  arguments="${tmp#* }"
21399
21400  # Input might be given as Windows format, start by converting to
21401  # unix format.
21402  new_path="$path"
21403
21404  windows_path="$new_path"
21405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21406    unix_path=`$CYGPATH -u "$windows_path"`
21407    new_path="$unix_path"
21408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21410    new_path="$unix_path"
21411  fi
21412
21413
21414  # Now try to locate executable using which
21415  new_path=`$WHICH "$new_path" 2> /dev/null`
21416
21417  if test "x$new_path" = x; then
21418    # Oops. Which didn't find the executable.
21419    # The splitting of arguments from the executable at a space might have been incorrect,
21420    # since paths with space are more likely in Windows. Give it another try with the whole
21421    # argument.
21422    path="$complete"
21423    arguments="EOL"
21424    new_path="$path"
21425
21426  windows_path="$new_path"
21427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21428    unix_path=`$CYGPATH -u "$windows_path"`
21429    new_path="$unix_path"
21430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21432    new_path="$unix_path"
21433  fi
21434
21435
21436    new_path=`$WHICH "$new_path" 2> /dev/null`
21437
21438    if test "x$new_path" = x; then
21439      # It's still not found. Now this is an unrecoverable error.
21440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21441$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21442      has_space=`$ECHO "$complete" | $GREP " "`
21443      if test "x$has_space" != x; then
21444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21446      fi
21447      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21448    fi
21449  fi
21450
21451  # Now new_path has a complete unix path to the binary
21452  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21453    # Keep paths in /bin as-is, but remove trailing .exe if any
21454    new_path="${new_path/%.exe/}"
21455    # Do not save /bin paths to all_fixpath_prefixes!
21456  else
21457    # Not in mixed or Windows style, start by that.
21458    new_path=`cmd //c echo $new_path`
21459
21460  input_path="$new_path"
21461  # Check if we need to convert this using DOS-style short mode. If the path
21462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21463  # take no chances and rewrite it.
21464  # Note: m4 eats our [], so we need to use [ and ] instead.
21465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21466  if test "x$has_forbidden_chars" != x; then
21467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21469  fi
21470
21471    # Output is in $new_path
21472
21473  windows_path="$new_path"
21474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21475    unix_path=`$CYGPATH -u "$windows_path"`
21476    new_path="$unix_path"
21477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21479    new_path="$unix_path"
21480  fi
21481
21482    # remove trailing .exe if any
21483    new_path="${new_path/%.exe/}"
21484
21485    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21486    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21487  fi
21488
21489  else
21490    # We're on a posix platform. Hooray! :)
21491    # First separate the path from the arguments. This will split at the first
21492    # space.
21493    complete="$PROPER_COMPILER_CXX"
21494    path="${complete%% *}"
21495    tmp="$complete EOL"
21496    arguments="${tmp#* }"
21497
21498    # Cannot rely on the command "which" here since it doesn't always work.
21499    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21500    if test -z "$is_absolute_path"; then
21501      # Path to executable is not absolute. Find it.
21502      IFS_save="$IFS"
21503      IFS=:
21504      for p in $PATH; do
21505        if test -f "$p/$path" && test -x "$p/$path"; then
21506          new_path="$p/$path"
21507          break
21508        fi
21509      done
21510      IFS="$IFS_save"
21511    else
21512      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21513$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21514      new_path="$path"
21515    fi
21516
21517    if test "x$new_path" = x; then
21518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21519$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21520      has_space=`$ECHO "$complete" | $GREP " "`
21521      if test "x$has_space" != x; then
21522        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21524      fi
21525      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21526    fi
21527  fi
21528
21529  # Now join together the path and the arguments once again
21530  if test "x$arguments" != xEOL; then
21531    new_complete="$new_path ${arguments% *}"
21532  else
21533    new_complete="$new_path"
21534  fi
21535
21536  if test "x$complete" != "x$new_complete"; then
21537    PROPER_COMPILER_CXX="$new_complete"
21538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21539$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21540  fi
21541
21542    PATH="$RETRY_COMPILER_SAVED_PATH"
21543
21544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21545$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21546
21547  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21548    # Follow a chain of symbolic links. Use readlink
21549    # where it exists, else fall back to horribly
21550    # complicated shell code.
21551    if test "x$READLINK_TESTED" != yes; then
21552      # On MacOSX there is a readlink tool with a different
21553      # purpose than the GNU readlink tool. Check the found readlink.
21554      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21555      if test "x$ISGNU" = x; then
21556        # A readlink that we do not know how to use.
21557        # Are there other non-GNU readlinks out there?
21558        READLINK_TESTED=yes
21559        READLINK=
21560      fi
21561    fi
21562
21563    if test "x$READLINK" != x; then
21564      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21565    else
21566      # Save the current directory for restoring afterwards
21567      STARTDIR=$PWD
21568      COUNTER=0
21569      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21570      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21571      cd $sym_link_dir
21572      # Use -P flag to resolve symlinks in directories.
21573      cd `$THEPWDCMD -P`
21574      sym_link_dir=`$THEPWDCMD -P`
21575      # Resolve file symlinks
21576      while test $COUNTER -lt 20; do
21577        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21578        if test "x$ISLINK" == x; then
21579          # This is not a symbolic link! We are done!
21580          break
21581        fi
21582        # Again resolve directory symlinks since the target of the just found
21583        # link could be in a different directory
21584        cd `$DIRNAME $ISLINK`
21585        sym_link_dir=`$THEPWDCMD -P`
21586        sym_link_file=`$BASENAME $ISLINK`
21587        let COUNTER=COUNTER+1
21588      done
21589      cd $STARTDIR
21590      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21591    fi
21592  fi
21593
21594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21595$as_echo "$PROPER_COMPILER_CXX" >&6; }
21596    CXX="$PROPER_COMPILER_CXX"
21597  else
21598    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21599$as_echo "no, keeping CXX" >&6; }
21600    CXX="$TEST_COMPILER"
21601  fi
21602
21603  COMPILER=$CXX
21604  COMPILER_NAME=$COMPILER_NAME
21605
21606  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21607    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21608    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21609    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21610    if test $? -ne 0; then
21611      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21612
21613      { $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
21614$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21615      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21616$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21617      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21618    else
21619      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21620      COMPILER_VENDOR="Sun Studio"
21621    fi
21622  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21623    # First line typically looks something like:
21624    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21625    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21626    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21627    COMPILER_VENDOR="Microsoft CL.EXE"
21628    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21629    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21630      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21631        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21632      fi
21633    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21634      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21635        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21636      fi
21637    fi
21638  else
21639    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21640    # Check that this is likely to be GCC.
21641    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21642    if test $? -ne 0; then
21643      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21644$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21645      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21646$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21647      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21648    fi
21649
21650    # First line typically looks something like:
21651    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21652    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21653    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21654  fi
21655  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21656  CXX_VERSION="$COMPILER_VERSION"
21657  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21658  CXX_VENDOR="$COMPILER_VENDOR"
21659
21660  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21661$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21662
21663
21664  # Now that we have resolved CXX ourself, let autoconf have its go at it
21665  ac_ext=cpp
21666ac_cpp='$CXXCPP $CPPFLAGS'
21667ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21668ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21669ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21670if test -z "$CXX"; then
21671  if test -n "$CCC"; then
21672    CXX=$CCC
21673  else
21674    if test -n "$ac_tool_prefix"; then
21675  for ac_prog in $CXX
21676  do
21677    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21678set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21680$as_echo_n "checking for $ac_word... " >&6; }
21681if ${ac_cv_prog_CXX+:} false; then :
21682  $as_echo_n "(cached) " >&6
21683else
21684  if test -n "$CXX"; then
21685  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21686else
21687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21688for as_dir in $PATH
21689do
21690  IFS=$as_save_IFS
21691  test -z "$as_dir" && as_dir=.
21692    for ac_exec_ext in '' $ac_executable_extensions; do
21693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21694    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21696    break 2
21697  fi
21698done
21699  done
21700IFS=$as_save_IFS
21701
21702fi
21703fi
21704CXX=$ac_cv_prog_CXX
21705if test -n "$CXX"; then
21706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21707$as_echo "$CXX" >&6; }
21708else
21709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21710$as_echo "no" >&6; }
21711fi
21712
21713
21714    test -n "$CXX" && break
21715  done
21716fi
21717if test -z "$CXX"; then
21718  ac_ct_CXX=$CXX
21719  for ac_prog in $CXX
21720do
21721  # Extract the first word of "$ac_prog", so it can be a program name with args.
21722set dummy $ac_prog; ac_word=$2
21723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21724$as_echo_n "checking for $ac_word... " >&6; }
21725if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21726  $as_echo_n "(cached) " >&6
21727else
21728  if test -n "$ac_ct_CXX"; then
21729  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21730else
21731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21732for as_dir in $PATH
21733do
21734  IFS=$as_save_IFS
21735  test -z "$as_dir" && as_dir=.
21736    for ac_exec_ext in '' $ac_executable_extensions; do
21737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21738    ac_cv_prog_ac_ct_CXX="$ac_prog"
21739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21740    break 2
21741  fi
21742done
21743  done
21744IFS=$as_save_IFS
21745
21746fi
21747fi
21748ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21749if test -n "$ac_ct_CXX"; then
21750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21751$as_echo "$ac_ct_CXX" >&6; }
21752else
21753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21754$as_echo "no" >&6; }
21755fi
21756
21757
21758  test -n "$ac_ct_CXX" && break
21759done
21760
21761  if test "x$ac_ct_CXX" = x; then
21762    CXX="g++"
21763  else
21764    case $cross_compiling:$ac_tool_warned in
21765yes:)
21766{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21767$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21768ac_tool_warned=yes ;;
21769esac
21770    CXX=$ac_ct_CXX
21771  fi
21772fi
21773
21774  fi
21775fi
21776# Provide some information about the compiler.
21777$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21778set X $ac_compile
21779ac_compiler=$2
21780for ac_option in --version -v -V -qversion; do
21781  { { ac_try="$ac_compiler $ac_option >&5"
21782case "(($ac_try" in
21783  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21784  *) ac_try_echo=$ac_try;;
21785esac
21786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21787$as_echo "$ac_try_echo"; } >&5
21788  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21789  ac_status=$?
21790  if test -s conftest.err; then
21791    sed '10a\
21792... rest of stderr output deleted ...
21793         10q' conftest.err >conftest.er1
21794    cat conftest.er1 >&5
21795  fi
21796  rm -f conftest.er1 conftest.err
21797  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21798  test $ac_status = 0; }
21799done
21800
21801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21802$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21803if ${ac_cv_cxx_compiler_gnu+:} false; then :
21804  $as_echo_n "(cached) " >&6
21805else
21806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21807/* end confdefs.h.  */
21808
21809int
21810main ()
21811{
21812#ifndef __GNUC__
21813       choke me
21814#endif
21815
21816  ;
21817  return 0;
21818}
21819_ACEOF
21820if ac_fn_cxx_try_compile "$LINENO"; then :
21821  ac_compiler_gnu=yes
21822else
21823  ac_compiler_gnu=no
21824fi
21825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21826ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21827
21828fi
21829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21830$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21831if test $ac_compiler_gnu = yes; then
21832  GXX=yes
21833else
21834  GXX=
21835fi
21836ac_test_CXXFLAGS=${CXXFLAGS+set}
21837ac_save_CXXFLAGS=$CXXFLAGS
21838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21839$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21840if ${ac_cv_prog_cxx_g+:} false; then :
21841  $as_echo_n "(cached) " >&6
21842else
21843  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21844   ac_cxx_werror_flag=yes
21845   ac_cv_prog_cxx_g=no
21846   CXXFLAGS="-g"
21847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21848/* end confdefs.h.  */
21849
21850int
21851main ()
21852{
21853
21854  ;
21855  return 0;
21856}
21857_ACEOF
21858if ac_fn_cxx_try_compile "$LINENO"; then :
21859  ac_cv_prog_cxx_g=yes
21860else
21861  CXXFLAGS=""
21862      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21863/* end confdefs.h.  */
21864
21865int
21866main ()
21867{
21868
21869  ;
21870  return 0;
21871}
21872_ACEOF
21873if ac_fn_cxx_try_compile "$LINENO"; then :
21874
21875else
21876  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21877	 CXXFLAGS="-g"
21878	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21879/* end confdefs.h.  */
21880
21881int
21882main ()
21883{
21884
21885  ;
21886  return 0;
21887}
21888_ACEOF
21889if ac_fn_cxx_try_compile "$LINENO"; then :
21890  ac_cv_prog_cxx_g=yes
21891fi
21892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21893fi
21894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21895fi
21896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21897   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21898fi
21899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21900$as_echo "$ac_cv_prog_cxx_g" >&6; }
21901if test "$ac_test_CXXFLAGS" = set; then
21902  CXXFLAGS=$ac_save_CXXFLAGS
21903elif test $ac_cv_prog_cxx_g = yes; then
21904  if test "$GXX" = yes; then
21905    CXXFLAGS="-g -O2"
21906  else
21907    CXXFLAGS="-g"
21908  fi
21909else
21910  if test "$GXX" = yes; then
21911    CXXFLAGS="-O2"
21912  else
21913    CXXFLAGS=
21914  fi
21915fi
21916ac_ext=cpp
21917ac_cpp='$CXXCPP $CPPFLAGS'
21918ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21919ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21920ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21921
21922
21923  ### Locate other tools
21924
21925  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21926    ac_ext=m
21927ac_cpp='$OBJCPP $CPPFLAGS'
21928ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21929ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21930ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21931if test -n "$ac_tool_prefix"; then
21932  for ac_prog in gcc objcc objc cc CC
21933  do
21934    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21935set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21937$as_echo_n "checking for $ac_word... " >&6; }
21938if ${ac_cv_prog_OBJC+:} false; then :
21939  $as_echo_n "(cached) " >&6
21940else
21941  if test -n "$OBJC"; then
21942  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21943else
21944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21945for as_dir in $PATH
21946do
21947  IFS=$as_save_IFS
21948  test -z "$as_dir" && as_dir=.
21949    for ac_exec_ext in '' $ac_executable_extensions; do
21950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21951    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21953    break 2
21954  fi
21955done
21956  done
21957IFS=$as_save_IFS
21958
21959fi
21960fi
21961OBJC=$ac_cv_prog_OBJC
21962if test -n "$OBJC"; then
21963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21964$as_echo "$OBJC" >&6; }
21965else
21966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21967$as_echo "no" >&6; }
21968fi
21969
21970
21971    test -n "$OBJC" && break
21972  done
21973fi
21974if test -z "$OBJC"; then
21975  ac_ct_OBJC=$OBJC
21976  for ac_prog in gcc objcc objc cc CC
21977do
21978  # Extract the first word of "$ac_prog", so it can be a program name with args.
21979set dummy $ac_prog; ac_word=$2
21980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21981$as_echo_n "checking for $ac_word... " >&6; }
21982if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21983  $as_echo_n "(cached) " >&6
21984else
21985  if test -n "$ac_ct_OBJC"; then
21986  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21987else
21988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21989for as_dir in $PATH
21990do
21991  IFS=$as_save_IFS
21992  test -z "$as_dir" && as_dir=.
21993    for ac_exec_ext in '' $ac_executable_extensions; do
21994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21995    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21997    break 2
21998  fi
21999done
22000  done
22001IFS=$as_save_IFS
22002
22003fi
22004fi
22005ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22006if test -n "$ac_ct_OBJC"; then
22007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22008$as_echo "$ac_ct_OBJC" >&6; }
22009else
22010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22011$as_echo "no" >&6; }
22012fi
22013
22014
22015  test -n "$ac_ct_OBJC" && break
22016done
22017
22018  if test "x$ac_ct_OBJC" = x; then
22019    OBJC="gcc"
22020  else
22021    case $cross_compiling:$ac_tool_warned in
22022yes:)
22023{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22024$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22025ac_tool_warned=yes ;;
22026esac
22027    OBJC=$ac_ct_OBJC
22028  fi
22029fi
22030
22031# Provide some information about the compiler.
22032$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22033set X $ac_compile
22034ac_compiler=$2
22035for ac_option in --version -v -V -qversion; do
22036  { { ac_try="$ac_compiler $ac_option >&5"
22037case "(($ac_try" in
22038  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22039  *) ac_try_echo=$ac_try;;
22040esac
22041eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22042$as_echo "$ac_try_echo"; } >&5
22043  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22044  ac_status=$?
22045  if test -s conftest.err; then
22046    sed '10a\
22047... rest of stderr output deleted ...
22048         10q' conftest.err >conftest.er1
22049    cat conftest.er1 >&5
22050  fi
22051  rm -f conftest.er1 conftest.err
22052  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22053  test $ac_status = 0; }
22054done
22055
22056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22057$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22058if ${ac_cv_objc_compiler_gnu+:} false; then :
22059  $as_echo_n "(cached) " >&6
22060else
22061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22062/* end confdefs.h.  */
22063
22064int
22065main ()
22066{
22067#ifndef __GNUC__
22068       choke me
22069#endif
22070
22071  ;
22072  return 0;
22073}
22074_ACEOF
22075if ac_fn_objc_try_compile "$LINENO"; then :
22076  ac_compiler_gnu=yes
22077else
22078  ac_compiler_gnu=no
22079fi
22080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22081ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22082
22083fi
22084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22085$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22086if test $ac_compiler_gnu = yes; then
22087  GOBJC=yes
22088else
22089  GOBJC=
22090fi
22091ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22092ac_save_OBJCFLAGS=$OBJCFLAGS
22093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22094$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22095if ${ac_cv_prog_objc_g+:} false; then :
22096  $as_echo_n "(cached) " >&6
22097else
22098  ac_save_objc_werror_flag=$ac_objc_werror_flag
22099   ac_objc_werror_flag=yes
22100   ac_cv_prog_objc_g=no
22101   OBJCFLAGS="-g"
22102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22103/* end confdefs.h.  */
22104
22105int
22106main ()
22107{
22108
22109  ;
22110  return 0;
22111}
22112_ACEOF
22113if ac_fn_objc_try_compile "$LINENO"; then :
22114  ac_cv_prog_objc_g=yes
22115else
22116  OBJCFLAGS=""
22117      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22118/* end confdefs.h.  */
22119
22120int
22121main ()
22122{
22123
22124  ;
22125  return 0;
22126}
22127_ACEOF
22128if ac_fn_objc_try_compile "$LINENO"; then :
22129
22130else
22131  ac_objc_werror_flag=$ac_save_objc_werror_flag
22132	 OBJCFLAGS="-g"
22133	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22134/* end confdefs.h.  */
22135
22136int
22137main ()
22138{
22139
22140  ;
22141  return 0;
22142}
22143_ACEOF
22144if ac_fn_objc_try_compile "$LINENO"; then :
22145  ac_cv_prog_objc_g=yes
22146fi
22147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22148fi
22149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22150fi
22151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22152   ac_objc_werror_flag=$ac_save_objc_werror_flag
22153fi
22154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22155$as_echo "$ac_cv_prog_objc_g" >&6; }
22156if test "$ac_test_OBJCFLAGS" = set; then
22157  OBJCFLAGS=$ac_save_OBJCFLAGS
22158elif test $ac_cv_prog_objc_g = yes; then
22159  if test "$GOBJC" = yes; then
22160    OBJCFLAGS="-g -O2"
22161  else
22162    OBJCFLAGS="-g"
22163  fi
22164else
22165  if test "$GOBJC" = yes; then
22166    OBJCFLAGS="-O2"
22167  else
22168    OBJCFLAGS=
22169  fi
22170fi
22171ac_ext=cpp
22172ac_cpp='$CXXCPP $CPPFLAGS'
22173ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22174ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22175ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22176
22177
22178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22179
22180  # First separate the path from the arguments. This will split at the first
22181  # space.
22182  complete="$OBJC"
22183  path="${complete%% *}"
22184  tmp="$complete EOL"
22185  arguments="${tmp#* }"
22186
22187  # Input might be given as Windows format, start by converting to
22188  # unix format.
22189  new_path=`$CYGPATH -u "$path"`
22190
22191  # Now try to locate executable using which
22192  new_path=`$WHICH "$new_path" 2> /dev/null`
22193  # bat and cmd files are not always considered executable in cygwin causing which
22194  # to not find them
22195  if test "x$new_path" = x \
22196      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22197      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22198    new_path=`$CYGPATH -u "$path"`
22199  fi
22200  if test "x$new_path" = x; then
22201    # Oops. Which didn't find the executable.
22202    # The splitting of arguments from the executable at a space might have been incorrect,
22203    # since paths with space are more likely in Windows. Give it another try with the whole
22204    # argument.
22205    path="$complete"
22206    arguments="EOL"
22207    new_path=`$CYGPATH -u "$path"`
22208    new_path=`$WHICH "$new_path" 2> /dev/null`
22209    # bat and cmd files are not always considered executable in cygwin causing which
22210    # to not find them
22211    if test "x$new_path" = x \
22212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22214      new_path=`$CYGPATH -u "$path"`
22215    fi
22216    if test "x$new_path" = x; then
22217      # It's still not found. Now this is an unrecoverable error.
22218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22219$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22220      has_space=`$ECHO "$complete" | $GREP " "`
22221      if test "x$has_space" != x; then
22222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22224      fi
22225      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22226    fi
22227  fi
22228
22229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22232  # "foo.exe" is OK but "foo" is an error.
22233  #
22234  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22235  # It is also a way to make sure we got the proper file name for the real test later on.
22236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22237  if test "x$test_shortpath" = x; then
22238    # Short path failed, file does not exist as specified.
22239    # Try adding .exe or .cmd
22240    if test -f "${new_path}.exe"; then
22241      input_to_shortpath="${new_path}.exe"
22242    elif test -f "${new_path}.cmd"; then
22243      input_to_shortpath="${new_path}.cmd"
22244    else
22245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22246$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22249      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22250    fi
22251  else
22252    input_to_shortpath="$new_path"
22253  fi
22254
22255  # Call helper function which possibly converts this using DOS-style short mode.
22256  # If so, the updated path is stored in $new_path.
22257  new_path="$input_to_shortpath"
22258
22259  input_path="$input_to_shortpath"
22260  # Check if we need to convert this using DOS-style short mode. If the path
22261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22262  # take no chances and rewrite it.
22263  # Note: m4 eats our [], so we need to use [ and ] instead.
22264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22265  if test "x$has_forbidden_chars" != x; then
22266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22270      # Going to short mode and back again did indeed matter. Since short mode is
22271      # case insensitive, let's make it lowercase to improve readability.
22272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22273      # Now convert it back to Unix-stile (cygpath)
22274      input_path=`$CYGPATH -u "$shortmode_path"`
22275      new_path="$input_path"
22276    fi
22277  fi
22278
22279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22280  if test "x$test_cygdrive_prefix" = x; then
22281    # As a simple fix, exclude /usr/bin since it's not a real path.
22282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22284      # a path prefixed by /cygdrive for fixpath to work.
22285      new_path="$CYGWIN_ROOT_PATH$input_path"
22286    fi
22287  fi
22288
22289  # remove trailing .exe if any
22290  new_path="${new_path/%.exe/}"
22291
22292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22293
22294  # First separate the path from the arguments. This will split at the first
22295  # space.
22296  complete="$OBJC"
22297  path="${complete%% *}"
22298  tmp="$complete EOL"
22299  arguments="${tmp#* }"
22300
22301  # Input might be given as Windows format, start by converting to
22302  # unix format.
22303  new_path="$path"
22304
22305  windows_path="$new_path"
22306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22307    unix_path=`$CYGPATH -u "$windows_path"`
22308    new_path="$unix_path"
22309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22311    new_path="$unix_path"
22312  fi
22313
22314
22315  # Now try to locate executable using which
22316  new_path=`$WHICH "$new_path" 2> /dev/null`
22317
22318  if test "x$new_path" = x; then
22319    # Oops. Which didn't find the executable.
22320    # The splitting of arguments from the executable at a space might have been incorrect,
22321    # since paths with space are more likely in Windows. Give it another try with the whole
22322    # argument.
22323    path="$complete"
22324    arguments="EOL"
22325    new_path="$path"
22326
22327  windows_path="$new_path"
22328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22329    unix_path=`$CYGPATH -u "$windows_path"`
22330    new_path="$unix_path"
22331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22333    new_path="$unix_path"
22334  fi
22335
22336
22337    new_path=`$WHICH "$new_path" 2> /dev/null`
22338
22339    if test "x$new_path" = x; then
22340      # It's still not found. Now this is an unrecoverable error.
22341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22342$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22343      has_space=`$ECHO "$complete" | $GREP " "`
22344      if test "x$has_space" != x; then
22345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22347      fi
22348      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22349    fi
22350  fi
22351
22352  # Now new_path has a complete unix path to the binary
22353  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22354    # Keep paths in /bin as-is, but remove trailing .exe if any
22355    new_path="${new_path/%.exe/}"
22356    # Do not save /bin paths to all_fixpath_prefixes!
22357  else
22358    # Not in mixed or Windows style, start by that.
22359    new_path=`cmd //c echo $new_path`
22360
22361  input_path="$new_path"
22362  # Check if we need to convert this using DOS-style short mode. If the path
22363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22364  # take no chances and rewrite it.
22365  # Note: m4 eats our [], so we need to use [ and ] instead.
22366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22367  if test "x$has_forbidden_chars" != x; then
22368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22370  fi
22371
22372    # Output is in $new_path
22373
22374  windows_path="$new_path"
22375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22376    unix_path=`$CYGPATH -u "$windows_path"`
22377    new_path="$unix_path"
22378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22380    new_path="$unix_path"
22381  fi
22382
22383    # remove trailing .exe if any
22384    new_path="${new_path/%.exe/}"
22385
22386    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22387    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22388  fi
22389
22390  else
22391    # We're on a posix platform. Hooray! :)
22392    # First separate the path from the arguments. This will split at the first
22393    # space.
22394    complete="$OBJC"
22395    path="${complete%% *}"
22396    tmp="$complete EOL"
22397    arguments="${tmp#* }"
22398
22399    # Cannot rely on the command "which" here since it doesn't always work.
22400    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22401    if test -z "$is_absolute_path"; then
22402      # Path to executable is not absolute. Find it.
22403      IFS_save="$IFS"
22404      IFS=:
22405      for p in $PATH; do
22406        if test -f "$p/$path" && test -x "$p/$path"; then
22407          new_path="$p/$path"
22408          break
22409        fi
22410      done
22411      IFS="$IFS_save"
22412    else
22413      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22414$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22415      new_path="$path"
22416    fi
22417
22418    if test "x$new_path" = x; then
22419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22420$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22421      has_space=`$ECHO "$complete" | $GREP " "`
22422      if test "x$has_space" != x; then
22423        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22424$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22425      fi
22426      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22427    fi
22428  fi
22429
22430  # Now join together the path and the arguments once again
22431  if test "x$arguments" != xEOL; then
22432    new_complete="$new_path ${arguments% *}"
22433  else
22434    new_complete="$new_path"
22435  fi
22436
22437  if test "x$complete" != "x$new_complete"; then
22438    OBJC="$new_complete"
22439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22440$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22441  fi
22442
22443  else
22444    OBJC=
22445  fi
22446
22447  # Restore the flags to the user specified values.
22448  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22449  CFLAGS="$ORG_CFLAGS"
22450  CXXFLAGS="$ORG_CXXFLAGS"
22451  OBJCFLAGS="$ORG_OBJCFLAGS"
22452
22453  LD="$CC"
22454  LDEXE="$CC"
22455  LDCXX="$CXX"
22456  LDEXECXX="$CXX"
22457
22458  # LDEXE is the linker to use, when creating executables.
22459
22460  # Linking C++ libraries.
22461
22462  # Linking C++ executables.
22463
22464
22465  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22466    if test -n "$ac_tool_prefix"; then
22467  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22468set dummy ${ac_tool_prefix}ar; ac_word=$2
22469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22470$as_echo_n "checking for $ac_word... " >&6; }
22471if ${ac_cv_prog_AR+:} false; then :
22472  $as_echo_n "(cached) " >&6
22473else
22474  if test -n "$AR"; then
22475  ac_cv_prog_AR="$AR" # Let the user override the test.
22476else
22477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22478for as_dir in $PATH
22479do
22480  IFS=$as_save_IFS
22481  test -z "$as_dir" && as_dir=.
22482    for ac_exec_ext in '' $ac_executable_extensions; do
22483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22484    ac_cv_prog_AR="${ac_tool_prefix}ar"
22485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22486    break 2
22487  fi
22488done
22489  done
22490IFS=$as_save_IFS
22491
22492fi
22493fi
22494AR=$ac_cv_prog_AR
22495if test -n "$AR"; then
22496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22497$as_echo "$AR" >&6; }
22498else
22499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22500$as_echo "no" >&6; }
22501fi
22502
22503
22504fi
22505if test -z "$ac_cv_prog_AR"; then
22506  ac_ct_AR=$AR
22507  # Extract the first word of "ar", so it can be a program name with args.
22508set dummy ar; ac_word=$2
22509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22510$as_echo_n "checking for $ac_word... " >&6; }
22511if ${ac_cv_prog_ac_ct_AR+:} false; then :
22512  $as_echo_n "(cached) " >&6
22513else
22514  if test -n "$ac_ct_AR"; then
22515  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22516else
22517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22518for as_dir in $PATH
22519do
22520  IFS=$as_save_IFS
22521  test -z "$as_dir" && as_dir=.
22522    for ac_exec_ext in '' $ac_executable_extensions; do
22523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22524    ac_cv_prog_ac_ct_AR="ar"
22525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22526    break 2
22527  fi
22528done
22529  done
22530IFS=$as_save_IFS
22531
22532fi
22533fi
22534ac_ct_AR=$ac_cv_prog_ac_ct_AR
22535if test -n "$ac_ct_AR"; then
22536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22537$as_echo "$ac_ct_AR" >&6; }
22538else
22539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22540$as_echo "no" >&6; }
22541fi
22542
22543  if test "x$ac_ct_AR" = x; then
22544    AR=""
22545  else
22546    case $cross_compiling:$ac_tool_warned in
22547yes:)
22548{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22549$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22550ac_tool_warned=yes ;;
22551esac
22552    AR=$ac_ct_AR
22553  fi
22554else
22555  AR="$ac_cv_prog_AR"
22556fi
22557
22558
22559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22560
22561  # First separate the path from the arguments. This will split at the first
22562  # space.
22563  complete="$AR"
22564  path="${complete%% *}"
22565  tmp="$complete EOL"
22566  arguments="${tmp#* }"
22567
22568  # Input might be given as Windows format, start by converting to
22569  # unix format.
22570  new_path=`$CYGPATH -u "$path"`
22571
22572  # Now try to locate executable using which
22573  new_path=`$WHICH "$new_path" 2> /dev/null`
22574  # bat and cmd files are not always considered executable in cygwin causing which
22575  # to not find them
22576  if test "x$new_path" = x \
22577      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22578      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22579    new_path=`$CYGPATH -u "$path"`
22580  fi
22581  if test "x$new_path" = x; then
22582    # Oops. Which didn't find the executable.
22583    # The splitting of arguments from the executable at a space might have been incorrect,
22584    # since paths with space are more likely in Windows. Give it another try with the whole
22585    # argument.
22586    path="$complete"
22587    arguments="EOL"
22588    new_path=`$CYGPATH -u "$path"`
22589    new_path=`$WHICH "$new_path" 2> /dev/null`
22590    # bat and cmd files are not always considered executable in cygwin causing which
22591    # to not find them
22592    if test "x$new_path" = x \
22593        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22594        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22595      new_path=`$CYGPATH -u "$path"`
22596    fi
22597    if test "x$new_path" = x; then
22598      # It's still not found. Now this is an unrecoverable error.
22599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22600$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22601      has_space=`$ECHO "$complete" | $GREP " "`
22602      if test "x$has_space" != x; then
22603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22605      fi
22606      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22607    fi
22608  fi
22609
22610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22613  # "foo.exe" is OK but "foo" is an error.
22614  #
22615  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22616  # It is also a way to make sure we got the proper file name for the real test later on.
22617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22618  if test "x$test_shortpath" = x; then
22619    # Short path failed, file does not exist as specified.
22620    # Try adding .exe or .cmd
22621    if test -f "${new_path}.exe"; then
22622      input_to_shortpath="${new_path}.exe"
22623    elif test -f "${new_path}.cmd"; then
22624      input_to_shortpath="${new_path}.cmd"
22625    else
22626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22627$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22628      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22629$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22630      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22631    fi
22632  else
22633    input_to_shortpath="$new_path"
22634  fi
22635
22636  # Call helper function which possibly converts this using DOS-style short mode.
22637  # If so, the updated path is stored in $new_path.
22638  new_path="$input_to_shortpath"
22639
22640  input_path="$input_to_shortpath"
22641  # Check if we need to convert this using DOS-style short mode. If the path
22642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22643  # take no chances and rewrite it.
22644  # Note: m4 eats our [], so we need to use [ and ] instead.
22645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22646  if test "x$has_forbidden_chars" != x; then
22647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22651      # Going to short mode and back again did indeed matter. Since short mode is
22652      # case insensitive, let's make it lowercase to improve readability.
22653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22654      # Now convert it back to Unix-stile (cygpath)
22655      input_path=`$CYGPATH -u "$shortmode_path"`
22656      new_path="$input_path"
22657    fi
22658  fi
22659
22660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22661  if test "x$test_cygdrive_prefix" = x; then
22662    # As a simple fix, exclude /usr/bin since it's not a real path.
22663    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22665      # a path prefixed by /cygdrive for fixpath to work.
22666      new_path="$CYGWIN_ROOT_PATH$input_path"
22667    fi
22668  fi
22669
22670  # remove trailing .exe if any
22671  new_path="${new_path/%.exe/}"
22672
22673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22674
22675  # First separate the path from the arguments. This will split at the first
22676  # space.
22677  complete="$AR"
22678  path="${complete%% *}"
22679  tmp="$complete EOL"
22680  arguments="${tmp#* }"
22681
22682  # Input might be given as Windows format, start by converting to
22683  # unix format.
22684  new_path="$path"
22685
22686  windows_path="$new_path"
22687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22688    unix_path=`$CYGPATH -u "$windows_path"`
22689    new_path="$unix_path"
22690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22692    new_path="$unix_path"
22693  fi
22694
22695
22696  # Now try to locate executable using which
22697  new_path=`$WHICH "$new_path" 2> /dev/null`
22698
22699  if test "x$new_path" = x; then
22700    # Oops. Which didn't find the executable.
22701    # The splitting of arguments from the executable at a space might have been incorrect,
22702    # since paths with space are more likely in Windows. Give it another try with the whole
22703    # argument.
22704    path="$complete"
22705    arguments="EOL"
22706    new_path="$path"
22707
22708  windows_path="$new_path"
22709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22710    unix_path=`$CYGPATH -u "$windows_path"`
22711    new_path="$unix_path"
22712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22714    new_path="$unix_path"
22715  fi
22716
22717
22718    new_path=`$WHICH "$new_path" 2> /dev/null`
22719
22720    if test "x$new_path" = x; then
22721      # It's still not found. Now this is an unrecoverable error.
22722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22723$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22724      has_space=`$ECHO "$complete" | $GREP " "`
22725      if test "x$has_space" != x; then
22726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22728      fi
22729      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22730    fi
22731  fi
22732
22733  # Now new_path has a complete unix path to the binary
22734  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22735    # Keep paths in /bin as-is, but remove trailing .exe if any
22736    new_path="${new_path/%.exe/}"
22737    # Do not save /bin paths to all_fixpath_prefixes!
22738  else
22739    # Not in mixed or Windows style, start by that.
22740    new_path=`cmd //c echo $new_path`
22741
22742  input_path="$new_path"
22743  # Check if we need to convert this using DOS-style short mode. If the path
22744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22745  # take no chances and rewrite it.
22746  # Note: m4 eats our [], so we need to use [ and ] instead.
22747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22748  if test "x$has_forbidden_chars" != x; then
22749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22751  fi
22752
22753    # Output is in $new_path
22754
22755  windows_path="$new_path"
22756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22757    unix_path=`$CYGPATH -u "$windows_path"`
22758    new_path="$unix_path"
22759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22761    new_path="$unix_path"
22762  fi
22763
22764    # remove trailing .exe if any
22765    new_path="${new_path/%.exe/}"
22766
22767    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22768    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22769  fi
22770
22771  else
22772    # We're on a posix platform. Hooray! :)
22773    # First separate the path from the arguments. This will split at the first
22774    # space.
22775    complete="$AR"
22776    path="${complete%% *}"
22777    tmp="$complete EOL"
22778    arguments="${tmp#* }"
22779
22780    # Cannot rely on the command "which" here since it doesn't always work.
22781    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22782    if test -z "$is_absolute_path"; then
22783      # Path to executable is not absolute. Find it.
22784      IFS_save="$IFS"
22785      IFS=:
22786      for p in $PATH; do
22787        if test -f "$p/$path" && test -x "$p/$path"; then
22788          new_path="$p/$path"
22789          break
22790        fi
22791      done
22792      IFS="$IFS_save"
22793    else
22794      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22795$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22796      new_path="$path"
22797    fi
22798
22799    if test "x$new_path" = x; then
22800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22801$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22802      has_space=`$ECHO "$complete" | $GREP " "`
22803      if test "x$has_space" != x; then
22804        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22805$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22806      fi
22807      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22808    fi
22809  fi
22810
22811  # Now join together the path and the arguments once again
22812  if test "x$arguments" != xEOL; then
22813    new_complete="$new_path ${arguments% *}"
22814  else
22815    new_complete="$new_path"
22816  fi
22817
22818  if test "x$complete" != "x$new_complete"; then
22819    AR="$new_complete"
22820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22821$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22822  fi
22823
22824  fi
22825  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22826    ARFLAGS="-r"
22827  else
22828    ARFLAGS=""
22829  fi
22830
22831
22832  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22833  HOTSPOT_CXX="$CXX"
22834  HOTSPOT_LD="$LD"
22835
22836
22837
22838  COMPILER_NAME=gcc
22839  COMPILER_TYPE=CC
22840  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22841
22842    # For now, assume that we are always compiling using cl.exe.
22843    CC_OUT_OPTION=-Fo
22844    EXE_OUT_OPTION=-out:
22845    LD_OUT_OPTION=-out:
22846    AR_OUT_OPTION=-out:
22847    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22848    # program for something completely different.
22849    # Extract the first word of "link", so it can be a program name with args.
22850set dummy link; ac_word=$2
22851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22852$as_echo_n "checking for $ac_word... " >&6; }
22853if ${ac_cv_prog_WINLD+:} false; then :
22854  $as_echo_n "(cached) " >&6
22855else
22856  if test -n "$WINLD"; then
22857  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22858else
22859  ac_prog_rejected=no
22860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22861for as_dir in $PATH
22862do
22863  IFS=$as_save_IFS
22864  test -z "$as_dir" && as_dir=.
22865    for ac_exec_ext in '' $ac_executable_extensions; do
22866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22867    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22868       ac_prog_rejected=yes
22869       continue
22870     fi
22871    ac_cv_prog_WINLD="link"
22872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22873    break 2
22874  fi
22875done
22876  done
22877IFS=$as_save_IFS
22878
22879if test $ac_prog_rejected = yes; then
22880  # We found a bogon in the path, so make sure we never use it.
22881  set dummy $ac_cv_prog_WINLD
22882  shift
22883  if test $# != 0; then
22884    # We chose a different compiler from the bogus one.
22885    # However, it has the same basename, so the bogon will be chosen
22886    # first if we set WINLD to just the basename; use the full file name.
22887    shift
22888    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22889  fi
22890fi
22891fi
22892fi
22893WINLD=$ac_cv_prog_WINLD
22894if test -n "$WINLD"; then
22895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22896$as_echo "$WINLD" >&6; }
22897else
22898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22899$as_echo "no" >&6; }
22900fi
22901
22902
22903    # Since we must ignore the first found link, WINLD will contain
22904    # the full path to the link.exe program.
22905
22906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22907
22908  # First separate the path from the arguments. This will split at the first
22909  # space.
22910  complete="$WINLD"
22911  path="${complete%% *}"
22912  tmp="$complete EOL"
22913  arguments="${tmp#* }"
22914
22915  # Input might be given as Windows format, start by converting to
22916  # unix format.
22917  new_path=`$CYGPATH -u "$path"`
22918
22919  # Now try to locate executable using which
22920  new_path=`$WHICH "$new_path" 2> /dev/null`
22921  # bat and cmd files are not always considered executable in cygwin causing which
22922  # to not find them
22923  if test "x$new_path" = x \
22924      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22925      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22926    new_path=`$CYGPATH -u "$path"`
22927  fi
22928  if test "x$new_path" = x; then
22929    # Oops. Which didn't find the executable.
22930    # The splitting of arguments from the executable at a space might have been incorrect,
22931    # since paths with space are more likely in Windows. Give it another try with the whole
22932    # argument.
22933    path="$complete"
22934    arguments="EOL"
22935    new_path=`$CYGPATH -u "$path"`
22936    new_path=`$WHICH "$new_path" 2> /dev/null`
22937    # bat and cmd files are not always considered executable in cygwin causing which
22938    # to not find them
22939    if test "x$new_path" = x \
22940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22942      new_path=`$CYGPATH -u "$path"`
22943    fi
22944    if test "x$new_path" = x; then
22945      # It's still not found. Now this is an unrecoverable error.
22946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22947$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22948      has_space=`$ECHO "$complete" | $GREP " "`
22949      if test "x$has_space" != x; then
22950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22952      fi
22953      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22954    fi
22955  fi
22956
22957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22960  # "foo.exe" is OK but "foo" is an error.
22961  #
22962  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22963  # It is also a way to make sure we got the proper file name for the real test later on.
22964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22965  if test "x$test_shortpath" = x; then
22966    # Short path failed, file does not exist as specified.
22967    # Try adding .exe or .cmd
22968    if test -f "${new_path}.exe"; then
22969      input_to_shortpath="${new_path}.exe"
22970    elif test -f "${new_path}.cmd"; then
22971      input_to_shortpath="${new_path}.cmd"
22972    else
22973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22974$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22975      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22976$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22977      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22978    fi
22979  else
22980    input_to_shortpath="$new_path"
22981  fi
22982
22983  # Call helper function which possibly converts this using DOS-style short mode.
22984  # If so, the updated path is stored in $new_path.
22985  new_path="$input_to_shortpath"
22986
22987  input_path="$input_to_shortpath"
22988  # Check if we need to convert this using DOS-style short mode. If the path
22989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22990  # take no chances and rewrite it.
22991  # Note: m4 eats our [], so we need to use [ and ] instead.
22992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22993  if test "x$has_forbidden_chars" != x; then
22994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22998      # Going to short mode and back again did indeed matter. Since short mode is
22999      # case insensitive, let's make it lowercase to improve readability.
23000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23001      # Now convert it back to Unix-stile (cygpath)
23002      input_path=`$CYGPATH -u "$shortmode_path"`
23003      new_path="$input_path"
23004    fi
23005  fi
23006
23007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23008  if test "x$test_cygdrive_prefix" = x; then
23009    # As a simple fix, exclude /usr/bin since it's not a real path.
23010    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23012      # a path prefixed by /cygdrive for fixpath to work.
23013      new_path="$CYGWIN_ROOT_PATH$input_path"
23014    fi
23015  fi
23016
23017  # remove trailing .exe if any
23018  new_path="${new_path/%.exe/}"
23019
23020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23021
23022  # First separate the path from the arguments. This will split at the first
23023  # space.
23024  complete="$WINLD"
23025  path="${complete%% *}"
23026  tmp="$complete EOL"
23027  arguments="${tmp#* }"
23028
23029  # Input might be given as Windows format, start by converting to
23030  # unix format.
23031  new_path="$path"
23032
23033  windows_path="$new_path"
23034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23035    unix_path=`$CYGPATH -u "$windows_path"`
23036    new_path="$unix_path"
23037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23039    new_path="$unix_path"
23040  fi
23041
23042
23043  # Now try to locate executable using which
23044  new_path=`$WHICH "$new_path" 2> /dev/null`
23045
23046  if test "x$new_path" = x; then
23047    # Oops. Which didn't find the executable.
23048    # The splitting of arguments from the executable at a space might have been incorrect,
23049    # since paths with space are more likely in Windows. Give it another try with the whole
23050    # argument.
23051    path="$complete"
23052    arguments="EOL"
23053    new_path="$path"
23054
23055  windows_path="$new_path"
23056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23057    unix_path=`$CYGPATH -u "$windows_path"`
23058    new_path="$unix_path"
23059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23061    new_path="$unix_path"
23062  fi
23063
23064
23065    new_path=`$WHICH "$new_path" 2> /dev/null`
23066
23067    if test "x$new_path" = x; then
23068      # It's still not found. Now this is an unrecoverable error.
23069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23070$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23071      has_space=`$ECHO "$complete" | $GREP " "`
23072      if test "x$has_space" != x; then
23073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23075      fi
23076      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23077    fi
23078  fi
23079
23080  # Now new_path has a complete unix path to the binary
23081  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23082    # Keep paths in /bin as-is, but remove trailing .exe if any
23083    new_path="${new_path/%.exe/}"
23084    # Do not save /bin paths to all_fixpath_prefixes!
23085  else
23086    # Not in mixed or Windows style, start by that.
23087    new_path=`cmd //c echo $new_path`
23088
23089  input_path="$new_path"
23090  # Check if we need to convert this using DOS-style short mode. If the path
23091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23092  # take no chances and rewrite it.
23093  # Note: m4 eats our [], so we need to use [ and ] instead.
23094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23095  if test "x$has_forbidden_chars" != x; then
23096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23098  fi
23099
23100    # Output is in $new_path
23101
23102  windows_path="$new_path"
23103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23104    unix_path=`$CYGPATH -u "$windows_path"`
23105    new_path="$unix_path"
23106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23108    new_path="$unix_path"
23109  fi
23110
23111    # remove trailing .exe if any
23112    new_path="${new_path/%.exe/}"
23113
23114    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23115    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23116  fi
23117
23118  else
23119    # We're on a posix platform. Hooray! :)
23120    # First separate the path from the arguments. This will split at the first
23121    # space.
23122    complete="$WINLD"
23123    path="${complete%% *}"
23124    tmp="$complete EOL"
23125    arguments="${tmp#* }"
23126
23127    # Cannot rely on the command "which" here since it doesn't always work.
23128    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23129    if test -z "$is_absolute_path"; then
23130      # Path to executable is not absolute. Find it.
23131      IFS_save="$IFS"
23132      IFS=:
23133      for p in $PATH; do
23134        if test -f "$p/$path" && test -x "$p/$path"; then
23135          new_path="$p/$path"
23136          break
23137        fi
23138      done
23139      IFS="$IFS_save"
23140    else
23141      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23142$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23143      new_path="$path"
23144    fi
23145
23146    if test "x$new_path" = x; then
23147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23148$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23149      has_space=`$ECHO "$complete" | $GREP " "`
23150      if test "x$has_space" != x; then
23151        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23153      fi
23154      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23155    fi
23156  fi
23157
23158  # Now join together the path and the arguments once again
23159  if test "x$arguments" != xEOL; then
23160    new_complete="$new_path ${arguments% *}"
23161  else
23162    new_complete="$new_path"
23163  fi
23164
23165  if test "x$complete" != "x$new_complete"; then
23166    WINLD="$new_complete"
23167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23168$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23169  fi
23170
23171    printf "Windows linker was found at $WINLD\n"
23172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23173$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23174    "$WINLD" --version > /dev/null
23175    if test $? -eq 0 ; then
23176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23177$as_echo "no" >&6; }
23178      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23179    else
23180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23181$as_echo "yes" >&6; }
23182    fi
23183    LD="$WINLD"
23184    LDEXE="$WINLD"
23185    LDCXX="$WINLD"
23186    LDEXECXX="$WINLD"
23187
23188    # Extract the first word of "mt", so it can be a program name with args.
23189set dummy mt; ac_word=$2
23190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23191$as_echo_n "checking for $ac_word... " >&6; }
23192if ${ac_cv_prog_MT+:} false; then :
23193  $as_echo_n "(cached) " >&6
23194else
23195  if test -n "$MT"; then
23196  ac_cv_prog_MT="$MT" # Let the user override the test.
23197else
23198  ac_prog_rejected=no
23199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23200for as_dir in $PATH
23201do
23202  IFS=$as_save_IFS
23203  test -z "$as_dir" && as_dir=.
23204    for ac_exec_ext in '' $ac_executable_extensions; do
23205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23206    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23207       ac_prog_rejected=yes
23208       continue
23209     fi
23210    ac_cv_prog_MT="mt"
23211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23212    break 2
23213  fi
23214done
23215  done
23216IFS=$as_save_IFS
23217
23218if test $ac_prog_rejected = yes; then
23219  # We found a bogon in the path, so make sure we never use it.
23220  set dummy $ac_cv_prog_MT
23221  shift
23222  if test $# != 0; then
23223    # We chose a different compiler from the bogus one.
23224    # However, it has the same basename, so the bogon will be chosen
23225    # first if we set MT to just the basename; use the full file name.
23226    shift
23227    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23228  fi
23229fi
23230fi
23231fi
23232MT=$ac_cv_prog_MT
23233if test -n "$MT"; then
23234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23235$as_echo "$MT" >&6; }
23236else
23237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23238$as_echo "no" >&6; }
23239fi
23240
23241
23242
23243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23244
23245  # First separate the path from the arguments. This will split at the first
23246  # space.
23247  complete="$MT"
23248  path="${complete%% *}"
23249  tmp="$complete EOL"
23250  arguments="${tmp#* }"
23251
23252  # Input might be given as Windows format, start by converting to
23253  # unix format.
23254  new_path=`$CYGPATH -u "$path"`
23255
23256  # Now try to locate executable using which
23257  new_path=`$WHICH "$new_path" 2> /dev/null`
23258  # bat and cmd files are not always considered executable in cygwin causing which
23259  # to not find them
23260  if test "x$new_path" = x \
23261      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23262      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23263    new_path=`$CYGPATH -u "$path"`
23264  fi
23265  if test "x$new_path" = x; then
23266    # Oops. Which didn't find the executable.
23267    # The splitting of arguments from the executable at a space might have been incorrect,
23268    # since paths with space are more likely in Windows. Give it another try with the whole
23269    # argument.
23270    path="$complete"
23271    arguments="EOL"
23272    new_path=`$CYGPATH -u "$path"`
23273    new_path=`$WHICH "$new_path" 2> /dev/null`
23274    # bat and cmd files are not always considered executable in cygwin causing which
23275    # to not find them
23276    if test "x$new_path" = x \
23277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23279      new_path=`$CYGPATH -u "$path"`
23280    fi
23281    if test "x$new_path" = x; then
23282      # It's still not found. Now this is an unrecoverable error.
23283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23284$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23285      has_space=`$ECHO "$complete" | $GREP " "`
23286      if test "x$has_space" != x; then
23287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23289      fi
23290      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23291    fi
23292  fi
23293
23294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23297  # "foo.exe" is OK but "foo" is an error.
23298  #
23299  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23300  # It is also a way to make sure we got the proper file name for the real test later on.
23301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23302  if test "x$test_shortpath" = x; then
23303    # Short path failed, file does not exist as specified.
23304    # Try adding .exe or .cmd
23305    if test -f "${new_path}.exe"; then
23306      input_to_shortpath="${new_path}.exe"
23307    elif test -f "${new_path}.cmd"; then
23308      input_to_shortpath="${new_path}.cmd"
23309    else
23310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23311$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23314      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23315    fi
23316  else
23317    input_to_shortpath="$new_path"
23318  fi
23319
23320  # Call helper function which possibly converts this using DOS-style short mode.
23321  # If so, the updated path is stored in $new_path.
23322  new_path="$input_to_shortpath"
23323
23324  input_path="$input_to_shortpath"
23325  # Check if we need to convert this using DOS-style short mode. If the path
23326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23327  # take no chances and rewrite it.
23328  # Note: m4 eats our [], so we need to use [ and ] instead.
23329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23330  if test "x$has_forbidden_chars" != x; then
23331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23335      # Going to short mode and back again did indeed matter. Since short mode is
23336      # case insensitive, let's make it lowercase to improve readability.
23337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23338      # Now convert it back to Unix-stile (cygpath)
23339      input_path=`$CYGPATH -u "$shortmode_path"`
23340      new_path="$input_path"
23341    fi
23342  fi
23343
23344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23345  if test "x$test_cygdrive_prefix" = x; then
23346    # As a simple fix, exclude /usr/bin since it's not a real path.
23347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23349      # a path prefixed by /cygdrive for fixpath to work.
23350      new_path="$CYGWIN_ROOT_PATH$input_path"
23351    fi
23352  fi
23353
23354  # remove trailing .exe if any
23355  new_path="${new_path/%.exe/}"
23356
23357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23358
23359  # First separate the path from the arguments. This will split at the first
23360  # space.
23361  complete="$MT"
23362  path="${complete%% *}"
23363  tmp="$complete EOL"
23364  arguments="${tmp#* }"
23365
23366  # Input might be given as Windows format, start by converting to
23367  # unix format.
23368  new_path="$path"
23369
23370  windows_path="$new_path"
23371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23372    unix_path=`$CYGPATH -u "$windows_path"`
23373    new_path="$unix_path"
23374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23376    new_path="$unix_path"
23377  fi
23378
23379
23380  # Now try to locate executable using which
23381  new_path=`$WHICH "$new_path" 2> /dev/null`
23382
23383  if test "x$new_path" = x; then
23384    # Oops. Which didn't find the executable.
23385    # The splitting of arguments from the executable at a space might have been incorrect,
23386    # since paths with space are more likely in Windows. Give it another try with the whole
23387    # argument.
23388    path="$complete"
23389    arguments="EOL"
23390    new_path="$path"
23391
23392  windows_path="$new_path"
23393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23394    unix_path=`$CYGPATH -u "$windows_path"`
23395    new_path="$unix_path"
23396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23398    new_path="$unix_path"
23399  fi
23400
23401
23402    new_path=`$WHICH "$new_path" 2> /dev/null`
23403
23404    if test "x$new_path" = x; then
23405      # It's still not found. Now this is an unrecoverable error.
23406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23407$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23408      has_space=`$ECHO "$complete" | $GREP " "`
23409      if test "x$has_space" != x; then
23410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23412      fi
23413      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23414    fi
23415  fi
23416
23417  # Now new_path has a complete unix path to the binary
23418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23419    # Keep paths in /bin as-is, but remove trailing .exe if any
23420    new_path="${new_path/%.exe/}"
23421    # Do not save /bin paths to all_fixpath_prefixes!
23422  else
23423    # Not in mixed or Windows style, start by that.
23424    new_path=`cmd //c echo $new_path`
23425
23426  input_path="$new_path"
23427  # Check if we need to convert this using DOS-style short mode. If the path
23428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23429  # take no chances and rewrite it.
23430  # Note: m4 eats our [], so we need to use [ and ] instead.
23431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23432  if test "x$has_forbidden_chars" != x; then
23433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23435  fi
23436
23437    # Output is in $new_path
23438
23439  windows_path="$new_path"
23440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23441    unix_path=`$CYGPATH -u "$windows_path"`
23442    new_path="$unix_path"
23443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23445    new_path="$unix_path"
23446  fi
23447
23448    # remove trailing .exe if any
23449    new_path="${new_path/%.exe/}"
23450
23451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23453  fi
23454
23455  else
23456    # We're on a posix platform. Hooray! :)
23457    # First separate the path from the arguments. This will split at the first
23458    # space.
23459    complete="$MT"
23460    path="${complete%% *}"
23461    tmp="$complete EOL"
23462    arguments="${tmp#* }"
23463
23464    # Cannot rely on the command "which" here since it doesn't always work.
23465    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23466    if test -z "$is_absolute_path"; then
23467      # Path to executable is not absolute. Find it.
23468      IFS_save="$IFS"
23469      IFS=:
23470      for p in $PATH; do
23471        if test -f "$p/$path" && test -x "$p/$path"; then
23472          new_path="$p/$path"
23473          break
23474        fi
23475      done
23476      IFS="$IFS_save"
23477    else
23478      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23479$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23480      new_path="$path"
23481    fi
23482
23483    if test "x$new_path" = x; then
23484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23485$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23486      has_space=`$ECHO "$complete" | $GREP " "`
23487      if test "x$has_space" != x; then
23488        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23490      fi
23491      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23492    fi
23493  fi
23494
23495  # Now join together the path and the arguments once again
23496  if test "x$arguments" != xEOL; then
23497    new_complete="$new_path ${arguments% *}"
23498  else
23499    new_complete="$new_path"
23500  fi
23501
23502  if test "x$complete" != "x$new_complete"; then
23503    MT="$new_complete"
23504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23505$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23506  fi
23507
23508    # The resource compiler
23509    # Extract the first word of "rc", so it can be a program name with args.
23510set dummy rc; ac_word=$2
23511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23512$as_echo_n "checking for $ac_word... " >&6; }
23513if ${ac_cv_prog_RC+:} false; then :
23514  $as_echo_n "(cached) " >&6
23515else
23516  if test -n "$RC"; then
23517  ac_cv_prog_RC="$RC" # Let the user override the test.
23518else
23519  ac_prog_rejected=no
23520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23521for as_dir in $PATH
23522do
23523  IFS=$as_save_IFS
23524  test -z "$as_dir" && as_dir=.
23525    for ac_exec_ext in '' $ac_executable_extensions; do
23526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23527    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23528       ac_prog_rejected=yes
23529       continue
23530     fi
23531    ac_cv_prog_RC="rc"
23532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23533    break 2
23534  fi
23535done
23536  done
23537IFS=$as_save_IFS
23538
23539if test $ac_prog_rejected = yes; then
23540  # We found a bogon in the path, so make sure we never use it.
23541  set dummy $ac_cv_prog_RC
23542  shift
23543  if test $# != 0; then
23544    # We chose a different compiler from the bogus one.
23545    # However, it has the same basename, so the bogon will be chosen
23546    # first if we set RC to just the basename; use the full file name.
23547    shift
23548    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23549  fi
23550fi
23551fi
23552fi
23553RC=$ac_cv_prog_RC
23554if test -n "$RC"; then
23555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23556$as_echo "$RC" >&6; }
23557else
23558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23559$as_echo "no" >&6; }
23560fi
23561
23562
23563
23564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23565
23566  # First separate the path from the arguments. This will split at the first
23567  # space.
23568  complete="$RC"
23569  path="${complete%% *}"
23570  tmp="$complete EOL"
23571  arguments="${tmp#* }"
23572
23573  # Input might be given as Windows format, start by converting to
23574  # unix format.
23575  new_path=`$CYGPATH -u "$path"`
23576
23577  # Now try to locate executable using which
23578  new_path=`$WHICH "$new_path" 2> /dev/null`
23579  # bat and cmd files are not always considered executable in cygwin causing which
23580  # to not find them
23581  if test "x$new_path" = x \
23582      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23583      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23584    new_path=`$CYGPATH -u "$path"`
23585  fi
23586  if test "x$new_path" = x; then
23587    # Oops. Which didn't find the executable.
23588    # The splitting of arguments from the executable at a space might have been incorrect,
23589    # since paths with space are more likely in Windows. Give it another try with the whole
23590    # argument.
23591    path="$complete"
23592    arguments="EOL"
23593    new_path=`$CYGPATH -u "$path"`
23594    new_path=`$WHICH "$new_path" 2> /dev/null`
23595    # bat and cmd files are not always considered executable in cygwin causing which
23596    # to not find them
23597    if test "x$new_path" = x \
23598        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23599        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23600      new_path=`$CYGPATH -u "$path"`
23601    fi
23602    if test "x$new_path" = x; then
23603      # It's still not found. Now this is an unrecoverable error.
23604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23605$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23606      has_space=`$ECHO "$complete" | $GREP " "`
23607      if test "x$has_space" != x; then
23608        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23609$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23610      fi
23611      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23612    fi
23613  fi
23614
23615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23618  # "foo.exe" is OK but "foo" is an error.
23619  #
23620  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23621  # It is also a way to make sure we got the proper file name for the real test later on.
23622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23623  if test "x$test_shortpath" = x; then
23624    # Short path failed, file does not exist as specified.
23625    # Try adding .exe or .cmd
23626    if test -f "${new_path}.exe"; then
23627      input_to_shortpath="${new_path}.exe"
23628    elif test -f "${new_path}.cmd"; then
23629      input_to_shortpath="${new_path}.cmd"
23630    else
23631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23632$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23633      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23634$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23635      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23636    fi
23637  else
23638    input_to_shortpath="$new_path"
23639  fi
23640
23641  # Call helper function which possibly converts this using DOS-style short mode.
23642  # If so, the updated path is stored in $new_path.
23643  new_path="$input_to_shortpath"
23644
23645  input_path="$input_to_shortpath"
23646  # Check if we need to convert this using DOS-style short mode. If the path
23647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23648  # take no chances and rewrite it.
23649  # Note: m4 eats our [], so we need to use [ and ] instead.
23650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23651  if test "x$has_forbidden_chars" != x; then
23652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23656      # Going to short mode and back again did indeed matter. Since short mode is
23657      # case insensitive, let's make it lowercase to improve readability.
23658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23659      # Now convert it back to Unix-stile (cygpath)
23660      input_path=`$CYGPATH -u "$shortmode_path"`
23661      new_path="$input_path"
23662    fi
23663  fi
23664
23665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23666  if test "x$test_cygdrive_prefix" = x; then
23667    # As a simple fix, exclude /usr/bin since it's not a real path.
23668    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23670      # a path prefixed by /cygdrive for fixpath to work.
23671      new_path="$CYGWIN_ROOT_PATH$input_path"
23672    fi
23673  fi
23674
23675  # remove trailing .exe if any
23676  new_path="${new_path/%.exe/}"
23677
23678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23679
23680  # First separate the path from the arguments. This will split at the first
23681  # space.
23682  complete="$RC"
23683  path="${complete%% *}"
23684  tmp="$complete EOL"
23685  arguments="${tmp#* }"
23686
23687  # Input might be given as Windows format, start by converting to
23688  # unix format.
23689  new_path="$path"
23690
23691  windows_path="$new_path"
23692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23693    unix_path=`$CYGPATH -u "$windows_path"`
23694    new_path="$unix_path"
23695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23697    new_path="$unix_path"
23698  fi
23699
23700
23701  # Now try to locate executable using which
23702  new_path=`$WHICH "$new_path" 2> /dev/null`
23703
23704  if test "x$new_path" = x; then
23705    # Oops. Which didn't find the executable.
23706    # The splitting of arguments from the executable at a space might have been incorrect,
23707    # since paths with space are more likely in Windows. Give it another try with the whole
23708    # argument.
23709    path="$complete"
23710    arguments="EOL"
23711    new_path="$path"
23712
23713  windows_path="$new_path"
23714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23715    unix_path=`$CYGPATH -u "$windows_path"`
23716    new_path="$unix_path"
23717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23719    new_path="$unix_path"
23720  fi
23721
23722
23723    new_path=`$WHICH "$new_path" 2> /dev/null`
23724
23725    if test "x$new_path" = x; then
23726      # It's still not found. Now this is an unrecoverable error.
23727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23728$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23729      has_space=`$ECHO "$complete" | $GREP " "`
23730      if test "x$has_space" != x; then
23731        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23732$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23733      fi
23734      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23735    fi
23736  fi
23737
23738  # Now new_path has a complete unix path to the binary
23739  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23740    # Keep paths in /bin as-is, but remove trailing .exe if any
23741    new_path="${new_path/%.exe/}"
23742    # Do not save /bin paths to all_fixpath_prefixes!
23743  else
23744    # Not in mixed or Windows style, start by that.
23745    new_path=`cmd //c echo $new_path`
23746
23747  input_path="$new_path"
23748  # Check if we need to convert this using DOS-style short mode. If the path
23749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23750  # take no chances and rewrite it.
23751  # Note: m4 eats our [], so we need to use [ and ] instead.
23752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23753  if test "x$has_forbidden_chars" != x; then
23754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23756  fi
23757
23758    # Output is in $new_path
23759
23760  windows_path="$new_path"
23761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23762    unix_path=`$CYGPATH -u "$windows_path"`
23763    new_path="$unix_path"
23764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23766    new_path="$unix_path"
23767  fi
23768
23769    # remove trailing .exe if any
23770    new_path="${new_path/%.exe/}"
23771
23772    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23773    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23774  fi
23775
23776  else
23777    # We're on a posix platform. Hooray! :)
23778    # First separate the path from the arguments. This will split at the first
23779    # space.
23780    complete="$RC"
23781    path="${complete%% *}"
23782    tmp="$complete EOL"
23783    arguments="${tmp#* }"
23784
23785    # Cannot rely on the command "which" here since it doesn't always work.
23786    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23787    if test -z "$is_absolute_path"; then
23788      # Path to executable is not absolute. Find it.
23789      IFS_save="$IFS"
23790      IFS=:
23791      for p in $PATH; do
23792        if test -f "$p/$path" && test -x "$p/$path"; then
23793          new_path="$p/$path"
23794          break
23795        fi
23796      done
23797      IFS="$IFS_save"
23798    else
23799      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23800$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23801      new_path="$path"
23802    fi
23803
23804    if test "x$new_path" = x; then
23805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23806$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23807      has_space=`$ECHO "$complete" | $GREP " "`
23808      if test "x$has_space" != x; then
23809        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23810$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23811      fi
23812      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23813    fi
23814  fi
23815
23816  # Now join together the path and the arguments once again
23817  if test "x$arguments" != xEOL; then
23818    new_complete="$new_path ${arguments% *}"
23819  else
23820    new_complete="$new_path"
23821  fi
23822
23823  if test "x$complete" != "x$new_complete"; then
23824    RC="$new_complete"
23825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23826$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23827  fi
23828
23829
23830    # For hotspot, we need these in Windows mixed path,
23831    # so rewrite them all. Need added .exe suffix.
23832    HOTSPOT_CXX="$CXX.exe"
23833    HOTSPOT_LD="$LD.exe"
23834    HOTSPOT_MT="$MT.exe"
23835    HOTSPOT_RC="$RC.exe"
23836
23837  unix_path="$HOTSPOT_CXX"
23838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23839    windows_path=`$CYGPATH -m "$unix_path"`
23840    HOTSPOT_CXX="$windows_path"
23841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23842    windows_path=`cmd //c echo $unix_path`
23843    HOTSPOT_CXX="$windows_path"
23844  fi
23845
23846
23847  unix_path="$HOTSPOT_LD"
23848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23849    windows_path=`$CYGPATH -m "$unix_path"`
23850    HOTSPOT_LD="$windows_path"
23851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23852    windows_path=`cmd //c echo $unix_path`
23853    HOTSPOT_LD="$windows_path"
23854  fi
23855
23856
23857  unix_path="$HOTSPOT_MT"
23858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23859    windows_path=`$CYGPATH -m "$unix_path"`
23860    HOTSPOT_MT="$windows_path"
23861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23862    windows_path=`cmd //c echo $unix_path`
23863    HOTSPOT_MT="$windows_path"
23864  fi
23865
23866
23867  unix_path="$HOTSPOT_RC"
23868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23869    windows_path=`$CYGPATH -m "$unix_path"`
23870    HOTSPOT_RC="$windows_path"
23871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23872    windows_path=`cmd //c echo $unix_path`
23873    HOTSPOT_RC="$windows_path"
23874  fi
23875
23876
23877
23878
23879    RC_FLAGS="-nologo -l 0x409 -r"
23880    if test "x$VARIANT" = xOPT; then :
23881
23882    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23883
23884fi
23885
23886  # The version variables used to create RC_FLAGS may be overridden
23887  # in a custom configure script, or possibly the command line.
23888  # Let those variables be expanded at make time in spec.gmk.
23889  # The \$ are escaped to the shell, and the $(...) variables
23890  # are evaluated by make.
23891  RC_FLAGS="$RC_FLAGS \
23892      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23893      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23894      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23895      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23896      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23897      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23898      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23899
23900  # lib.exe is used to create static libraries.
23901  # Extract the first word of "lib", so it can be a program name with args.
23902set dummy lib; ac_word=$2
23903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23904$as_echo_n "checking for $ac_word... " >&6; }
23905if ${ac_cv_prog_WINAR+:} false; then :
23906  $as_echo_n "(cached) " >&6
23907else
23908  if test -n "$WINAR"; then
23909  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23910else
23911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23912for as_dir in $PATH
23913do
23914  IFS=$as_save_IFS
23915  test -z "$as_dir" && as_dir=.
23916    for ac_exec_ext in '' $ac_executable_extensions; do
23917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23918    ac_cv_prog_WINAR="lib"
23919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23920    break 2
23921  fi
23922done
23923  done
23924IFS=$as_save_IFS
23925
23926fi
23927fi
23928WINAR=$ac_cv_prog_WINAR
23929if test -n "$WINAR"; then
23930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23931$as_echo "$WINAR" >&6; }
23932else
23933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23934$as_echo "no" >&6; }
23935fi
23936
23937
23938
23939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23940
23941  # First separate the path from the arguments. This will split at the first
23942  # space.
23943  complete="$WINAR"
23944  path="${complete%% *}"
23945  tmp="$complete EOL"
23946  arguments="${tmp#* }"
23947
23948  # Input might be given as Windows format, start by converting to
23949  # unix format.
23950  new_path=`$CYGPATH -u "$path"`
23951
23952  # Now try to locate executable using which
23953  new_path=`$WHICH "$new_path" 2> /dev/null`
23954  # bat and cmd files are not always considered executable in cygwin causing which
23955  # to not find them
23956  if test "x$new_path" = x \
23957      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23958      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23959    new_path=`$CYGPATH -u "$path"`
23960  fi
23961  if test "x$new_path" = x; then
23962    # Oops. Which didn't find the executable.
23963    # The splitting of arguments from the executable at a space might have been incorrect,
23964    # since paths with space are more likely in Windows. Give it another try with the whole
23965    # argument.
23966    path="$complete"
23967    arguments="EOL"
23968    new_path=`$CYGPATH -u "$path"`
23969    new_path=`$WHICH "$new_path" 2> /dev/null`
23970    # bat and cmd files are not always considered executable in cygwin causing which
23971    # to not find them
23972    if test "x$new_path" = x \
23973        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23974        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23975      new_path=`$CYGPATH -u "$path"`
23976    fi
23977    if test "x$new_path" = x; then
23978      # It's still not found. Now this is an unrecoverable error.
23979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23980$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23981      has_space=`$ECHO "$complete" | $GREP " "`
23982      if test "x$has_space" != x; then
23983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23985      fi
23986      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23987    fi
23988  fi
23989
23990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23993  # "foo.exe" is OK but "foo" is an error.
23994  #
23995  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23996  # It is also a way to make sure we got the proper file name for the real test later on.
23997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23998  if test "x$test_shortpath" = x; then
23999    # Short path failed, file does not exist as specified.
24000    # Try adding .exe or .cmd
24001    if test -f "${new_path}.exe"; then
24002      input_to_shortpath="${new_path}.exe"
24003    elif test -f "${new_path}.cmd"; then
24004      input_to_shortpath="${new_path}.cmd"
24005    else
24006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24007$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24008      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24009$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24010      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24011    fi
24012  else
24013    input_to_shortpath="$new_path"
24014  fi
24015
24016  # Call helper function which possibly converts this using DOS-style short mode.
24017  # If so, the updated path is stored in $new_path.
24018  new_path="$input_to_shortpath"
24019
24020  input_path="$input_to_shortpath"
24021  # Check if we need to convert this using DOS-style short mode. If the path
24022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24023  # take no chances and rewrite it.
24024  # Note: m4 eats our [], so we need to use [ and ] instead.
24025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24026  if test "x$has_forbidden_chars" != x; then
24027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24031      # Going to short mode and back again did indeed matter. Since short mode is
24032      # case insensitive, let's make it lowercase to improve readability.
24033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24034      # Now convert it back to Unix-stile (cygpath)
24035      input_path=`$CYGPATH -u "$shortmode_path"`
24036      new_path="$input_path"
24037    fi
24038  fi
24039
24040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24041  if test "x$test_cygdrive_prefix" = x; then
24042    # As a simple fix, exclude /usr/bin since it's not a real path.
24043    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24045      # a path prefixed by /cygdrive for fixpath to work.
24046      new_path="$CYGWIN_ROOT_PATH$input_path"
24047    fi
24048  fi
24049
24050  # remove trailing .exe if any
24051  new_path="${new_path/%.exe/}"
24052
24053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24054
24055  # First separate the path from the arguments. This will split at the first
24056  # space.
24057  complete="$WINAR"
24058  path="${complete%% *}"
24059  tmp="$complete EOL"
24060  arguments="${tmp#* }"
24061
24062  # Input might be given as Windows format, start by converting to
24063  # unix format.
24064  new_path="$path"
24065
24066  windows_path="$new_path"
24067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24068    unix_path=`$CYGPATH -u "$windows_path"`
24069    new_path="$unix_path"
24070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24072    new_path="$unix_path"
24073  fi
24074
24075
24076  # Now try to locate executable using which
24077  new_path=`$WHICH "$new_path" 2> /dev/null`
24078
24079  if test "x$new_path" = x; then
24080    # Oops. Which didn't find the executable.
24081    # The splitting of arguments from the executable at a space might have been incorrect,
24082    # since paths with space are more likely in Windows. Give it another try with the whole
24083    # argument.
24084    path="$complete"
24085    arguments="EOL"
24086    new_path="$path"
24087
24088  windows_path="$new_path"
24089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24090    unix_path=`$CYGPATH -u "$windows_path"`
24091    new_path="$unix_path"
24092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24094    new_path="$unix_path"
24095  fi
24096
24097
24098    new_path=`$WHICH "$new_path" 2> /dev/null`
24099
24100    if test "x$new_path" = x; then
24101      # It's still not found. Now this is an unrecoverable error.
24102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24103$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24104      has_space=`$ECHO "$complete" | $GREP " "`
24105      if test "x$has_space" != x; then
24106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24108      fi
24109      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24110    fi
24111  fi
24112
24113  # Now new_path has a complete unix path to the binary
24114  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24115    # Keep paths in /bin as-is, but remove trailing .exe if any
24116    new_path="${new_path/%.exe/}"
24117    # Do not save /bin paths to all_fixpath_prefixes!
24118  else
24119    # Not in mixed or Windows style, start by that.
24120    new_path=`cmd //c echo $new_path`
24121
24122  input_path="$new_path"
24123  # Check if we need to convert this using DOS-style short mode. If the path
24124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24125  # take no chances and rewrite it.
24126  # Note: m4 eats our [], so we need to use [ and ] instead.
24127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24128  if test "x$has_forbidden_chars" != x; then
24129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24131  fi
24132
24133    # Output is in $new_path
24134
24135  windows_path="$new_path"
24136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24137    unix_path=`$CYGPATH -u "$windows_path"`
24138    new_path="$unix_path"
24139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24141    new_path="$unix_path"
24142  fi
24143
24144    # remove trailing .exe if any
24145    new_path="${new_path/%.exe/}"
24146
24147    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24148    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24149  fi
24150
24151  else
24152    # We're on a posix platform. Hooray! :)
24153    # First separate the path from the arguments. This will split at the first
24154    # space.
24155    complete="$WINAR"
24156    path="${complete%% *}"
24157    tmp="$complete EOL"
24158    arguments="${tmp#* }"
24159
24160    # Cannot rely on the command "which" here since it doesn't always work.
24161    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24162    if test -z "$is_absolute_path"; then
24163      # Path to executable is not absolute. Find it.
24164      IFS_save="$IFS"
24165      IFS=:
24166      for p in $PATH; do
24167        if test -f "$p/$path" && test -x "$p/$path"; then
24168          new_path="$p/$path"
24169          break
24170        fi
24171      done
24172      IFS="$IFS_save"
24173    else
24174      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24175$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24176      new_path="$path"
24177    fi
24178
24179    if test "x$new_path" = x; then
24180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24181$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24182      has_space=`$ECHO "$complete" | $GREP " "`
24183      if test "x$has_space" != x; then
24184        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24185$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24186      fi
24187      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24188    fi
24189  fi
24190
24191  # Now join together the path and the arguments once again
24192  if test "x$arguments" != xEOL; then
24193    new_complete="$new_path ${arguments% *}"
24194  else
24195    new_complete="$new_path"
24196  fi
24197
24198  if test "x$complete" != "x$new_complete"; then
24199    WINAR="$new_complete"
24200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24201$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24202  fi
24203
24204  AR="$WINAR"
24205  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24206
24207  # Extract the first word of "dumpbin", so it can be a program name with args.
24208set dummy dumpbin; ac_word=$2
24209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24210$as_echo_n "checking for $ac_word... " >&6; }
24211if ${ac_cv_prog_DUMPBIN+:} false; then :
24212  $as_echo_n "(cached) " >&6
24213else
24214  if test -n "$DUMPBIN"; then
24215  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24216else
24217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24218for as_dir in $PATH
24219do
24220  IFS=$as_save_IFS
24221  test -z "$as_dir" && as_dir=.
24222    for ac_exec_ext in '' $ac_executable_extensions; do
24223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24224    ac_cv_prog_DUMPBIN="dumpbin"
24225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24226    break 2
24227  fi
24228done
24229  done
24230IFS=$as_save_IFS
24231
24232fi
24233fi
24234DUMPBIN=$ac_cv_prog_DUMPBIN
24235if test -n "$DUMPBIN"; then
24236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24237$as_echo "$DUMPBIN" >&6; }
24238else
24239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24240$as_echo "no" >&6; }
24241fi
24242
24243
24244
24245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24246
24247  # First separate the path from the arguments. This will split at the first
24248  # space.
24249  complete="$DUMPBIN"
24250  path="${complete%% *}"
24251  tmp="$complete EOL"
24252  arguments="${tmp#* }"
24253
24254  # Input might be given as Windows format, start by converting to
24255  # unix format.
24256  new_path=`$CYGPATH -u "$path"`
24257
24258  # Now try to locate executable using which
24259  new_path=`$WHICH "$new_path" 2> /dev/null`
24260  # bat and cmd files are not always considered executable in cygwin causing which
24261  # to not find them
24262  if test "x$new_path" = x \
24263      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24264      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24265    new_path=`$CYGPATH -u "$path"`
24266  fi
24267  if test "x$new_path" = x; then
24268    # Oops. Which didn't find the executable.
24269    # The splitting of arguments from the executable at a space might have been incorrect,
24270    # since paths with space are more likely in Windows. Give it another try with the whole
24271    # argument.
24272    path="$complete"
24273    arguments="EOL"
24274    new_path=`$CYGPATH -u "$path"`
24275    new_path=`$WHICH "$new_path" 2> /dev/null`
24276    # bat and cmd files are not always considered executable in cygwin causing which
24277    # to not find them
24278    if test "x$new_path" = x \
24279        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24280        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24281      new_path=`$CYGPATH -u "$path"`
24282    fi
24283    if test "x$new_path" = x; then
24284      # It's still not found. Now this is an unrecoverable error.
24285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24286$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24287      has_space=`$ECHO "$complete" | $GREP " "`
24288      if test "x$has_space" != x; then
24289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24291      fi
24292      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24293    fi
24294  fi
24295
24296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24299  # "foo.exe" is OK but "foo" is an error.
24300  #
24301  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24302  # It is also a way to make sure we got the proper file name for the real test later on.
24303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24304  if test "x$test_shortpath" = x; then
24305    # Short path failed, file does not exist as specified.
24306    # Try adding .exe or .cmd
24307    if test -f "${new_path}.exe"; then
24308      input_to_shortpath="${new_path}.exe"
24309    elif test -f "${new_path}.cmd"; then
24310      input_to_shortpath="${new_path}.cmd"
24311    else
24312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24313$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24316      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24317    fi
24318  else
24319    input_to_shortpath="$new_path"
24320  fi
24321
24322  # Call helper function which possibly converts this using DOS-style short mode.
24323  # If so, the updated path is stored in $new_path.
24324  new_path="$input_to_shortpath"
24325
24326  input_path="$input_to_shortpath"
24327  # Check if we need to convert this using DOS-style short mode. If the path
24328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24329  # take no chances and rewrite it.
24330  # Note: m4 eats our [], so we need to use [ and ] instead.
24331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24332  if test "x$has_forbidden_chars" != x; then
24333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24337      # Going to short mode and back again did indeed matter. Since short mode is
24338      # case insensitive, let's make it lowercase to improve readability.
24339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24340      # Now convert it back to Unix-stile (cygpath)
24341      input_path=`$CYGPATH -u "$shortmode_path"`
24342      new_path="$input_path"
24343    fi
24344  fi
24345
24346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24347  if test "x$test_cygdrive_prefix" = x; then
24348    # As a simple fix, exclude /usr/bin since it's not a real path.
24349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24351      # a path prefixed by /cygdrive for fixpath to work.
24352      new_path="$CYGWIN_ROOT_PATH$input_path"
24353    fi
24354  fi
24355
24356  # remove trailing .exe if any
24357  new_path="${new_path/%.exe/}"
24358
24359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24360
24361  # First separate the path from the arguments. This will split at the first
24362  # space.
24363  complete="$DUMPBIN"
24364  path="${complete%% *}"
24365  tmp="$complete EOL"
24366  arguments="${tmp#* }"
24367
24368  # Input might be given as Windows format, start by converting to
24369  # unix format.
24370  new_path="$path"
24371
24372  windows_path="$new_path"
24373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24374    unix_path=`$CYGPATH -u "$windows_path"`
24375    new_path="$unix_path"
24376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24378    new_path="$unix_path"
24379  fi
24380
24381
24382  # Now try to locate executable using which
24383  new_path=`$WHICH "$new_path" 2> /dev/null`
24384
24385  if test "x$new_path" = x; then
24386    # Oops. Which didn't find the executable.
24387    # The splitting of arguments from the executable at a space might have been incorrect,
24388    # since paths with space are more likely in Windows. Give it another try with the whole
24389    # argument.
24390    path="$complete"
24391    arguments="EOL"
24392    new_path="$path"
24393
24394  windows_path="$new_path"
24395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24396    unix_path=`$CYGPATH -u "$windows_path"`
24397    new_path="$unix_path"
24398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24400    new_path="$unix_path"
24401  fi
24402
24403
24404    new_path=`$WHICH "$new_path" 2> /dev/null`
24405
24406    if test "x$new_path" = x; then
24407      # It's still not found. Now this is an unrecoverable error.
24408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24409$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24410      has_space=`$ECHO "$complete" | $GREP " "`
24411      if test "x$has_space" != x; then
24412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24414      fi
24415      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24416    fi
24417  fi
24418
24419  # Now new_path has a complete unix path to the binary
24420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24421    # Keep paths in /bin as-is, but remove trailing .exe if any
24422    new_path="${new_path/%.exe/}"
24423    # Do not save /bin paths to all_fixpath_prefixes!
24424  else
24425    # Not in mixed or Windows style, start by that.
24426    new_path=`cmd //c echo $new_path`
24427
24428  input_path="$new_path"
24429  # Check if we need to convert this using DOS-style short mode. If the path
24430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24431  # take no chances and rewrite it.
24432  # Note: m4 eats our [], so we need to use [ and ] instead.
24433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24434  if test "x$has_forbidden_chars" != x; then
24435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24437  fi
24438
24439    # Output is in $new_path
24440
24441  windows_path="$new_path"
24442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24443    unix_path=`$CYGPATH -u "$windows_path"`
24444    new_path="$unix_path"
24445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24447    new_path="$unix_path"
24448  fi
24449
24450    # remove trailing .exe if any
24451    new_path="${new_path/%.exe/}"
24452
24453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24455  fi
24456
24457  else
24458    # We're on a posix platform. Hooray! :)
24459    # First separate the path from the arguments. This will split at the first
24460    # space.
24461    complete="$DUMPBIN"
24462    path="${complete%% *}"
24463    tmp="$complete EOL"
24464    arguments="${tmp#* }"
24465
24466    # Cannot rely on the command "which" here since it doesn't always work.
24467    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24468    if test -z "$is_absolute_path"; then
24469      # Path to executable is not absolute. Find it.
24470      IFS_save="$IFS"
24471      IFS=:
24472      for p in $PATH; do
24473        if test -f "$p/$path" && test -x "$p/$path"; then
24474          new_path="$p/$path"
24475          break
24476        fi
24477      done
24478      IFS="$IFS_save"
24479    else
24480      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24481$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24482      new_path="$path"
24483    fi
24484
24485    if test "x$new_path" = x; then
24486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24487$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24488      has_space=`$ECHO "$complete" | $GREP " "`
24489      if test "x$has_space" != x; then
24490        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24492      fi
24493      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24494    fi
24495  fi
24496
24497  # Now join together the path and the arguments once again
24498  if test "x$arguments" != xEOL; then
24499    new_complete="$new_path ${arguments% *}"
24500  else
24501    new_complete="$new_path"
24502  fi
24503
24504  if test "x$complete" != "x$new_complete"; then
24505    DUMPBIN="$new_complete"
24506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24507$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24508  fi
24509
24510
24511      COMPILER_TYPE=CL
24512      CCXXFLAGS="$CCXXFLAGS -nologo"
24513
24514fi
24515
24516
24517
24518  ac_ext=c
24519ac_cpp='$CPP $CPPFLAGS'
24520ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24521ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24522ac_compiler_gnu=$ac_cv_c_compiler_gnu
24523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24524$as_echo_n "checking how to run the C preprocessor... " >&6; }
24525# On Suns, sometimes $CPP names a directory.
24526if test -n "$CPP" && test -d "$CPP"; then
24527  CPP=
24528fi
24529if test -z "$CPP"; then
24530  if ${ac_cv_prog_CPP+:} false; then :
24531  $as_echo_n "(cached) " >&6
24532else
24533      # Double quotes because CPP needs to be expanded
24534    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24535    do
24536      ac_preproc_ok=false
24537for ac_c_preproc_warn_flag in '' yes
24538do
24539  # Use a header file that comes with gcc, so configuring glibc
24540  # with a fresh cross-compiler works.
24541  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24542  # <limits.h> exists even on freestanding compilers.
24543  # On the NeXT, cc -E runs the code through the compiler's parser,
24544  # not just through cpp. "Syntax error" is here to catch this case.
24545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24546/* end confdefs.h.  */
24547#ifdef __STDC__
24548# include <limits.h>
24549#else
24550# include <assert.h>
24551#endif
24552		     Syntax error
24553_ACEOF
24554if ac_fn_c_try_cpp "$LINENO"; then :
24555
24556else
24557  # Broken: fails on valid input.
24558continue
24559fi
24560rm -f conftest.err conftest.i conftest.$ac_ext
24561
24562  # OK, works on sane cases.  Now check whether nonexistent headers
24563  # can be detected and how.
24564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24565/* end confdefs.h.  */
24566#include <ac_nonexistent.h>
24567_ACEOF
24568if ac_fn_c_try_cpp "$LINENO"; then :
24569  # Broken: success on invalid input.
24570continue
24571else
24572  # Passes both tests.
24573ac_preproc_ok=:
24574break
24575fi
24576rm -f conftest.err conftest.i conftest.$ac_ext
24577
24578done
24579# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24580rm -f conftest.i conftest.err conftest.$ac_ext
24581if $ac_preproc_ok; then :
24582  break
24583fi
24584
24585    done
24586    ac_cv_prog_CPP=$CPP
24587
24588fi
24589  CPP=$ac_cv_prog_CPP
24590else
24591  ac_cv_prog_CPP=$CPP
24592fi
24593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24594$as_echo "$CPP" >&6; }
24595ac_preproc_ok=false
24596for ac_c_preproc_warn_flag in '' yes
24597do
24598  # Use a header file that comes with gcc, so configuring glibc
24599  # with a fresh cross-compiler works.
24600  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24601  # <limits.h> exists even on freestanding compilers.
24602  # On the NeXT, cc -E runs the code through the compiler's parser,
24603  # not just through cpp. "Syntax error" is here to catch this case.
24604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24605/* end confdefs.h.  */
24606#ifdef __STDC__
24607# include <limits.h>
24608#else
24609# include <assert.h>
24610#endif
24611		     Syntax error
24612_ACEOF
24613if ac_fn_c_try_cpp "$LINENO"; then :
24614
24615else
24616  # Broken: fails on valid input.
24617continue
24618fi
24619rm -f conftest.err conftest.i conftest.$ac_ext
24620
24621  # OK, works on sane cases.  Now check whether nonexistent headers
24622  # can be detected and how.
24623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24624/* end confdefs.h.  */
24625#include <ac_nonexistent.h>
24626_ACEOF
24627if ac_fn_c_try_cpp "$LINENO"; then :
24628  # Broken: success on invalid input.
24629continue
24630else
24631  # Passes both tests.
24632ac_preproc_ok=:
24633break
24634fi
24635rm -f conftest.err conftest.i conftest.$ac_ext
24636
24637done
24638# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24639rm -f conftest.i conftest.err conftest.$ac_ext
24640if $ac_preproc_ok; then :
24641
24642else
24643  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24645as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24646See \`config.log' for more details" "$LINENO" 5; }
24647fi
24648
24649ac_ext=cpp
24650ac_cpp='$CXXCPP $CPPFLAGS'
24651ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24652ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24653ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24654
24655
24656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24657
24658  # First separate the path from the arguments. This will split at the first
24659  # space.
24660  complete="$CPP"
24661  path="${complete%% *}"
24662  tmp="$complete EOL"
24663  arguments="${tmp#* }"
24664
24665  # Input might be given as Windows format, start by converting to
24666  # unix format.
24667  new_path=`$CYGPATH -u "$path"`
24668
24669  # Now try to locate executable using which
24670  new_path=`$WHICH "$new_path" 2> /dev/null`
24671  # bat and cmd files are not always considered executable in cygwin causing which
24672  # to not find them
24673  if test "x$new_path" = x \
24674      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24675      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24676    new_path=`$CYGPATH -u "$path"`
24677  fi
24678  if test "x$new_path" = x; then
24679    # Oops. Which didn't find the executable.
24680    # The splitting of arguments from the executable at a space might have been incorrect,
24681    # since paths with space are more likely in Windows. Give it another try with the whole
24682    # argument.
24683    path="$complete"
24684    arguments="EOL"
24685    new_path=`$CYGPATH -u "$path"`
24686    new_path=`$WHICH "$new_path" 2> /dev/null`
24687    # bat and cmd files are not always considered executable in cygwin causing which
24688    # to not find them
24689    if test "x$new_path" = x \
24690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24692      new_path=`$CYGPATH -u "$path"`
24693    fi
24694    if test "x$new_path" = x; then
24695      # It's still not found. Now this is an unrecoverable error.
24696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24697$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24698      has_space=`$ECHO "$complete" | $GREP " "`
24699      if test "x$has_space" != x; then
24700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24702      fi
24703      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24704    fi
24705  fi
24706
24707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24710  # "foo.exe" is OK but "foo" is an error.
24711  #
24712  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24713  # It is also a way to make sure we got the proper file name for the real test later on.
24714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24715  if test "x$test_shortpath" = x; then
24716    # Short path failed, file does not exist as specified.
24717    # Try adding .exe or .cmd
24718    if test -f "${new_path}.exe"; then
24719      input_to_shortpath="${new_path}.exe"
24720    elif test -f "${new_path}.cmd"; then
24721      input_to_shortpath="${new_path}.cmd"
24722    else
24723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24724$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24727      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24728    fi
24729  else
24730    input_to_shortpath="$new_path"
24731  fi
24732
24733  # Call helper function which possibly converts this using DOS-style short mode.
24734  # If so, the updated path is stored in $new_path.
24735  new_path="$input_to_shortpath"
24736
24737  input_path="$input_to_shortpath"
24738  # Check if we need to convert this using DOS-style short mode. If the path
24739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24740  # take no chances and rewrite it.
24741  # Note: m4 eats our [], so we need to use [ and ] instead.
24742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24743  if test "x$has_forbidden_chars" != x; then
24744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24748      # Going to short mode and back again did indeed matter. Since short mode is
24749      # case insensitive, let's make it lowercase to improve readability.
24750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24751      # Now convert it back to Unix-stile (cygpath)
24752      input_path=`$CYGPATH -u "$shortmode_path"`
24753      new_path="$input_path"
24754    fi
24755  fi
24756
24757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24758  if test "x$test_cygdrive_prefix" = x; then
24759    # As a simple fix, exclude /usr/bin since it's not a real path.
24760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24762      # a path prefixed by /cygdrive for fixpath to work.
24763      new_path="$CYGWIN_ROOT_PATH$input_path"
24764    fi
24765  fi
24766
24767  # remove trailing .exe if any
24768  new_path="${new_path/%.exe/}"
24769
24770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24771
24772  # First separate the path from the arguments. This will split at the first
24773  # space.
24774  complete="$CPP"
24775  path="${complete%% *}"
24776  tmp="$complete EOL"
24777  arguments="${tmp#* }"
24778
24779  # Input might be given as Windows format, start by converting to
24780  # unix format.
24781  new_path="$path"
24782
24783  windows_path="$new_path"
24784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24785    unix_path=`$CYGPATH -u "$windows_path"`
24786    new_path="$unix_path"
24787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24789    new_path="$unix_path"
24790  fi
24791
24792
24793  # Now try to locate executable using which
24794  new_path=`$WHICH "$new_path" 2> /dev/null`
24795
24796  if test "x$new_path" = x; then
24797    # Oops. Which didn't find the executable.
24798    # The splitting of arguments from the executable at a space might have been incorrect,
24799    # since paths with space are more likely in Windows. Give it another try with the whole
24800    # argument.
24801    path="$complete"
24802    arguments="EOL"
24803    new_path="$path"
24804
24805  windows_path="$new_path"
24806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24807    unix_path=`$CYGPATH -u "$windows_path"`
24808    new_path="$unix_path"
24809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24811    new_path="$unix_path"
24812  fi
24813
24814
24815    new_path=`$WHICH "$new_path" 2> /dev/null`
24816
24817    if test "x$new_path" = x; then
24818      # It's still not found. Now this is an unrecoverable error.
24819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24820$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24821      has_space=`$ECHO "$complete" | $GREP " "`
24822      if test "x$has_space" != x; then
24823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24825      fi
24826      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24827    fi
24828  fi
24829
24830  # Now new_path has a complete unix path to the binary
24831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24832    # Keep paths in /bin as-is, but remove trailing .exe if any
24833    new_path="${new_path/%.exe/}"
24834    # Do not save /bin paths to all_fixpath_prefixes!
24835  else
24836    # Not in mixed or Windows style, start by that.
24837    new_path=`cmd //c echo $new_path`
24838
24839  input_path="$new_path"
24840  # Check if we need to convert this using DOS-style short mode. If the path
24841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24842  # take no chances and rewrite it.
24843  # Note: m4 eats our [], so we need to use [ and ] instead.
24844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24845  if test "x$has_forbidden_chars" != x; then
24846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24848  fi
24849
24850    # Output is in $new_path
24851
24852  windows_path="$new_path"
24853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24854    unix_path=`$CYGPATH -u "$windows_path"`
24855    new_path="$unix_path"
24856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24858    new_path="$unix_path"
24859  fi
24860
24861    # remove trailing .exe if any
24862    new_path="${new_path/%.exe/}"
24863
24864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24866  fi
24867
24868  else
24869    # We're on a posix platform. Hooray! :)
24870    # First separate the path from the arguments. This will split at the first
24871    # space.
24872    complete="$CPP"
24873    path="${complete%% *}"
24874    tmp="$complete EOL"
24875    arguments="${tmp#* }"
24876
24877    # Cannot rely on the command "which" here since it doesn't always work.
24878    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24879    if test -z "$is_absolute_path"; then
24880      # Path to executable is not absolute. Find it.
24881      IFS_save="$IFS"
24882      IFS=:
24883      for p in $PATH; do
24884        if test -f "$p/$path" && test -x "$p/$path"; then
24885          new_path="$p/$path"
24886          break
24887        fi
24888      done
24889      IFS="$IFS_save"
24890    else
24891      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24892$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24893      new_path="$path"
24894    fi
24895
24896    if test "x$new_path" = x; then
24897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24898$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24899      has_space=`$ECHO "$complete" | $GREP " "`
24900      if test "x$has_space" != x; then
24901        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24903      fi
24904      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24905    fi
24906  fi
24907
24908  # Now join together the path and the arguments once again
24909  if test "x$arguments" != xEOL; then
24910    new_complete="$new_path ${arguments% *}"
24911  else
24912    new_complete="$new_path"
24913  fi
24914
24915  if test "x$complete" != "x$new_complete"; then
24916    CPP="$new_complete"
24917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24918$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24919  fi
24920
24921
24922  ac_ext=cpp
24923ac_cpp='$CXXCPP $CPPFLAGS'
24924ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24925ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24926ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24928$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24929if test -z "$CXXCPP"; then
24930  if ${ac_cv_prog_CXXCPP+:} false; then :
24931  $as_echo_n "(cached) " >&6
24932else
24933      # Double quotes because CXXCPP needs to be expanded
24934    for CXXCPP in "$CXX -E" "/lib/cpp"
24935    do
24936      ac_preproc_ok=false
24937for ac_cxx_preproc_warn_flag in '' yes
24938do
24939  # Use a header file that comes with gcc, so configuring glibc
24940  # with a fresh cross-compiler works.
24941  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24942  # <limits.h> exists even on freestanding compilers.
24943  # On the NeXT, cc -E runs the code through the compiler's parser,
24944  # not just through cpp. "Syntax error" is here to catch this case.
24945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24946/* end confdefs.h.  */
24947#ifdef __STDC__
24948# include <limits.h>
24949#else
24950# include <assert.h>
24951#endif
24952		     Syntax error
24953_ACEOF
24954if ac_fn_cxx_try_cpp "$LINENO"; then :
24955
24956else
24957  # Broken: fails on valid input.
24958continue
24959fi
24960rm -f conftest.err conftest.i conftest.$ac_ext
24961
24962  # OK, works on sane cases.  Now check whether nonexistent headers
24963  # can be detected and how.
24964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24965/* end confdefs.h.  */
24966#include <ac_nonexistent.h>
24967_ACEOF
24968if ac_fn_cxx_try_cpp "$LINENO"; then :
24969  # Broken: success on invalid input.
24970continue
24971else
24972  # Passes both tests.
24973ac_preproc_ok=:
24974break
24975fi
24976rm -f conftest.err conftest.i conftest.$ac_ext
24977
24978done
24979# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24980rm -f conftest.i conftest.err conftest.$ac_ext
24981if $ac_preproc_ok; then :
24982  break
24983fi
24984
24985    done
24986    ac_cv_prog_CXXCPP=$CXXCPP
24987
24988fi
24989  CXXCPP=$ac_cv_prog_CXXCPP
24990else
24991  ac_cv_prog_CXXCPP=$CXXCPP
24992fi
24993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24994$as_echo "$CXXCPP" >&6; }
24995ac_preproc_ok=false
24996for ac_cxx_preproc_warn_flag in '' yes
24997do
24998  # Use a header file that comes with gcc, so configuring glibc
24999  # with a fresh cross-compiler works.
25000  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25001  # <limits.h> exists even on freestanding compilers.
25002  # On the NeXT, cc -E runs the code through the compiler's parser,
25003  # not just through cpp. "Syntax error" is here to catch this case.
25004  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25005/* end confdefs.h.  */
25006#ifdef __STDC__
25007# include <limits.h>
25008#else
25009# include <assert.h>
25010#endif
25011		     Syntax error
25012_ACEOF
25013if ac_fn_cxx_try_cpp "$LINENO"; then :
25014
25015else
25016  # Broken: fails on valid input.
25017continue
25018fi
25019rm -f conftest.err conftest.i conftest.$ac_ext
25020
25021  # OK, works on sane cases.  Now check whether nonexistent headers
25022  # can be detected and how.
25023  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25024/* end confdefs.h.  */
25025#include <ac_nonexistent.h>
25026_ACEOF
25027if ac_fn_cxx_try_cpp "$LINENO"; then :
25028  # Broken: success on invalid input.
25029continue
25030else
25031  # Passes both tests.
25032ac_preproc_ok=:
25033break
25034fi
25035rm -f conftest.err conftest.i conftest.$ac_ext
25036
25037done
25038# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25039rm -f conftest.i conftest.err conftest.$ac_ext
25040if $ac_preproc_ok; then :
25041
25042else
25043  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25045as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25046See \`config.log' for more details" "$LINENO" 5; }
25047fi
25048
25049ac_ext=cpp
25050ac_cpp='$CXXCPP $CPPFLAGS'
25051ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25052ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25053ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25054
25055
25056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25057
25058  # First separate the path from the arguments. This will split at the first
25059  # space.
25060  complete="$CXXCPP"
25061  path="${complete%% *}"
25062  tmp="$complete EOL"
25063  arguments="${tmp#* }"
25064
25065  # Input might be given as Windows format, start by converting to
25066  # unix format.
25067  new_path=`$CYGPATH -u "$path"`
25068
25069  # Now try to locate executable using which
25070  new_path=`$WHICH "$new_path" 2> /dev/null`
25071  # bat and cmd files are not always considered executable in cygwin causing which
25072  # to not find them
25073  if test "x$new_path" = x \
25074      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25075      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25076    new_path=`$CYGPATH -u "$path"`
25077  fi
25078  if test "x$new_path" = x; then
25079    # Oops. Which didn't find the executable.
25080    # The splitting of arguments from the executable at a space might have been incorrect,
25081    # since paths with space are more likely in Windows. Give it another try with the whole
25082    # argument.
25083    path="$complete"
25084    arguments="EOL"
25085    new_path=`$CYGPATH -u "$path"`
25086    new_path=`$WHICH "$new_path" 2> /dev/null`
25087    # bat and cmd files are not always considered executable in cygwin causing which
25088    # to not find them
25089    if test "x$new_path" = x \
25090        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25091        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25092      new_path=`$CYGPATH -u "$path"`
25093    fi
25094    if test "x$new_path" = x; then
25095      # It's still not found. Now this is an unrecoverable error.
25096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25097$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25098      has_space=`$ECHO "$complete" | $GREP " "`
25099      if test "x$has_space" != x; then
25100        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25101$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25102      fi
25103      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25104    fi
25105  fi
25106
25107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25110  # "foo.exe" is OK but "foo" is an error.
25111  #
25112  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25113  # It is also a way to make sure we got the proper file name for the real test later on.
25114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25115  if test "x$test_shortpath" = x; then
25116    # Short path failed, file does not exist as specified.
25117    # Try adding .exe or .cmd
25118    if test -f "${new_path}.exe"; then
25119      input_to_shortpath="${new_path}.exe"
25120    elif test -f "${new_path}.cmd"; then
25121      input_to_shortpath="${new_path}.cmd"
25122    else
25123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25124$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25125      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25126$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25127      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25128    fi
25129  else
25130    input_to_shortpath="$new_path"
25131  fi
25132
25133  # Call helper function which possibly converts this using DOS-style short mode.
25134  # If so, the updated path is stored in $new_path.
25135  new_path="$input_to_shortpath"
25136
25137  input_path="$input_to_shortpath"
25138  # Check if we need to convert this using DOS-style short mode. If the path
25139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25140  # take no chances and rewrite it.
25141  # Note: m4 eats our [], so we need to use [ and ] instead.
25142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25143  if test "x$has_forbidden_chars" != x; then
25144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25148      # Going to short mode and back again did indeed matter. Since short mode is
25149      # case insensitive, let's make it lowercase to improve readability.
25150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25151      # Now convert it back to Unix-stile (cygpath)
25152      input_path=`$CYGPATH -u "$shortmode_path"`
25153      new_path="$input_path"
25154    fi
25155  fi
25156
25157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25158  if test "x$test_cygdrive_prefix" = x; then
25159    # As a simple fix, exclude /usr/bin since it's not a real path.
25160    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25162      # a path prefixed by /cygdrive for fixpath to work.
25163      new_path="$CYGWIN_ROOT_PATH$input_path"
25164    fi
25165  fi
25166
25167  # remove trailing .exe if any
25168  new_path="${new_path/%.exe/}"
25169
25170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25171
25172  # First separate the path from the arguments. This will split at the first
25173  # space.
25174  complete="$CXXCPP"
25175  path="${complete%% *}"
25176  tmp="$complete EOL"
25177  arguments="${tmp#* }"
25178
25179  # Input might be given as Windows format, start by converting to
25180  # unix format.
25181  new_path="$path"
25182
25183  windows_path="$new_path"
25184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25185    unix_path=`$CYGPATH -u "$windows_path"`
25186    new_path="$unix_path"
25187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25189    new_path="$unix_path"
25190  fi
25191
25192
25193  # Now try to locate executable using which
25194  new_path=`$WHICH "$new_path" 2> /dev/null`
25195
25196  if test "x$new_path" = x; then
25197    # Oops. Which didn't find the executable.
25198    # The splitting of arguments from the executable at a space might have been incorrect,
25199    # since paths with space are more likely in Windows. Give it another try with the whole
25200    # argument.
25201    path="$complete"
25202    arguments="EOL"
25203    new_path="$path"
25204
25205  windows_path="$new_path"
25206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25207    unix_path=`$CYGPATH -u "$windows_path"`
25208    new_path="$unix_path"
25209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25211    new_path="$unix_path"
25212  fi
25213
25214
25215    new_path=`$WHICH "$new_path" 2> /dev/null`
25216
25217    if test "x$new_path" = x; then
25218      # It's still not found. Now this is an unrecoverable error.
25219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25220$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25221      has_space=`$ECHO "$complete" | $GREP " "`
25222      if test "x$has_space" != x; then
25223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25225      fi
25226      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25227    fi
25228  fi
25229
25230  # Now new_path has a complete unix path to the binary
25231  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25232    # Keep paths in /bin as-is, but remove trailing .exe if any
25233    new_path="${new_path/%.exe/}"
25234    # Do not save /bin paths to all_fixpath_prefixes!
25235  else
25236    # Not in mixed or Windows style, start by that.
25237    new_path=`cmd //c echo $new_path`
25238
25239  input_path="$new_path"
25240  # Check if we need to convert this using DOS-style short mode. If the path
25241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25242  # take no chances and rewrite it.
25243  # Note: m4 eats our [], so we need to use [ and ] instead.
25244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25245  if test "x$has_forbidden_chars" != x; then
25246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25248  fi
25249
25250    # Output is in $new_path
25251
25252  windows_path="$new_path"
25253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25254    unix_path=`$CYGPATH -u "$windows_path"`
25255    new_path="$unix_path"
25256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25258    new_path="$unix_path"
25259  fi
25260
25261    # remove trailing .exe if any
25262    new_path="${new_path/%.exe/}"
25263
25264    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25265    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25266  fi
25267
25268  else
25269    # We're on a posix platform. Hooray! :)
25270    # First separate the path from the arguments. This will split at the first
25271    # space.
25272    complete="$CXXCPP"
25273    path="${complete%% *}"
25274    tmp="$complete EOL"
25275    arguments="${tmp#* }"
25276
25277    # Cannot rely on the command "which" here since it doesn't always work.
25278    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25279    if test -z "$is_absolute_path"; then
25280      # Path to executable is not absolute. Find it.
25281      IFS_save="$IFS"
25282      IFS=:
25283      for p in $PATH; do
25284        if test -f "$p/$path" && test -x "$p/$path"; then
25285          new_path="$p/$path"
25286          break
25287        fi
25288      done
25289      IFS="$IFS_save"
25290    else
25291      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25292$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25293      new_path="$path"
25294    fi
25295
25296    if test "x$new_path" = x; then
25297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25298$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25299      has_space=`$ECHO "$complete" | $GREP " "`
25300      if test "x$has_space" != x; then
25301        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25302$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25303      fi
25304      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25305    fi
25306  fi
25307
25308  # Now join together the path and the arguments once again
25309  if test "x$arguments" != xEOL; then
25310    new_complete="$new_path ${arguments% *}"
25311  else
25312    new_complete="$new_path"
25313  fi
25314
25315  if test "x$complete" != "x$new_complete"; then
25316    CXXCPP="$new_complete"
25317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25318$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25319  fi
25320
25321
25322  if test "x$COMPILE_TYPE" != "xcross"; then
25323    # If we are not cross compiling, use the same compilers for
25324    # building the build platform executables. The cross-compilation
25325    # case needed to be done earlier, but this can only be done after
25326    # the native tools have been localized.
25327    BUILD_CC="$CC"
25328    BUILD_CXX="$CXX"
25329    BUILD_LD="$LD"
25330  fi
25331
25332  # for solaris we really need solaris tools, and not gnu equivalent
25333  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25334  #   starting to probe
25335  #
25336  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25337  #         so that it can be overriden --with-tools-dir
25338  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25339    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25340  fi
25341
25342  # Find the right assembler.
25343  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25344    # Extract the first word of "as", so it can be a program name with args.
25345set dummy as; ac_word=$2
25346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25347$as_echo_n "checking for $ac_word... " >&6; }
25348if ${ac_cv_path_AS+:} false; then :
25349  $as_echo_n "(cached) " >&6
25350else
25351  case $AS in
25352  [\\/]* | ?:[\\/]*)
25353  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25354  ;;
25355  *)
25356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25357for as_dir in $PATH
25358do
25359  IFS=$as_save_IFS
25360  test -z "$as_dir" && as_dir=.
25361    for ac_exec_ext in '' $ac_executable_extensions; do
25362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25363    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25365    break 2
25366  fi
25367done
25368  done
25369IFS=$as_save_IFS
25370
25371  ;;
25372esac
25373fi
25374AS=$ac_cv_path_AS
25375if test -n "$AS"; then
25376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25377$as_echo "$AS" >&6; }
25378else
25379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25380$as_echo "no" >&6; }
25381fi
25382
25383
25384
25385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25386
25387  # First separate the path from the arguments. This will split at the first
25388  # space.
25389  complete="$AS"
25390  path="${complete%% *}"
25391  tmp="$complete EOL"
25392  arguments="${tmp#* }"
25393
25394  # Input might be given as Windows format, start by converting to
25395  # unix format.
25396  new_path=`$CYGPATH -u "$path"`
25397
25398  # Now try to locate executable using which
25399  new_path=`$WHICH "$new_path" 2> /dev/null`
25400  # bat and cmd files are not always considered executable in cygwin causing which
25401  # to not find them
25402  if test "x$new_path" = x \
25403      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25404      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25405    new_path=`$CYGPATH -u "$path"`
25406  fi
25407  if test "x$new_path" = x; then
25408    # Oops. Which didn't find the executable.
25409    # The splitting of arguments from the executable at a space might have been incorrect,
25410    # since paths with space are more likely in Windows. Give it another try with the whole
25411    # argument.
25412    path="$complete"
25413    arguments="EOL"
25414    new_path=`$CYGPATH -u "$path"`
25415    new_path=`$WHICH "$new_path" 2> /dev/null`
25416    # bat and cmd files are not always considered executable in cygwin causing which
25417    # to not find them
25418    if test "x$new_path" = x \
25419        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25420        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25421      new_path=`$CYGPATH -u "$path"`
25422    fi
25423    if test "x$new_path" = x; then
25424      # It's still not found. Now this is an unrecoverable error.
25425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25426$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25427      has_space=`$ECHO "$complete" | $GREP " "`
25428      if test "x$has_space" != x; then
25429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25431      fi
25432      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25433    fi
25434  fi
25435
25436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25439  # "foo.exe" is OK but "foo" is an error.
25440  #
25441  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25442  # It is also a way to make sure we got the proper file name for the real test later on.
25443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25444  if test "x$test_shortpath" = x; then
25445    # Short path failed, file does not exist as specified.
25446    # Try adding .exe or .cmd
25447    if test -f "${new_path}.exe"; then
25448      input_to_shortpath="${new_path}.exe"
25449    elif test -f "${new_path}.cmd"; then
25450      input_to_shortpath="${new_path}.cmd"
25451    else
25452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25453$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25454      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25455$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25456      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25457    fi
25458  else
25459    input_to_shortpath="$new_path"
25460  fi
25461
25462  # Call helper function which possibly converts this using DOS-style short mode.
25463  # If so, the updated path is stored in $new_path.
25464  new_path="$input_to_shortpath"
25465
25466  input_path="$input_to_shortpath"
25467  # Check if we need to convert this using DOS-style short mode. If the path
25468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25469  # take no chances and rewrite it.
25470  # Note: m4 eats our [], so we need to use [ and ] instead.
25471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25472  if test "x$has_forbidden_chars" != x; then
25473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25477      # Going to short mode and back again did indeed matter. Since short mode is
25478      # case insensitive, let's make it lowercase to improve readability.
25479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25480      # Now convert it back to Unix-stile (cygpath)
25481      input_path=`$CYGPATH -u "$shortmode_path"`
25482      new_path="$input_path"
25483    fi
25484  fi
25485
25486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25487  if test "x$test_cygdrive_prefix" = x; then
25488    # As a simple fix, exclude /usr/bin since it's not a real path.
25489    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25491      # a path prefixed by /cygdrive for fixpath to work.
25492      new_path="$CYGWIN_ROOT_PATH$input_path"
25493    fi
25494  fi
25495
25496  # remove trailing .exe if any
25497  new_path="${new_path/%.exe/}"
25498
25499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25500
25501  # First separate the path from the arguments. This will split at the first
25502  # space.
25503  complete="$AS"
25504  path="${complete%% *}"
25505  tmp="$complete EOL"
25506  arguments="${tmp#* }"
25507
25508  # Input might be given as Windows format, start by converting to
25509  # unix format.
25510  new_path="$path"
25511
25512  windows_path="$new_path"
25513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25514    unix_path=`$CYGPATH -u "$windows_path"`
25515    new_path="$unix_path"
25516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25518    new_path="$unix_path"
25519  fi
25520
25521
25522  # Now try to locate executable using which
25523  new_path=`$WHICH "$new_path" 2> /dev/null`
25524
25525  if test "x$new_path" = x; then
25526    # Oops. Which didn't find the executable.
25527    # The splitting of arguments from the executable at a space might have been incorrect,
25528    # since paths with space are more likely in Windows. Give it another try with the whole
25529    # argument.
25530    path="$complete"
25531    arguments="EOL"
25532    new_path="$path"
25533
25534  windows_path="$new_path"
25535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25536    unix_path=`$CYGPATH -u "$windows_path"`
25537    new_path="$unix_path"
25538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25540    new_path="$unix_path"
25541  fi
25542
25543
25544    new_path=`$WHICH "$new_path" 2> /dev/null`
25545
25546    if test "x$new_path" = x; then
25547      # It's still not found. Now this is an unrecoverable error.
25548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25549$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25550      has_space=`$ECHO "$complete" | $GREP " "`
25551      if test "x$has_space" != x; then
25552        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25553$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25554      fi
25555      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25556    fi
25557  fi
25558
25559  # Now new_path has a complete unix path to the binary
25560  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25561    # Keep paths in /bin as-is, but remove trailing .exe if any
25562    new_path="${new_path/%.exe/}"
25563    # Do not save /bin paths to all_fixpath_prefixes!
25564  else
25565    # Not in mixed or Windows style, start by that.
25566    new_path=`cmd //c echo $new_path`
25567
25568  input_path="$new_path"
25569  # Check if we need to convert this using DOS-style short mode. If the path
25570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25571  # take no chances and rewrite it.
25572  # Note: m4 eats our [], so we need to use [ and ] instead.
25573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25574  if test "x$has_forbidden_chars" != x; then
25575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25577  fi
25578
25579    # Output is in $new_path
25580
25581  windows_path="$new_path"
25582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25583    unix_path=`$CYGPATH -u "$windows_path"`
25584    new_path="$unix_path"
25585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25587    new_path="$unix_path"
25588  fi
25589
25590    # remove trailing .exe if any
25591    new_path="${new_path/%.exe/}"
25592
25593    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25594    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25595  fi
25596
25597  else
25598    # We're on a posix platform. Hooray! :)
25599    # First separate the path from the arguments. This will split at the first
25600    # space.
25601    complete="$AS"
25602    path="${complete%% *}"
25603    tmp="$complete EOL"
25604    arguments="${tmp#* }"
25605
25606    # Cannot rely on the command "which" here since it doesn't always work.
25607    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25608    if test -z "$is_absolute_path"; then
25609      # Path to executable is not absolute. Find it.
25610      IFS_save="$IFS"
25611      IFS=:
25612      for p in $PATH; do
25613        if test -f "$p/$path" && test -x "$p/$path"; then
25614          new_path="$p/$path"
25615          break
25616        fi
25617      done
25618      IFS="$IFS_save"
25619    else
25620      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25621$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25622      new_path="$path"
25623    fi
25624
25625    if test "x$new_path" = x; then
25626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25627$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25628      has_space=`$ECHO "$complete" | $GREP " "`
25629      if test "x$has_space" != x; then
25630        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25631$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25632      fi
25633      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25634    fi
25635  fi
25636
25637  # Now join together the path and the arguments once again
25638  if test "x$arguments" != xEOL; then
25639    new_complete="$new_path ${arguments% *}"
25640  else
25641    new_complete="$new_path"
25642  fi
25643
25644  if test "x$complete" != "x$new_complete"; then
25645    AS="$new_complete"
25646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25647$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25648  fi
25649
25650  else
25651    AS="$CC -c"
25652  fi
25653
25654
25655  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25656    # Extract the first word of "nm", so it can be a program name with args.
25657set dummy nm; ac_word=$2
25658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25659$as_echo_n "checking for $ac_word... " >&6; }
25660if ${ac_cv_path_NM+:} false; then :
25661  $as_echo_n "(cached) " >&6
25662else
25663  case $NM in
25664  [\\/]* | ?:[\\/]*)
25665  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25666  ;;
25667  *)
25668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25669for as_dir in $PATH
25670do
25671  IFS=$as_save_IFS
25672  test -z "$as_dir" && as_dir=.
25673    for ac_exec_ext in '' $ac_executable_extensions; do
25674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25675    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25677    break 2
25678  fi
25679done
25680  done
25681IFS=$as_save_IFS
25682
25683  ;;
25684esac
25685fi
25686NM=$ac_cv_path_NM
25687if test -n "$NM"; then
25688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25689$as_echo "$NM" >&6; }
25690else
25691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25692$as_echo "no" >&6; }
25693fi
25694
25695
25696
25697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25698
25699  # First separate the path from the arguments. This will split at the first
25700  # space.
25701  complete="$NM"
25702  path="${complete%% *}"
25703  tmp="$complete EOL"
25704  arguments="${tmp#* }"
25705
25706  # Input might be given as Windows format, start by converting to
25707  # unix format.
25708  new_path=`$CYGPATH -u "$path"`
25709
25710  # Now try to locate executable using which
25711  new_path=`$WHICH "$new_path" 2> /dev/null`
25712  # bat and cmd files are not always considered executable in cygwin causing which
25713  # to not find them
25714  if test "x$new_path" = x \
25715      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25716      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25717    new_path=`$CYGPATH -u "$path"`
25718  fi
25719  if test "x$new_path" = x; then
25720    # Oops. Which didn't find the executable.
25721    # The splitting of arguments from the executable at a space might have been incorrect,
25722    # since paths with space are more likely in Windows. Give it another try with the whole
25723    # argument.
25724    path="$complete"
25725    arguments="EOL"
25726    new_path=`$CYGPATH -u "$path"`
25727    new_path=`$WHICH "$new_path" 2> /dev/null`
25728    # bat and cmd files are not always considered executable in cygwin causing which
25729    # to not find them
25730    if test "x$new_path" = x \
25731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25733      new_path=`$CYGPATH -u "$path"`
25734    fi
25735    if test "x$new_path" = x; then
25736      # It's still not found. Now this is an unrecoverable error.
25737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25738$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25739      has_space=`$ECHO "$complete" | $GREP " "`
25740      if test "x$has_space" != x; then
25741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25743      fi
25744      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25745    fi
25746  fi
25747
25748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25751  # "foo.exe" is OK but "foo" is an error.
25752  #
25753  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25754  # It is also a way to make sure we got the proper file name for the real test later on.
25755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25756  if test "x$test_shortpath" = x; then
25757    # Short path failed, file does not exist as specified.
25758    # Try adding .exe or .cmd
25759    if test -f "${new_path}.exe"; then
25760      input_to_shortpath="${new_path}.exe"
25761    elif test -f "${new_path}.cmd"; then
25762      input_to_shortpath="${new_path}.cmd"
25763    else
25764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25765$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25766      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25767$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25768      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25769    fi
25770  else
25771    input_to_shortpath="$new_path"
25772  fi
25773
25774  # Call helper function which possibly converts this using DOS-style short mode.
25775  # If so, the updated path is stored in $new_path.
25776  new_path="$input_to_shortpath"
25777
25778  input_path="$input_to_shortpath"
25779  # Check if we need to convert this using DOS-style short mode. If the path
25780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25781  # take no chances and rewrite it.
25782  # Note: m4 eats our [], so we need to use [ and ] instead.
25783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25784  if test "x$has_forbidden_chars" != x; then
25785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25789      # Going to short mode and back again did indeed matter. Since short mode is
25790      # case insensitive, let's make it lowercase to improve readability.
25791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25792      # Now convert it back to Unix-stile (cygpath)
25793      input_path=`$CYGPATH -u "$shortmode_path"`
25794      new_path="$input_path"
25795    fi
25796  fi
25797
25798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25799  if test "x$test_cygdrive_prefix" = x; then
25800    # As a simple fix, exclude /usr/bin since it's not a real path.
25801    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25803      # a path prefixed by /cygdrive for fixpath to work.
25804      new_path="$CYGWIN_ROOT_PATH$input_path"
25805    fi
25806  fi
25807
25808  # remove trailing .exe if any
25809  new_path="${new_path/%.exe/}"
25810
25811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25812
25813  # First separate the path from the arguments. This will split at the first
25814  # space.
25815  complete="$NM"
25816  path="${complete%% *}"
25817  tmp="$complete EOL"
25818  arguments="${tmp#* }"
25819
25820  # Input might be given as Windows format, start by converting to
25821  # unix format.
25822  new_path="$path"
25823
25824  windows_path="$new_path"
25825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25826    unix_path=`$CYGPATH -u "$windows_path"`
25827    new_path="$unix_path"
25828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25830    new_path="$unix_path"
25831  fi
25832
25833
25834  # Now try to locate executable using which
25835  new_path=`$WHICH "$new_path" 2> /dev/null`
25836
25837  if test "x$new_path" = x; then
25838    # Oops. Which didn't find the executable.
25839    # The splitting of arguments from the executable at a space might have been incorrect,
25840    # since paths with space are more likely in Windows. Give it another try with the whole
25841    # argument.
25842    path="$complete"
25843    arguments="EOL"
25844    new_path="$path"
25845
25846  windows_path="$new_path"
25847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25848    unix_path=`$CYGPATH -u "$windows_path"`
25849    new_path="$unix_path"
25850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25852    new_path="$unix_path"
25853  fi
25854
25855
25856    new_path=`$WHICH "$new_path" 2> /dev/null`
25857
25858    if test "x$new_path" = x; then
25859      # It's still not found. Now this is an unrecoverable error.
25860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25861$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25862      has_space=`$ECHO "$complete" | $GREP " "`
25863      if test "x$has_space" != x; then
25864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25866      fi
25867      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25868    fi
25869  fi
25870
25871  # Now new_path has a complete unix path to the binary
25872  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25873    # Keep paths in /bin as-is, but remove trailing .exe if any
25874    new_path="${new_path/%.exe/}"
25875    # Do not save /bin paths to all_fixpath_prefixes!
25876  else
25877    # Not in mixed or Windows style, start by that.
25878    new_path=`cmd //c echo $new_path`
25879
25880  input_path="$new_path"
25881  # Check if we need to convert this using DOS-style short mode. If the path
25882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25883  # take no chances and rewrite it.
25884  # Note: m4 eats our [], so we need to use [ and ] instead.
25885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25886  if test "x$has_forbidden_chars" != x; then
25887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25889  fi
25890
25891    # Output is in $new_path
25892
25893  windows_path="$new_path"
25894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25895    unix_path=`$CYGPATH -u "$windows_path"`
25896    new_path="$unix_path"
25897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25899    new_path="$unix_path"
25900  fi
25901
25902    # remove trailing .exe if any
25903    new_path="${new_path/%.exe/}"
25904
25905    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25906    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25907  fi
25908
25909  else
25910    # We're on a posix platform. Hooray! :)
25911    # First separate the path from the arguments. This will split at the first
25912    # space.
25913    complete="$NM"
25914    path="${complete%% *}"
25915    tmp="$complete EOL"
25916    arguments="${tmp#* }"
25917
25918    # Cannot rely on the command "which" here since it doesn't always work.
25919    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25920    if test -z "$is_absolute_path"; then
25921      # Path to executable is not absolute. Find it.
25922      IFS_save="$IFS"
25923      IFS=:
25924      for p in $PATH; do
25925        if test -f "$p/$path" && test -x "$p/$path"; then
25926          new_path="$p/$path"
25927          break
25928        fi
25929      done
25930      IFS="$IFS_save"
25931    else
25932      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25933$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25934      new_path="$path"
25935    fi
25936
25937    if test "x$new_path" = x; then
25938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25939$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25940      has_space=`$ECHO "$complete" | $GREP " "`
25941      if test "x$has_space" != x; then
25942        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25943$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25944      fi
25945      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25946    fi
25947  fi
25948
25949  # Now join together the path and the arguments once again
25950  if test "x$arguments" != xEOL; then
25951    new_complete="$new_path ${arguments% *}"
25952  else
25953    new_complete="$new_path"
25954  fi
25955
25956  if test "x$complete" != "x$new_complete"; then
25957    NM="$new_complete"
25958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25959$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25960  fi
25961
25962    # Extract the first word of "gnm", so it can be a program name with args.
25963set dummy gnm; ac_word=$2
25964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25965$as_echo_n "checking for $ac_word... " >&6; }
25966if ${ac_cv_path_GNM+:} false; then :
25967  $as_echo_n "(cached) " >&6
25968else
25969  case $GNM in
25970  [\\/]* | ?:[\\/]*)
25971  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25972  ;;
25973  *)
25974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25975for as_dir in $PATH
25976do
25977  IFS=$as_save_IFS
25978  test -z "$as_dir" && as_dir=.
25979    for ac_exec_ext in '' $ac_executable_extensions; do
25980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25981    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25983    break 2
25984  fi
25985done
25986  done
25987IFS=$as_save_IFS
25988
25989  ;;
25990esac
25991fi
25992GNM=$ac_cv_path_GNM
25993if test -n "$GNM"; then
25994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25995$as_echo "$GNM" >&6; }
25996else
25997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25998$as_echo "no" >&6; }
25999fi
26000
26001
26002
26003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26004
26005  # First separate the path from the arguments. This will split at the first
26006  # space.
26007  complete="$GNM"
26008  path="${complete%% *}"
26009  tmp="$complete EOL"
26010  arguments="${tmp#* }"
26011
26012  # Input might be given as Windows format, start by converting to
26013  # unix format.
26014  new_path=`$CYGPATH -u "$path"`
26015
26016  # Now try to locate executable using which
26017  new_path=`$WHICH "$new_path" 2> /dev/null`
26018  # bat and cmd files are not always considered executable in cygwin causing which
26019  # to not find them
26020  if test "x$new_path" = x \
26021      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26022      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26023    new_path=`$CYGPATH -u "$path"`
26024  fi
26025  if test "x$new_path" = x; then
26026    # Oops. Which didn't find the executable.
26027    # The splitting of arguments from the executable at a space might have been incorrect,
26028    # since paths with space are more likely in Windows. Give it another try with the whole
26029    # argument.
26030    path="$complete"
26031    arguments="EOL"
26032    new_path=`$CYGPATH -u "$path"`
26033    new_path=`$WHICH "$new_path" 2> /dev/null`
26034    # bat and cmd files are not always considered executable in cygwin causing which
26035    # to not find them
26036    if test "x$new_path" = x \
26037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26039      new_path=`$CYGPATH -u "$path"`
26040    fi
26041    if test "x$new_path" = x; then
26042      # It's still not found. Now this is an unrecoverable error.
26043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26044$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26045      has_space=`$ECHO "$complete" | $GREP " "`
26046      if test "x$has_space" != x; then
26047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26049      fi
26050      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26051    fi
26052  fi
26053
26054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26057  # "foo.exe" is OK but "foo" is an error.
26058  #
26059  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26060  # It is also a way to make sure we got the proper file name for the real test later on.
26061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26062  if test "x$test_shortpath" = x; then
26063    # Short path failed, file does not exist as specified.
26064    # Try adding .exe or .cmd
26065    if test -f "${new_path}.exe"; then
26066      input_to_shortpath="${new_path}.exe"
26067    elif test -f "${new_path}.cmd"; then
26068      input_to_shortpath="${new_path}.cmd"
26069    else
26070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26071$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26072      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26073$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26074      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26075    fi
26076  else
26077    input_to_shortpath="$new_path"
26078  fi
26079
26080  # Call helper function which possibly converts this using DOS-style short mode.
26081  # If so, the updated path is stored in $new_path.
26082  new_path="$input_to_shortpath"
26083
26084  input_path="$input_to_shortpath"
26085  # Check if we need to convert this using DOS-style short mode. If the path
26086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26087  # take no chances and rewrite it.
26088  # Note: m4 eats our [], so we need to use [ and ] instead.
26089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26090  if test "x$has_forbidden_chars" != x; then
26091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26095      # Going to short mode and back again did indeed matter. Since short mode is
26096      # case insensitive, let's make it lowercase to improve readability.
26097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26098      # Now convert it back to Unix-stile (cygpath)
26099      input_path=`$CYGPATH -u "$shortmode_path"`
26100      new_path="$input_path"
26101    fi
26102  fi
26103
26104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26105  if test "x$test_cygdrive_prefix" = x; then
26106    # As a simple fix, exclude /usr/bin since it's not a real path.
26107    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26109      # a path prefixed by /cygdrive for fixpath to work.
26110      new_path="$CYGWIN_ROOT_PATH$input_path"
26111    fi
26112  fi
26113
26114  # remove trailing .exe if any
26115  new_path="${new_path/%.exe/}"
26116
26117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26118
26119  # First separate the path from the arguments. This will split at the first
26120  # space.
26121  complete="$GNM"
26122  path="${complete%% *}"
26123  tmp="$complete EOL"
26124  arguments="${tmp#* }"
26125
26126  # Input might be given as Windows format, start by converting to
26127  # unix format.
26128  new_path="$path"
26129
26130  windows_path="$new_path"
26131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26132    unix_path=`$CYGPATH -u "$windows_path"`
26133    new_path="$unix_path"
26134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26136    new_path="$unix_path"
26137  fi
26138
26139
26140  # Now try to locate executable using which
26141  new_path=`$WHICH "$new_path" 2> /dev/null`
26142
26143  if test "x$new_path" = x; then
26144    # Oops. Which didn't find the executable.
26145    # The splitting of arguments from the executable at a space might have been incorrect,
26146    # since paths with space are more likely in Windows. Give it another try with the whole
26147    # argument.
26148    path="$complete"
26149    arguments="EOL"
26150    new_path="$path"
26151
26152  windows_path="$new_path"
26153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26154    unix_path=`$CYGPATH -u "$windows_path"`
26155    new_path="$unix_path"
26156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26158    new_path="$unix_path"
26159  fi
26160
26161
26162    new_path=`$WHICH "$new_path" 2> /dev/null`
26163
26164    if test "x$new_path" = x; then
26165      # It's still not found. Now this is an unrecoverable error.
26166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26167$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26168      has_space=`$ECHO "$complete" | $GREP " "`
26169      if test "x$has_space" != x; then
26170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26172      fi
26173      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26174    fi
26175  fi
26176
26177  # Now new_path has a complete unix path to the binary
26178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26179    # Keep paths in /bin as-is, but remove trailing .exe if any
26180    new_path="${new_path/%.exe/}"
26181    # Do not save /bin paths to all_fixpath_prefixes!
26182  else
26183    # Not in mixed or Windows style, start by that.
26184    new_path=`cmd //c echo $new_path`
26185
26186  input_path="$new_path"
26187  # Check if we need to convert this using DOS-style short mode. If the path
26188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26189  # take no chances and rewrite it.
26190  # Note: m4 eats our [], so we need to use [ and ] instead.
26191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26192  if test "x$has_forbidden_chars" != x; then
26193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26195  fi
26196
26197    # Output is in $new_path
26198
26199  windows_path="$new_path"
26200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26201    unix_path=`$CYGPATH -u "$windows_path"`
26202    new_path="$unix_path"
26203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26205    new_path="$unix_path"
26206  fi
26207
26208    # remove trailing .exe if any
26209    new_path="${new_path/%.exe/}"
26210
26211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26213  fi
26214
26215  else
26216    # We're on a posix platform. Hooray! :)
26217    # First separate the path from the arguments. This will split at the first
26218    # space.
26219    complete="$GNM"
26220    path="${complete%% *}"
26221    tmp="$complete EOL"
26222    arguments="${tmp#* }"
26223
26224    # Cannot rely on the command "which" here since it doesn't always work.
26225    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26226    if test -z "$is_absolute_path"; then
26227      # Path to executable is not absolute. Find it.
26228      IFS_save="$IFS"
26229      IFS=:
26230      for p in $PATH; do
26231        if test -f "$p/$path" && test -x "$p/$path"; then
26232          new_path="$p/$path"
26233          break
26234        fi
26235      done
26236      IFS="$IFS_save"
26237    else
26238      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26239$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26240      new_path="$path"
26241    fi
26242
26243    if test "x$new_path" = x; then
26244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26245$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26246      has_space=`$ECHO "$complete" | $GREP " "`
26247      if test "x$has_space" != x; then
26248        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26249$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26250      fi
26251      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26252    fi
26253  fi
26254
26255  # Now join together the path and the arguments once again
26256  if test "x$arguments" != xEOL; then
26257    new_complete="$new_path ${arguments% *}"
26258  else
26259    new_complete="$new_path"
26260  fi
26261
26262  if test "x$complete" != "x$new_complete"; then
26263    GNM="$new_complete"
26264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26265$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26266  fi
26267
26268    # Extract the first word of "strip", so it can be a program name with args.
26269set dummy strip; ac_word=$2
26270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26271$as_echo_n "checking for $ac_word... " >&6; }
26272if ${ac_cv_path_STRIP+:} false; then :
26273  $as_echo_n "(cached) " >&6
26274else
26275  case $STRIP in
26276  [\\/]* | ?:[\\/]*)
26277  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26278  ;;
26279  *)
26280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26281for as_dir in $PATH
26282do
26283  IFS=$as_save_IFS
26284  test -z "$as_dir" && as_dir=.
26285    for ac_exec_ext in '' $ac_executable_extensions; do
26286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26287    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26289    break 2
26290  fi
26291done
26292  done
26293IFS=$as_save_IFS
26294
26295  ;;
26296esac
26297fi
26298STRIP=$ac_cv_path_STRIP
26299if test -n "$STRIP"; then
26300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26301$as_echo "$STRIP" >&6; }
26302else
26303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26304$as_echo "no" >&6; }
26305fi
26306
26307
26308
26309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26310
26311  # First separate the path from the arguments. This will split at the first
26312  # space.
26313  complete="$STRIP"
26314  path="${complete%% *}"
26315  tmp="$complete EOL"
26316  arguments="${tmp#* }"
26317
26318  # Input might be given as Windows format, start by converting to
26319  # unix format.
26320  new_path=`$CYGPATH -u "$path"`
26321
26322  # Now try to locate executable using which
26323  new_path=`$WHICH "$new_path" 2> /dev/null`
26324  # bat and cmd files are not always considered executable in cygwin causing which
26325  # to not find them
26326  if test "x$new_path" = x \
26327      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26328      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26329    new_path=`$CYGPATH -u "$path"`
26330  fi
26331  if test "x$new_path" = x; then
26332    # Oops. Which didn't find the executable.
26333    # The splitting of arguments from the executable at a space might have been incorrect,
26334    # since paths with space are more likely in Windows. Give it another try with the whole
26335    # argument.
26336    path="$complete"
26337    arguments="EOL"
26338    new_path=`$CYGPATH -u "$path"`
26339    new_path=`$WHICH "$new_path" 2> /dev/null`
26340    # bat and cmd files are not always considered executable in cygwin causing which
26341    # to not find them
26342    if test "x$new_path" = x \
26343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26345      new_path=`$CYGPATH -u "$path"`
26346    fi
26347    if test "x$new_path" = x; then
26348      # It's still not found. Now this is an unrecoverable error.
26349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26350$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26351      has_space=`$ECHO "$complete" | $GREP " "`
26352      if test "x$has_space" != x; then
26353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26355      fi
26356      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26357    fi
26358  fi
26359
26360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26363  # "foo.exe" is OK but "foo" is an error.
26364  #
26365  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26366  # It is also a way to make sure we got the proper file name for the real test later on.
26367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26368  if test "x$test_shortpath" = x; then
26369    # Short path failed, file does not exist as specified.
26370    # Try adding .exe or .cmd
26371    if test -f "${new_path}.exe"; then
26372      input_to_shortpath="${new_path}.exe"
26373    elif test -f "${new_path}.cmd"; then
26374      input_to_shortpath="${new_path}.cmd"
26375    else
26376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26377$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26378      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26379$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26380      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26381    fi
26382  else
26383    input_to_shortpath="$new_path"
26384  fi
26385
26386  # Call helper function which possibly converts this using DOS-style short mode.
26387  # If so, the updated path is stored in $new_path.
26388  new_path="$input_to_shortpath"
26389
26390  input_path="$input_to_shortpath"
26391  # Check if we need to convert this using DOS-style short mode. If the path
26392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26393  # take no chances and rewrite it.
26394  # Note: m4 eats our [], so we need to use [ and ] instead.
26395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26396  if test "x$has_forbidden_chars" != x; then
26397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26401      # Going to short mode and back again did indeed matter. Since short mode is
26402      # case insensitive, let's make it lowercase to improve readability.
26403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26404      # Now convert it back to Unix-stile (cygpath)
26405      input_path=`$CYGPATH -u "$shortmode_path"`
26406      new_path="$input_path"
26407    fi
26408  fi
26409
26410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26411  if test "x$test_cygdrive_prefix" = x; then
26412    # As a simple fix, exclude /usr/bin since it's not a real path.
26413    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26415      # a path prefixed by /cygdrive for fixpath to work.
26416      new_path="$CYGWIN_ROOT_PATH$input_path"
26417    fi
26418  fi
26419
26420  # remove trailing .exe if any
26421  new_path="${new_path/%.exe/}"
26422
26423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26424
26425  # First separate the path from the arguments. This will split at the first
26426  # space.
26427  complete="$STRIP"
26428  path="${complete%% *}"
26429  tmp="$complete EOL"
26430  arguments="${tmp#* }"
26431
26432  # Input might be given as Windows format, start by converting to
26433  # unix format.
26434  new_path="$path"
26435
26436  windows_path="$new_path"
26437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26438    unix_path=`$CYGPATH -u "$windows_path"`
26439    new_path="$unix_path"
26440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26442    new_path="$unix_path"
26443  fi
26444
26445
26446  # Now try to locate executable using which
26447  new_path=`$WHICH "$new_path" 2> /dev/null`
26448
26449  if test "x$new_path" = x; then
26450    # Oops. Which didn't find the executable.
26451    # The splitting of arguments from the executable at a space might have been incorrect,
26452    # since paths with space are more likely in Windows. Give it another try with the whole
26453    # argument.
26454    path="$complete"
26455    arguments="EOL"
26456    new_path="$path"
26457
26458  windows_path="$new_path"
26459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26460    unix_path=`$CYGPATH -u "$windows_path"`
26461    new_path="$unix_path"
26462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26464    new_path="$unix_path"
26465  fi
26466
26467
26468    new_path=`$WHICH "$new_path" 2> /dev/null`
26469
26470    if test "x$new_path" = x; then
26471      # It's still not found. Now this is an unrecoverable error.
26472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26473$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26474      has_space=`$ECHO "$complete" | $GREP " "`
26475      if test "x$has_space" != x; then
26476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26478      fi
26479      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26480    fi
26481  fi
26482
26483  # Now new_path has a complete unix path to the binary
26484  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26485    # Keep paths in /bin as-is, but remove trailing .exe if any
26486    new_path="${new_path/%.exe/}"
26487    # Do not save /bin paths to all_fixpath_prefixes!
26488  else
26489    # Not in mixed or Windows style, start by that.
26490    new_path=`cmd //c echo $new_path`
26491
26492  input_path="$new_path"
26493  # Check if we need to convert this using DOS-style short mode. If the path
26494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26495  # take no chances and rewrite it.
26496  # Note: m4 eats our [], so we need to use [ and ] instead.
26497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26498  if test "x$has_forbidden_chars" != x; then
26499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26501  fi
26502
26503    # Output is in $new_path
26504
26505  windows_path="$new_path"
26506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26507    unix_path=`$CYGPATH -u "$windows_path"`
26508    new_path="$unix_path"
26509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26511    new_path="$unix_path"
26512  fi
26513
26514    # remove trailing .exe if any
26515    new_path="${new_path/%.exe/}"
26516
26517    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26518    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26519  fi
26520
26521  else
26522    # We're on a posix platform. Hooray! :)
26523    # First separate the path from the arguments. This will split at the first
26524    # space.
26525    complete="$STRIP"
26526    path="${complete%% *}"
26527    tmp="$complete EOL"
26528    arguments="${tmp#* }"
26529
26530    # Cannot rely on the command "which" here since it doesn't always work.
26531    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26532    if test -z "$is_absolute_path"; then
26533      # Path to executable is not absolute. Find it.
26534      IFS_save="$IFS"
26535      IFS=:
26536      for p in $PATH; do
26537        if test -f "$p/$path" && test -x "$p/$path"; then
26538          new_path="$p/$path"
26539          break
26540        fi
26541      done
26542      IFS="$IFS_save"
26543    else
26544      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26545$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26546      new_path="$path"
26547    fi
26548
26549    if test "x$new_path" = x; then
26550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26551$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26552      has_space=`$ECHO "$complete" | $GREP " "`
26553      if test "x$has_space" != x; then
26554        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26555$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26556      fi
26557      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26558    fi
26559  fi
26560
26561  # Now join together the path and the arguments once again
26562  if test "x$arguments" != xEOL; then
26563    new_complete="$new_path ${arguments% *}"
26564  else
26565    new_complete="$new_path"
26566  fi
26567
26568  if test "x$complete" != "x$new_complete"; then
26569    STRIP="$new_complete"
26570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26571$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26572  fi
26573
26574    # Extract the first word of "mcs", so it can be a program name with args.
26575set dummy mcs; ac_word=$2
26576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26577$as_echo_n "checking for $ac_word... " >&6; }
26578if ${ac_cv_path_MCS+:} false; then :
26579  $as_echo_n "(cached) " >&6
26580else
26581  case $MCS in
26582  [\\/]* | ?:[\\/]*)
26583  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26584  ;;
26585  *)
26586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26587for as_dir in $PATH
26588do
26589  IFS=$as_save_IFS
26590  test -z "$as_dir" && as_dir=.
26591    for ac_exec_ext in '' $ac_executable_extensions; do
26592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26593    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26595    break 2
26596  fi
26597done
26598  done
26599IFS=$as_save_IFS
26600
26601  ;;
26602esac
26603fi
26604MCS=$ac_cv_path_MCS
26605if test -n "$MCS"; then
26606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26607$as_echo "$MCS" >&6; }
26608else
26609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26610$as_echo "no" >&6; }
26611fi
26612
26613
26614
26615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26616
26617  # First separate the path from the arguments. This will split at the first
26618  # space.
26619  complete="$MCS"
26620  path="${complete%% *}"
26621  tmp="$complete EOL"
26622  arguments="${tmp#* }"
26623
26624  # Input might be given as Windows format, start by converting to
26625  # unix format.
26626  new_path=`$CYGPATH -u "$path"`
26627
26628  # Now try to locate executable using which
26629  new_path=`$WHICH "$new_path" 2> /dev/null`
26630  # bat and cmd files are not always considered executable in cygwin causing which
26631  # to not find them
26632  if test "x$new_path" = x \
26633      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26634      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26635    new_path=`$CYGPATH -u "$path"`
26636  fi
26637  if test "x$new_path" = x; then
26638    # Oops. Which didn't find the executable.
26639    # The splitting of arguments from the executable at a space might have been incorrect,
26640    # since paths with space are more likely in Windows. Give it another try with the whole
26641    # argument.
26642    path="$complete"
26643    arguments="EOL"
26644    new_path=`$CYGPATH -u "$path"`
26645    new_path=`$WHICH "$new_path" 2> /dev/null`
26646    # bat and cmd files are not always considered executable in cygwin causing which
26647    # to not find them
26648    if test "x$new_path" = x \
26649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26651      new_path=`$CYGPATH -u "$path"`
26652    fi
26653    if test "x$new_path" = x; then
26654      # It's still not found. Now this is an unrecoverable error.
26655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26656$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26657      has_space=`$ECHO "$complete" | $GREP " "`
26658      if test "x$has_space" != x; then
26659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26661      fi
26662      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26663    fi
26664  fi
26665
26666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26669  # "foo.exe" is OK but "foo" is an error.
26670  #
26671  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26672  # It is also a way to make sure we got the proper file name for the real test later on.
26673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26674  if test "x$test_shortpath" = x; then
26675    # Short path failed, file does not exist as specified.
26676    # Try adding .exe or .cmd
26677    if test -f "${new_path}.exe"; then
26678      input_to_shortpath="${new_path}.exe"
26679    elif test -f "${new_path}.cmd"; then
26680      input_to_shortpath="${new_path}.cmd"
26681    else
26682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26683$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26686      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26687    fi
26688  else
26689    input_to_shortpath="$new_path"
26690  fi
26691
26692  # Call helper function which possibly converts this using DOS-style short mode.
26693  # If so, the updated path is stored in $new_path.
26694  new_path="$input_to_shortpath"
26695
26696  input_path="$input_to_shortpath"
26697  # Check if we need to convert this using DOS-style short mode. If the path
26698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26699  # take no chances and rewrite it.
26700  # Note: m4 eats our [], so we need to use [ and ] instead.
26701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26702  if test "x$has_forbidden_chars" != x; then
26703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26707      # Going to short mode and back again did indeed matter. Since short mode is
26708      # case insensitive, let's make it lowercase to improve readability.
26709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26710      # Now convert it back to Unix-stile (cygpath)
26711      input_path=`$CYGPATH -u "$shortmode_path"`
26712      new_path="$input_path"
26713    fi
26714  fi
26715
26716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26717  if test "x$test_cygdrive_prefix" = x; then
26718    # As a simple fix, exclude /usr/bin since it's not a real path.
26719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26721      # a path prefixed by /cygdrive for fixpath to work.
26722      new_path="$CYGWIN_ROOT_PATH$input_path"
26723    fi
26724  fi
26725
26726  # remove trailing .exe if any
26727  new_path="${new_path/%.exe/}"
26728
26729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26730
26731  # First separate the path from the arguments. This will split at the first
26732  # space.
26733  complete="$MCS"
26734  path="${complete%% *}"
26735  tmp="$complete EOL"
26736  arguments="${tmp#* }"
26737
26738  # Input might be given as Windows format, start by converting to
26739  # unix format.
26740  new_path="$path"
26741
26742  windows_path="$new_path"
26743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26744    unix_path=`$CYGPATH -u "$windows_path"`
26745    new_path="$unix_path"
26746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26748    new_path="$unix_path"
26749  fi
26750
26751
26752  # Now try to locate executable using which
26753  new_path=`$WHICH "$new_path" 2> /dev/null`
26754
26755  if test "x$new_path" = x; then
26756    # Oops. Which didn't find the executable.
26757    # The splitting of arguments from the executable at a space might have been incorrect,
26758    # since paths with space are more likely in Windows. Give it another try with the whole
26759    # argument.
26760    path="$complete"
26761    arguments="EOL"
26762    new_path="$path"
26763
26764  windows_path="$new_path"
26765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26766    unix_path=`$CYGPATH -u "$windows_path"`
26767    new_path="$unix_path"
26768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26770    new_path="$unix_path"
26771  fi
26772
26773
26774    new_path=`$WHICH "$new_path" 2> /dev/null`
26775
26776    if test "x$new_path" = x; then
26777      # It's still not found. Now this is an unrecoverable error.
26778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26779$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26780      has_space=`$ECHO "$complete" | $GREP " "`
26781      if test "x$has_space" != x; then
26782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26784      fi
26785      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26786    fi
26787  fi
26788
26789  # Now new_path has a complete unix path to the binary
26790  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26791    # Keep paths in /bin as-is, but remove trailing .exe if any
26792    new_path="${new_path/%.exe/}"
26793    # Do not save /bin paths to all_fixpath_prefixes!
26794  else
26795    # Not in mixed or Windows style, start by that.
26796    new_path=`cmd //c echo $new_path`
26797
26798  input_path="$new_path"
26799  # Check if we need to convert this using DOS-style short mode. If the path
26800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26801  # take no chances and rewrite it.
26802  # Note: m4 eats our [], so we need to use [ and ] instead.
26803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26804  if test "x$has_forbidden_chars" != x; then
26805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26807  fi
26808
26809    # Output is in $new_path
26810
26811  windows_path="$new_path"
26812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26813    unix_path=`$CYGPATH -u "$windows_path"`
26814    new_path="$unix_path"
26815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26817    new_path="$unix_path"
26818  fi
26819
26820    # remove trailing .exe if any
26821    new_path="${new_path/%.exe/}"
26822
26823    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26824    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26825  fi
26826
26827  else
26828    # We're on a posix platform. Hooray! :)
26829    # First separate the path from the arguments. This will split at the first
26830    # space.
26831    complete="$MCS"
26832    path="${complete%% *}"
26833    tmp="$complete EOL"
26834    arguments="${tmp#* }"
26835
26836    # Cannot rely on the command "which" here since it doesn't always work.
26837    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26838    if test -z "$is_absolute_path"; then
26839      # Path to executable is not absolute. Find it.
26840      IFS_save="$IFS"
26841      IFS=:
26842      for p in $PATH; do
26843        if test -f "$p/$path" && test -x "$p/$path"; then
26844          new_path="$p/$path"
26845          break
26846        fi
26847      done
26848      IFS="$IFS_save"
26849    else
26850      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26851$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26852      new_path="$path"
26853    fi
26854
26855    if test "x$new_path" = x; then
26856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26857$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26858      has_space=`$ECHO "$complete" | $GREP " "`
26859      if test "x$has_space" != x; then
26860        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26861$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26862      fi
26863      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26864    fi
26865  fi
26866
26867  # Now join together the path and the arguments once again
26868  if test "x$arguments" != xEOL; then
26869    new_complete="$new_path ${arguments% *}"
26870  else
26871    new_complete="$new_path"
26872  fi
26873
26874  if test "x$complete" != "x$new_complete"; then
26875    MCS="$new_complete"
26876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26877$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26878  fi
26879
26880  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26881    if test -n "$ac_tool_prefix"; then
26882  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26883set dummy ${ac_tool_prefix}nm; ac_word=$2
26884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26885$as_echo_n "checking for $ac_word... " >&6; }
26886if ${ac_cv_prog_NM+:} false; then :
26887  $as_echo_n "(cached) " >&6
26888else
26889  if test -n "$NM"; then
26890  ac_cv_prog_NM="$NM" # Let the user override the test.
26891else
26892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26893for as_dir in $PATH
26894do
26895  IFS=$as_save_IFS
26896  test -z "$as_dir" && as_dir=.
26897    for ac_exec_ext in '' $ac_executable_extensions; do
26898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26899    ac_cv_prog_NM="${ac_tool_prefix}nm"
26900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26901    break 2
26902  fi
26903done
26904  done
26905IFS=$as_save_IFS
26906
26907fi
26908fi
26909NM=$ac_cv_prog_NM
26910if test -n "$NM"; then
26911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26912$as_echo "$NM" >&6; }
26913else
26914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26915$as_echo "no" >&6; }
26916fi
26917
26918
26919fi
26920if test -z "$ac_cv_prog_NM"; then
26921  ac_ct_NM=$NM
26922  # Extract the first word of "nm", so it can be a program name with args.
26923set dummy nm; ac_word=$2
26924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26925$as_echo_n "checking for $ac_word... " >&6; }
26926if ${ac_cv_prog_ac_ct_NM+:} false; then :
26927  $as_echo_n "(cached) " >&6
26928else
26929  if test -n "$ac_ct_NM"; then
26930  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26931else
26932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26933for as_dir in $PATH
26934do
26935  IFS=$as_save_IFS
26936  test -z "$as_dir" && as_dir=.
26937    for ac_exec_ext in '' $ac_executable_extensions; do
26938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26939    ac_cv_prog_ac_ct_NM="nm"
26940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26941    break 2
26942  fi
26943done
26944  done
26945IFS=$as_save_IFS
26946
26947fi
26948fi
26949ac_ct_NM=$ac_cv_prog_ac_ct_NM
26950if test -n "$ac_ct_NM"; then
26951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26952$as_echo "$ac_ct_NM" >&6; }
26953else
26954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26955$as_echo "no" >&6; }
26956fi
26957
26958  if test "x$ac_ct_NM" = x; then
26959    NM=""
26960  else
26961    case $cross_compiling:$ac_tool_warned in
26962yes:)
26963{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26964$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26965ac_tool_warned=yes ;;
26966esac
26967    NM=$ac_ct_NM
26968  fi
26969else
26970  NM="$ac_cv_prog_NM"
26971fi
26972
26973
26974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26975
26976  # First separate the path from the arguments. This will split at the first
26977  # space.
26978  complete="$NM"
26979  path="${complete%% *}"
26980  tmp="$complete EOL"
26981  arguments="${tmp#* }"
26982
26983  # Input might be given as Windows format, start by converting to
26984  # unix format.
26985  new_path=`$CYGPATH -u "$path"`
26986
26987  # Now try to locate executable using which
26988  new_path=`$WHICH "$new_path" 2> /dev/null`
26989  # bat and cmd files are not always considered executable in cygwin causing which
26990  # to not find them
26991  if test "x$new_path" = x \
26992      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26993      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26994    new_path=`$CYGPATH -u "$path"`
26995  fi
26996  if test "x$new_path" = x; then
26997    # Oops. Which didn't find the executable.
26998    # The splitting of arguments from the executable at a space might have been incorrect,
26999    # since paths with space are more likely in Windows. Give it another try with the whole
27000    # argument.
27001    path="$complete"
27002    arguments="EOL"
27003    new_path=`$CYGPATH -u "$path"`
27004    new_path=`$WHICH "$new_path" 2> /dev/null`
27005    # bat and cmd files are not always considered executable in cygwin causing which
27006    # to not find them
27007    if test "x$new_path" = x \
27008        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27009        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27010      new_path=`$CYGPATH -u "$path"`
27011    fi
27012    if test "x$new_path" = x; then
27013      # It's still not found. Now this is an unrecoverable error.
27014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27015$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27016      has_space=`$ECHO "$complete" | $GREP " "`
27017      if test "x$has_space" != x; then
27018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27020      fi
27021      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27022    fi
27023  fi
27024
27025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27028  # "foo.exe" is OK but "foo" is an error.
27029  #
27030  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27031  # It is also a way to make sure we got the proper file name for the real test later on.
27032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27033  if test "x$test_shortpath" = x; then
27034    # Short path failed, file does not exist as specified.
27035    # Try adding .exe or .cmd
27036    if test -f "${new_path}.exe"; then
27037      input_to_shortpath="${new_path}.exe"
27038    elif test -f "${new_path}.cmd"; then
27039      input_to_shortpath="${new_path}.cmd"
27040    else
27041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27042$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27045      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27046    fi
27047  else
27048    input_to_shortpath="$new_path"
27049  fi
27050
27051  # Call helper function which possibly converts this using DOS-style short mode.
27052  # If so, the updated path is stored in $new_path.
27053  new_path="$input_to_shortpath"
27054
27055  input_path="$input_to_shortpath"
27056  # Check if we need to convert this using DOS-style short mode. If the path
27057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27058  # take no chances and rewrite it.
27059  # Note: m4 eats our [], so we need to use [ and ] instead.
27060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27061  if test "x$has_forbidden_chars" != x; then
27062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27066      # Going to short mode and back again did indeed matter. Since short mode is
27067      # case insensitive, let's make it lowercase to improve readability.
27068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27069      # Now convert it back to Unix-stile (cygpath)
27070      input_path=`$CYGPATH -u "$shortmode_path"`
27071      new_path="$input_path"
27072    fi
27073  fi
27074
27075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27076  if test "x$test_cygdrive_prefix" = x; then
27077    # As a simple fix, exclude /usr/bin since it's not a real path.
27078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27080      # a path prefixed by /cygdrive for fixpath to work.
27081      new_path="$CYGWIN_ROOT_PATH$input_path"
27082    fi
27083  fi
27084
27085  # remove trailing .exe if any
27086  new_path="${new_path/%.exe/}"
27087
27088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27089
27090  # First separate the path from the arguments. This will split at the first
27091  # space.
27092  complete="$NM"
27093  path="${complete%% *}"
27094  tmp="$complete EOL"
27095  arguments="${tmp#* }"
27096
27097  # Input might be given as Windows format, start by converting to
27098  # unix format.
27099  new_path="$path"
27100
27101  windows_path="$new_path"
27102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27103    unix_path=`$CYGPATH -u "$windows_path"`
27104    new_path="$unix_path"
27105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27107    new_path="$unix_path"
27108  fi
27109
27110
27111  # Now try to locate executable using which
27112  new_path=`$WHICH "$new_path" 2> /dev/null`
27113
27114  if test "x$new_path" = x; then
27115    # Oops. Which didn't find the executable.
27116    # The splitting of arguments from the executable at a space might have been incorrect,
27117    # since paths with space are more likely in Windows. Give it another try with the whole
27118    # argument.
27119    path="$complete"
27120    arguments="EOL"
27121    new_path="$path"
27122
27123  windows_path="$new_path"
27124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27125    unix_path=`$CYGPATH -u "$windows_path"`
27126    new_path="$unix_path"
27127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27129    new_path="$unix_path"
27130  fi
27131
27132
27133    new_path=`$WHICH "$new_path" 2> /dev/null`
27134
27135    if test "x$new_path" = x; then
27136      # It's still not found. Now this is an unrecoverable error.
27137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27138$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27139      has_space=`$ECHO "$complete" | $GREP " "`
27140      if test "x$has_space" != x; then
27141        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27142$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27143      fi
27144      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27145    fi
27146  fi
27147
27148  # Now new_path has a complete unix path to the binary
27149  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27150    # Keep paths in /bin as-is, but remove trailing .exe if any
27151    new_path="${new_path/%.exe/}"
27152    # Do not save /bin paths to all_fixpath_prefixes!
27153  else
27154    # Not in mixed or Windows style, start by that.
27155    new_path=`cmd //c echo $new_path`
27156
27157  input_path="$new_path"
27158  # Check if we need to convert this using DOS-style short mode. If the path
27159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27160  # take no chances and rewrite it.
27161  # Note: m4 eats our [], so we need to use [ and ] instead.
27162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27163  if test "x$has_forbidden_chars" != x; then
27164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27166  fi
27167
27168    # Output is in $new_path
27169
27170  windows_path="$new_path"
27171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27172    unix_path=`$CYGPATH -u "$windows_path"`
27173    new_path="$unix_path"
27174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27176    new_path="$unix_path"
27177  fi
27178
27179    # remove trailing .exe if any
27180    new_path="${new_path/%.exe/}"
27181
27182    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27183    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27184  fi
27185
27186  else
27187    # We're on a posix platform. Hooray! :)
27188    # First separate the path from the arguments. This will split at the first
27189    # space.
27190    complete="$NM"
27191    path="${complete%% *}"
27192    tmp="$complete EOL"
27193    arguments="${tmp#* }"
27194
27195    # Cannot rely on the command "which" here since it doesn't always work.
27196    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27197    if test -z "$is_absolute_path"; then
27198      # Path to executable is not absolute. Find it.
27199      IFS_save="$IFS"
27200      IFS=:
27201      for p in $PATH; do
27202        if test -f "$p/$path" && test -x "$p/$path"; then
27203          new_path="$p/$path"
27204          break
27205        fi
27206      done
27207      IFS="$IFS_save"
27208    else
27209      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27210$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27211      new_path="$path"
27212    fi
27213
27214    if test "x$new_path" = x; then
27215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27216$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27217      has_space=`$ECHO "$complete" | $GREP " "`
27218      if test "x$has_space" != x; then
27219        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27221      fi
27222      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27223    fi
27224  fi
27225
27226  # Now join together the path and the arguments once again
27227  if test "x$arguments" != xEOL; then
27228    new_complete="$new_path ${arguments% *}"
27229  else
27230    new_complete="$new_path"
27231  fi
27232
27233  if test "x$complete" != "x$new_complete"; then
27234    NM="$new_complete"
27235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27236$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27237  fi
27238
27239    GNM="$NM"
27240
27241    if test -n "$ac_tool_prefix"; then
27242  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27243set dummy ${ac_tool_prefix}strip; ac_word=$2
27244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27245$as_echo_n "checking for $ac_word... " >&6; }
27246if ${ac_cv_prog_STRIP+:} false; then :
27247  $as_echo_n "(cached) " >&6
27248else
27249  if test -n "$STRIP"; then
27250  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27251else
27252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27253for as_dir in $PATH
27254do
27255  IFS=$as_save_IFS
27256  test -z "$as_dir" && as_dir=.
27257    for ac_exec_ext in '' $ac_executable_extensions; do
27258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27259    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27261    break 2
27262  fi
27263done
27264  done
27265IFS=$as_save_IFS
27266
27267fi
27268fi
27269STRIP=$ac_cv_prog_STRIP
27270if test -n "$STRIP"; then
27271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27272$as_echo "$STRIP" >&6; }
27273else
27274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27275$as_echo "no" >&6; }
27276fi
27277
27278
27279fi
27280if test -z "$ac_cv_prog_STRIP"; then
27281  ac_ct_STRIP=$STRIP
27282  # Extract the first word of "strip", so it can be a program name with args.
27283set dummy strip; ac_word=$2
27284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27285$as_echo_n "checking for $ac_word... " >&6; }
27286if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27287  $as_echo_n "(cached) " >&6
27288else
27289  if test -n "$ac_ct_STRIP"; then
27290  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27291else
27292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27293for as_dir in $PATH
27294do
27295  IFS=$as_save_IFS
27296  test -z "$as_dir" && as_dir=.
27297    for ac_exec_ext in '' $ac_executable_extensions; do
27298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27299    ac_cv_prog_ac_ct_STRIP="strip"
27300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27301    break 2
27302  fi
27303done
27304  done
27305IFS=$as_save_IFS
27306
27307fi
27308fi
27309ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27310if test -n "$ac_ct_STRIP"; then
27311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27312$as_echo "$ac_ct_STRIP" >&6; }
27313else
27314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27315$as_echo "no" >&6; }
27316fi
27317
27318  if test "x$ac_ct_STRIP" = x; then
27319    STRIP=""
27320  else
27321    case $cross_compiling:$ac_tool_warned in
27322yes:)
27323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27325ac_tool_warned=yes ;;
27326esac
27327    STRIP=$ac_ct_STRIP
27328  fi
27329else
27330  STRIP="$ac_cv_prog_STRIP"
27331fi
27332
27333
27334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27335
27336  # First separate the path from the arguments. This will split at the first
27337  # space.
27338  complete="$STRIP"
27339  path="${complete%% *}"
27340  tmp="$complete EOL"
27341  arguments="${tmp#* }"
27342
27343  # Input might be given as Windows format, start by converting to
27344  # unix format.
27345  new_path=`$CYGPATH -u "$path"`
27346
27347  # Now try to locate executable using which
27348  new_path=`$WHICH "$new_path" 2> /dev/null`
27349  # bat and cmd files are not always considered executable in cygwin causing which
27350  # to not find them
27351  if test "x$new_path" = x \
27352      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27353      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27354    new_path=`$CYGPATH -u "$path"`
27355  fi
27356  if test "x$new_path" = x; then
27357    # Oops. Which didn't find the executable.
27358    # The splitting of arguments from the executable at a space might have been incorrect,
27359    # since paths with space are more likely in Windows. Give it another try with the whole
27360    # argument.
27361    path="$complete"
27362    arguments="EOL"
27363    new_path=`$CYGPATH -u "$path"`
27364    new_path=`$WHICH "$new_path" 2> /dev/null`
27365    # bat and cmd files are not always considered executable in cygwin causing which
27366    # to not find them
27367    if test "x$new_path" = x \
27368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27370      new_path=`$CYGPATH -u "$path"`
27371    fi
27372    if test "x$new_path" = x; then
27373      # It's still not found. Now this is an unrecoverable error.
27374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27375$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27376      has_space=`$ECHO "$complete" | $GREP " "`
27377      if test "x$has_space" != x; then
27378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27380      fi
27381      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27382    fi
27383  fi
27384
27385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27388  # "foo.exe" is OK but "foo" is an error.
27389  #
27390  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27391  # It is also a way to make sure we got the proper file name for the real test later on.
27392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27393  if test "x$test_shortpath" = x; then
27394    # Short path failed, file does not exist as specified.
27395    # Try adding .exe or .cmd
27396    if test -f "${new_path}.exe"; then
27397      input_to_shortpath="${new_path}.exe"
27398    elif test -f "${new_path}.cmd"; then
27399      input_to_shortpath="${new_path}.cmd"
27400    else
27401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27402$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27403      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27404$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27405      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27406    fi
27407  else
27408    input_to_shortpath="$new_path"
27409  fi
27410
27411  # Call helper function which possibly converts this using DOS-style short mode.
27412  # If so, the updated path is stored in $new_path.
27413  new_path="$input_to_shortpath"
27414
27415  input_path="$input_to_shortpath"
27416  # Check if we need to convert this using DOS-style short mode. If the path
27417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27418  # take no chances and rewrite it.
27419  # Note: m4 eats our [], so we need to use [ and ] instead.
27420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27421  if test "x$has_forbidden_chars" != x; then
27422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27426      # Going to short mode and back again did indeed matter. Since short mode is
27427      # case insensitive, let's make it lowercase to improve readability.
27428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27429      # Now convert it back to Unix-stile (cygpath)
27430      input_path=`$CYGPATH -u "$shortmode_path"`
27431      new_path="$input_path"
27432    fi
27433  fi
27434
27435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27436  if test "x$test_cygdrive_prefix" = x; then
27437    # As a simple fix, exclude /usr/bin since it's not a real path.
27438    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27440      # a path prefixed by /cygdrive for fixpath to work.
27441      new_path="$CYGWIN_ROOT_PATH$input_path"
27442    fi
27443  fi
27444
27445  # remove trailing .exe if any
27446  new_path="${new_path/%.exe/}"
27447
27448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27449
27450  # First separate the path from the arguments. This will split at the first
27451  # space.
27452  complete="$STRIP"
27453  path="${complete%% *}"
27454  tmp="$complete EOL"
27455  arguments="${tmp#* }"
27456
27457  # Input might be given as Windows format, start by converting to
27458  # unix format.
27459  new_path="$path"
27460
27461  windows_path="$new_path"
27462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27463    unix_path=`$CYGPATH -u "$windows_path"`
27464    new_path="$unix_path"
27465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27467    new_path="$unix_path"
27468  fi
27469
27470
27471  # Now try to locate executable using which
27472  new_path=`$WHICH "$new_path" 2> /dev/null`
27473
27474  if test "x$new_path" = x; then
27475    # Oops. Which didn't find the executable.
27476    # The splitting of arguments from the executable at a space might have been incorrect,
27477    # since paths with space are more likely in Windows. Give it another try with the whole
27478    # argument.
27479    path="$complete"
27480    arguments="EOL"
27481    new_path="$path"
27482
27483  windows_path="$new_path"
27484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27485    unix_path=`$CYGPATH -u "$windows_path"`
27486    new_path="$unix_path"
27487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27489    new_path="$unix_path"
27490  fi
27491
27492
27493    new_path=`$WHICH "$new_path" 2> /dev/null`
27494
27495    if test "x$new_path" = x; then
27496      # It's still not found. Now this is an unrecoverable error.
27497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27498$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27499      has_space=`$ECHO "$complete" | $GREP " "`
27500      if test "x$has_space" != x; then
27501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27503      fi
27504      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27505    fi
27506  fi
27507
27508  # Now new_path has a complete unix path to the binary
27509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27510    # Keep paths in /bin as-is, but remove trailing .exe if any
27511    new_path="${new_path/%.exe/}"
27512    # Do not save /bin paths to all_fixpath_prefixes!
27513  else
27514    # Not in mixed or Windows style, start by that.
27515    new_path=`cmd //c echo $new_path`
27516
27517  input_path="$new_path"
27518  # Check if we need to convert this using DOS-style short mode. If the path
27519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27520  # take no chances and rewrite it.
27521  # Note: m4 eats our [], so we need to use [ and ] instead.
27522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27523  if test "x$has_forbidden_chars" != x; then
27524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27526  fi
27527
27528    # Output is in $new_path
27529
27530  windows_path="$new_path"
27531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27532    unix_path=`$CYGPATH -u "$windows_path"`
27533    new_path="$unix_path"
27534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27536    new_path="$unix_path"
27537  fi
27538
27539    # remove trailing .exe if any
27540    new_path="${new_path/%.exe/}"
27541
27542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27544  fi
27545
27546  else
27547    # We're on a posix platform. Hooray! :)
27548    # First separate the path from the arguments. This will split at the first
27549    # space.
27550    complete="$STRIP"
27551    path="${complete%% *}"
27552    tmp="$complete EOL"
27553    arguments="${tmp#* }"
27554
27555    # Cannot rely on the command "which" here since it doesn't always work.
27556    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27557    if test -z "$is_absolute_path"; then
27558      # Path to executable is not absolute. Find it.
27559      IFS_save="$IFS"
27560      IFS=:
27561      for p in $PATH; do
27562        if test -f "$p/$path" && test -x "$p/$path"; then
27563          new_path="$p/$path"
27564          break
27565        fi
27566      done
27567      IFS="$IFS_save"
27568    else
27569      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27570$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27571      new_path="$path"
27572    fi
27573
27574    if test "x$new_path" = x; then
27575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27576$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27577      has_space=`$ECHO "$complete" | $GREP " "`
27578      if test "x$has_space" != x; then
27579        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27580$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27581      fi
27582      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27583    fi
27584  fi
27585
27586  # Now join together the path and the arguments once again
27587  if test "x$arguments" != xEOL; then
27588    new_complete="$new_path ${arguments% *}"
27589  else
27590    new_complete="$new_path"
27591  fi
27592
27593  if test "x$complete" != "x$new_complete"; then
27594    STRIP="$new_complete"
27595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27596$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27597  fi
27598
27599  fi
27600
27601  # objcopy is used for moving debug symbols to separate files when
27602  # full debug symbols are enabled.
27603  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27604    if test -n "$ac_tool_prefix"; then
27605  for ac_prog in gobjcopy objcopy
27606  do
27607    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27608set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27610$as_echo_n "checking for $ac_word... " >&6; }
27611if ${ac_cv_prog_OBJCOPY+:} false; then :
27612  $as_echo_n "(cached) " >&6
27613else
27614  if test -n "$OBJCOPY"; then
27615  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27616else
27617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27618for as_dir in $PATH
27619do
27620  IFS=$as_save_IFS
27621  test -z "$as_dir" && as_dir=.
27622    for ac_exec_ext in '' $ac_executable_extensions; do
27623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27624    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27626    break 2
27627  fi
27628done
27629  done
27630IFS=$as_save_IFS
27631
27632fi
27633fi
27634OBJCOPY=$ac_cv_prog_OBJCOPY
27635if test -n "$OBJCOPY"; then
27636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27637$as_echo "$OBJCOPY" >&6; }
27638else
27639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27640$as_echo "no" >&6; }
27641fi
27642
27643
27644    test -n "$OBJCOPY" && break
27645  done
27646fi
27647if test -z "$OBJCOPY"; then
27648  ac_ct_OBJCOPY=$OBJCOPY
27649  for ac_prog in gobjcopy objcopy
27650do
27651  # Extract the first word of "$ac_prog", so it can be a program name with args.
27652set dummy $ac_prog; ac_word=$2
27653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27654$as_echo_n "checking for $ac_word... " >&6; }
27655if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27656  $as_echo_n "(cached) " >&6
27657else
27658  if test -n "$ac_ct_OBJCOPY"; then
27659  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27660else
27661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27662for as_dir in $PATH
27663do
27664  IFS=$as_save_IFS
27665  test -z "$as_dir" && as_dir=.
27666    for ac_exec_ext in '' $ac_executable_extensions; do
27667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27668    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27670    break 2
27671  fi
27672done
27673  done
27674IFS=$as_save_IFS
27675
27676fi
27677fi
27678ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27679if test -n "$ac_ct_OBJCOPY"; then
27680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27681$as_echo "$ac_ct_OBJCOPY" >&6; }
27682else
27683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27684$as_echo "no" >&6; }
27685fi
27686
27687
27688  test -n "$ac_ct_OBJCOPY" && break
27689done
27690
27691  if test "x$ac_ct_OBJCOPY" = x; then
27692    OBJCOPY=""
27693  else
27694    case $cross_compiling:$ac_tool_warned in
27695yes:)
27696{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27697$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27698ac_tool_warned=yes ;;
27699esac
27700    OBJCOPY=$ac_ct_OBJCOPY
27701  fi
27702fi
27703
27704    # Only call fixup if objcopy was found.
27705    if test -n "$OBJCOPY"; then
27706
27707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27708
27709  # First separate the path from the arguments. This will split at the first
27710  # space.
27711  complete="$OBJCOPY"
27712  path="${complete%% *}"
27713  tmp="$complete EOL"
27714  arguments="${tmp#* }"
27715
27716  # Input might be given as Windows format, start by converting to
27717  # unix format.
27718  new_path=`$CYGPATH -u "$path"`
27719
27720  # Now try to locate executable using which
27721  new_path=`$WHICH "$new_path" 2> /dev/null`
27722  # bat and cmd files are not always considered executable in cygwin causing which
27723  # to not find them
27724  if test "x$new_path" = x \
27725      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27726      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27727    new_path=`$CYGPATH -u "$path"`
27728  fi
27729  if test "x$new_path" = x; then
27730    # Oops. Which didn't find the executable.
27731    # The splitting of arguments from the executable at a space might have been incorrect,
27732    # since paths with space are more likely in Windows. Give it another try with the whole
27733    # argument.
27734    path="$complete"
27735    arguments="EOL"
27736    new_path=`$CYGPATH -u "$path"`
27737    new_path=`$WHICH "$new_path" 2> /dev/null`
27738    # bat and cmd files are not always considered executable in cygwin causing which
27739    # to not find them
27740    if test "x$new_path" = x \
27741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27743      new_path=`$CYGPATH -u "$path"`
27744    fi
27745    if test "x$new_path" = x; then
27746      # It's still not found. Now this is an unrecoverable error.
27747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27748$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27749      has_space=`$ECHO "$complete" | $GREP " "`
27750      if test "x$has_space" != x; then
27751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27753      fi
27754      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27755    fi
27756  fi
27757
27758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27761  # "foo.exe" is OK but "foo" is an error.
27762  #
27763  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27764  # It is also a way to make sure we got the proper file name for the real test later on.
27765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27766  if test "x$test_shortpath" = x; then
27767    # Short path failed, file does not exist as specified.
27768    # Try adding .exe or .cmd
27769    if test -f "${new_path}.exe"; then
27770      input_to_shortpath="${new_path}.exe"
27771    elif test -f "${new_path}.cmd"; then
27772      input_to_shortpath="${new_path}.cmd"
27773    else
27774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27775$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27776      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27777$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27778      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27779    fi
27780  else
27781    input_to_shortpath="$new_path"
27782  fi
27783
27784  # Call helper function which possibly converts this using DOS-style short mode.
27785  # If so, the updated path is stored in $new_path.
27786  new_path="$input_to_shortpath"
27787
27788  input_path="$input_to_shortpath"
27789  # Check if we need to convert this using DOS-style short mode. If the path
27790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27791  # take no chances and rewrite it.
27792  # Note: m4 eats our [], so we need to use [ and ] instead.
27793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27794  if test "x$has_forbidden_chars" != x; then
27795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27799      # Going to short mode and back again did indeed matter. Since short mode is
27800      # case insensitive, let's make it lowercase to improve readability.
27801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27802      # Now convert it back to Unix-stile (cygpath)
27803      input_path=`$CYGPATH -u "$shortmode_path"`
27804      new_path="$input_path"
27805    fi
27806  fi
27807
27808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27809  if test "x$test_cygdrive_prefix" = x; then
27810    # As a simple fix, exclude /usr/bin since it's not a real path.
27811    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27813      # a path prefixed by /cygdrive for fixpath to work.
27814      new_path="$CYGWIN_ROOT_PATH$input_path"
27815    fi
27816  fi
27817
27818  # remove trailing .exe if any
27819  new_path="${new_path/%.exe/}"
27820
27821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27822
27823  # First separate the path from the arguments. This will split at the first
27824  # space.
27825  complete="$OBJCOPY"
27826  path="${complete%% *}"
27827  tmp="$complete EOL"
27828  arguments="${tmp#* }"
27829
27830  # Input might be given as Windows format, start by converting to
27831  # unix format.
27832  new_path="$path"
27833
27834  windows_path="$new_path"
27835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27836    unix_path=`$CYGPATH -u "$windows_path"`
27837    new_path="$unix_path"
27838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27840    new_path="$unix_path"
27841  fi
27842
27843
27844  # Now try to locate executable using which
27845  new_path=`$WHICH "$new_path" 2> /dev/null`
27846
27847  if test "x$new_path" = x; then
27848    # Oops. Which didn't find the executable.
27849    # The splitting of arguments from the executable at a space might have been incorrect,
27850    # since paths with space are more likely in Windows. Give it another try with the whole
27851    # argument.
27852    path="$complete"
27853    arguments="EOL"
27854    new_path="$path"
27855
27856  windows_path="$new_path"
27857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27858    unix_path=`$CYGPATH -u "$windows_path"`
27859    new_path="$unix_path"
27860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27862    new_path="$unix_path"
27863  fi
27864
27865
27866    new_path=`$WHICH "$new_path" 2> /dev/null`
27867
27868    if test "x$new_path" = x; then
27869      # It's still not found. Now this is an unrecoverable error.
27870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27871$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27872      has_space=`$ECHO "$complete" | $GREP " "`
27873      if test "x$has_space" != x; then
27874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27876      fi
27877      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27878    fi
27879  fi
27880
27881  # Now new_path has a complete unix path to the binary
27882  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27883    # Keep paths in /bin as-is, but remove trailing .exe if any
27884    new_path="${new_path/%.exe/}"
27885    # Do not save /bin paths to all_fixpath_prefixes!
27886  else
27887    # Not in mixed or Windows style, start by that.
27888    new_path=`cmd //c echo $new_path`
27889
27890  input_path="$new_path"
27891  # Check if we need to convert this using DOS-style short mode. If the path
27892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27893  # take no chances and rewrite it.
27894  # Note: m4 eats our [], so we need to use [ and ] instead.
27895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27896  if test "x$has_forbidden_chars" != x; then
27897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27899  fi
27900
27901    # Output is in $new_path
27902
27903  windows_path="$new_path"
27904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27905    unix_path=`$CYGPATH -u "$windows_path"`
27906    new_path="$unix_path"
27907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27909    new_path="$unix_path"
27910  fi
27911
27912    # remove trailing .exe if any
27913    new_path="${new_path/%.exe/}"
27914
27915    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27916    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27917  fi
27918
27919  else
27920    # We're on a posix platform. Hooray! :)
27921    # First separate the path from the arguments. This will split at the first
27922    # space.
27923    complete="$OBJCOPY"
27924    path="${complete%% *}"
27925    tmp="$complete EOL"
27926    arguments="${tmp#* }"
27927
27928    # Cannot rely on the command "which" here since it doesn't always work.
27929    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27930    if test -z "$is_absolute_path"; then
27931      # Path to executable is not absolute. Find it.
27932      IFS_save="$IFS"
27933      IFS=:
27934      for p in $PATH; do
27935        if test -f "$p/$path" && test -x "$p/$path"; then
27936          new_path="$p/$path"
27937          break
27938        fi
27939      done
27940      IFS="$IFS_save"
27941    else
27942      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27943$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27944      new_path="$path"
27945    fi
27946
27947    if test "x$new_path" = x; then
27948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27949$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27950      has_space=`$ECHO "$complete" | $GREP " "`
27951      if test "x$has_space" != x; then
27952        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27953$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27954      fi
27955      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27956    fi
27957  fi
27958
27959  # Now join together the path and the arguments once again
27960  if test "x$arguments" != xEOL; then
27961    new_complete="$new_path ${arguments% *}"
27962  else
27963    new_complete="$new_path"
27964  fi
27965
27966  if test "x$complete" != "x$new_complete"; then
27967    OBJCOPY="$new_complete"
27968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27969$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27970  fi
27971
27972    fi
27973  fi
27974
27975  if test -n "$ac_tool_prefix"; then
27976  for ac_prog in gobjdump objdump
27977  do
27978    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27979set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27981$as_echo_n "checking for $ac_word... " >&6; }
27982if ${ac_cv_prog_OBJDUMP+:} false; then :
27983  $as_echo_n "(cached) " >&6
27984else
27985  if test -n "$OBJDUMP"; then
27986  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27987else
27988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27989for as_dir in $PATH
27990do
27991  IFS=$as_save_IFS
27992  test -z "$as_dir" && as_dir=.
27993    for ac_exec_ext in '' $ac_executable_extensions; do
27994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27995    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27997    break 2
27998  fi
27999done
28000  done
28001IFS=$as_save_IFS
28002
28003fi
28004fi
28005OBJDUMP=$ac_cv_prog_OBJDUMP
28006if test -n "$OBJDUMP"; then
28007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28008$as_echo "$OBJDUMP" >&6; }
28009else
28010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28011$as_echo "no" >&6; }
28012fi
28013
28014
28015    test -n "$OBJDUMP" && break
28016  done
28017fi
28018if test -z "$OBJDUMP"; then
28019  ac_ct_OBJDUMP=$OBJDUMP
28020  for ac_prog in gobjdump objdump
28021do
28022  # Extract the first word of "$ac_prog", so it can be a program name with args.
28023set dummy $ac_prog; ac_word=$2
28024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28025$as_echo_n "checking for $ac_word... " >&6; }
28026if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28027  $as_echo_n "(cached) " >&6
28028else
28029  if test -n "$ac_ct_OBJDUMP"; then
28030  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28031else
28032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28033for as_dir in $PATH
28034do
28035  IFS=$as_save_IFS
28036  test -z "$as_dir" && as_dir=.
28037    for ac_exec_ext in '' $ac_executable_extensions; do
28038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28039    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28041    break 2
28042  fi
28043done
28044  done
28045IFS=$as_save_IFS
28046
28047fi
28048fi
28049ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28050if test -n "$ac_ct_OBJDUMP"; then
28051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28052$as_echo "$ac_ct_OBJDUMP" >&6; }
28053else
28054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28055$as_echo "no" >&6; }
28056fi
28057
28058
28059  test -n "$ac_ct_OBJDUMP" && break
28060done
28061
28062  if test "x$ac_ct_OBJDUMP" = x; then
28063    OBJDUMP=""
28064  else
28065    case $cross_compiling:$ac_tool_warned in
28066yes:)
28067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28069ac_tool_warned=yes ;;
28070esac
28071    OBJDUMP=$ac_ct_OBJDUMP
28072  fi
28073fi
28074
28075  if test "x$OBJDUMP" != x; then
28076    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28077
28078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28079
28080  # First separate the path from the arguments. This will split at the first
28081  # space.
28082  complete="$OBJDUMP"
28083  path="${complete%% *}"
28084  tmp="$complete EOL"
28085  arguments="${tmp#* }"
28086
28087  # Input might be given as Windows format, start by converting to
28088  # unix format.
28089  new_path=`$CYGPATH -u "$path"`
28090
28091  # Now try to locate executable using which
28092  new_path=`$WHICH "$new_path" 2> /dev/null`
28093  # bat and cmd files are not always considered executable in cygwin causing which
28094  # to not find them
28095  if test "x$new_path" = x \
28096      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28097      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28098    new_path=`$CYGPATH -u "$path"`
28099  fi
28100  if test "x$new_path" = x; then
28101    # Oops. Which didn't find the executable.
28102    # The splitting of arguments from the executable at a space might have been incorrect,
28103    # since paths with space are more likely in Windows. Give it another try with the whole
28104    # argument.
28105    path="$complete"
28106    arguments="EOL"
28107    new_path=`$CYGPATH -u "$path"`
28108    new_path=`$WHICH "$new_path" 2> /dev/null`
28109    # bat and cmd files are not always considered executable in cygwin causing which
28110    # to not find them
28111    if test "x$new_path" = x \
28112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28114      new_path=`$CYGPATH -u "$path"`
28115    fi
28116    if test "x$new_path" = x; then
28117      # It's still not found. Now this is an unrecoverable error.
28118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28119$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28120      has_space=`$ECHO "$complete" | $GREP " "`
28121      if test "x$has_space" != x; then
28122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28124      fi
28125      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28126    fi
28127  fi
28128
28129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28132  # "foo.exe" is OK but "foo" is an error.
28133  #
28134  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28135  # It is also a way to make sure we got the proper file name for the real test later on.
28136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28137  if test "x$test_shortpath" = x; then
28138    # Short path failed, file does not exist as specified.
28139    # Try adding .exe or .cmd
28140    if test -f "${new_path}.exe"; then
28141      input_to_shortpath="${new_path}.exe"
28142    elif test -f "${new_path}.cmd"; then
28143      input_to_shortpath="${new_path}.cmd"
28144    else
28145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28146$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28147      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28148$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28149      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28150    fi
28151  else
28152    input_to_shortpath="$new_path"
28153  fi
28154
28155  # Call helper function which possibly converts this using DOS-style short mode.
28156  # If so, the updated path is stored in $new_path.
28157  new_path="$input_to_shortpath"
28158
28159  input_path="$input_to_shortpath"
28160  # Check if we need to convert this using DOS-style short mode. If the path
28161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28162  # take no chances and rewrite it.
28163  # Note: m4 eats our [], so we need to use [ and ] instead.
28164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28165  if test "x$has_forbidden_chars" != x; then
28166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28170      # Going to short mode and back again did indeed matter. Since short mode is
28171      # case insensitive, let's make it lowercase to improve readability.
28172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28173      # Now convert it back to Unix-stile (cygpath)
28174      input_path=`$CYGPATH -u "$shortmode_path"`
28175      new_path="$input_path"
28176    fi
28177  fi
28178
28179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28180  if test "x$test_cygdrive_prefix" = x; then
28181    # As a simple fix, exclude /usr/bin since it's not a real path.
28182    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28184      # a path prefixed by /cygdrive for fixpath to work.
28185      new_path="$CYGWIN_ROOT_PATH$input_path"
28186    fi
28187  fi
28188
28189  # remove trailing .exe if any
28190  new_path="${new_path/%.exe/}"
28191
28192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28193
28194  # First separate the path from the arguments. This will split at the first
28195  # space.
28196  complete="$OBJDUMP"
28197  path="${complete%% *}"
28198  tmp="$complete EOL"
28199  arguments="${tmp#* }"
28200
28201  # Input might be given as Windows format, start by converting to
28202  # unix format.
28203  new_path="$path"
28204
28205  windows_path="$new_path"
28206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28207    unix_path=`$CYGPATH -u "$windows_path"`
28208    new_path="$unix_path"
28209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28211    new_path="$unix_path"
28212  fi
28213
28214
28215  # Now try to locate executable using which
28216  new_path=`$WHICH "$new_path" 2> /dev/null`
28217
28218  if test "x$new_path" = x; then
28219    # Oops. Which didn't find the executable.
28220    # The splitting of arguments from the executable at a space might have been incorrect,
28221    # since paths with space are more likely in Windows. Give it another try with the whole
28222    # argument.
28223    path="$complete"
28224    arguments="EOL"
28225    new_path="$path"
28226
28227  windows_path="$new_path"
28228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28229    unix_path=`$CYGPATH -u "$windows_path"`
28230    new_path="$unix_path"
28231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28233    new_path="$unix_path"
28234  fi
28235
28236
28237    new_path=`$WHICH "$new_path" 2> /dev/null`
28238
28239    if test "x$new_path" = x; then
28240      # It's still not found. Now this is an unrecoverable error.
28241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28242$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28243      has_space=`$ECHO "$complete" | $GREP " "`
28244      if test "x$has_space" != x; then
28245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28247      fi
28248      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28249    fi
28250  fi
28251
28252  # Now new_path has a complete unix path to the binary
28253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28254    # Keep paths in /bin as-is, but remove trailing .exe if any
28255    new_path="${new_path/%.exe/}"
28256    # Do not save /bin paths to all_fixpath_prefixes!
28257  else
28258    # Not in mixed or Windows style, start by that.
28259    new_path=`cmd //c echo $new_path`
28260
28261  input_path="$new_path"
28262  # Check if we need to convert this using DOS-style short mode. If the path
28263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28264  # take no chances and rewrite it.
28265  # Note: m4 eats our [], so we need to use [ and ] instead.
28266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28267  if test "x$has_forbidden_chars" != x; then
28268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28270  fi
28271
28272    # Output is in $new_path
28273
28274  windows_path="$new_path"
28275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28276    unix_path=`$CYGPATH -u "$windows_path"`
28277    new_path="$unix_path"
28278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28280    new_path="$unix_path"
28281  fi
28282
28283    # remove trailing .exe if any
28284    new_path="${new_path/%.exe/}"
28285
28286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28288  fi
28289
28290  else
28291    # We're on a posix platform. Hooray! :)
28292    # First separate the path from the arguments. This will split at the first
28293    # space.
28294    complete="$OBJDUMP"
28295    path="${complete%% *}"
28296    tmp="$complete EOL"
28297    arguments="${tmp#* }"
28298
28299    # Cannot rely on the command "which" here since it doesn't always work.
28300    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28301    if test -z "$is_absolute_path"; then
28302      # Path to executable is not absolute. Find it.
28303      IFS_save="$IFS"
28304      IFS=:
28305      for p in $PATH; do
28306        if test -f "$p/$path" && test -x "$p/$path"; then
28307          new_path="$p/$path"
28308          break
28309        fi
28310      done
28311      IFS="$IFS_save"
28312    else
28313      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28314$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28315      new_path="$path"
28316    fi
28317
28318    if test "x$new_path" = x; then
28319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28320$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28321      has_space=`$ECHO "$complete" | $GREP " "`
28322      if test "x$has_space" != x; then
28323        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28324$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28325      fi
28326      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28327    fi
28328  fi
28329
28330  # Now join together the path and the arguments once again
28331  if test "x$arguments" != xEOL; then
28332    new_complete="$new_path ${arguments% *}"
28333  else
28334    new_complete="$new_path"
28335  fi
28336
28337  if test "x$complete" != "x$new_complete"; then
28338    OBJDUMP="$new_complete"
28339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28340$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28341  fi
28342
28343  fi
28344
28345  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28346    # Extract the first word of "lipo", so it can be a program name with args.
28347set dummy lipo; ac_word=$2
28348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28349$as_echo_n "checking for $ac_word... " >&6; }
28350if ${ac_cv_path_LIPO+:} false; then :
28351  $as_echo_n "(cached) " >&6
28352else
28353  case $LIPO in
28354  [\\/]* | ?:[\\/]*)
28355  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28356  ;;
28357  *)
28358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28359for as_dir in $PATH
28360do
28361  IFS=$as_save_IFS
28362  test -z "$as_dir" && as_dir=.
28363    for ac_exec_ext in '' $ac_executable_extensions; do
28364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28365    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28367    break 2
28368  fi
28369done
28370  done
28371IFS=$as_save_IFS
28372
28373  ;;
28374esac
28375fi
28376LIPO=$ac_cv_path_LIPO
28377if test -n "$LIPO"; then
28378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28379$as_echo "$LIPO" >&6; }
28380else
28381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28382$as_echo "no" >&6; }
28383fi
28384
28385
28386
28387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28388
28389  # First separate the path from the arguments. This will split at the first
28390  # space.
28391  complete="$LIPO"
28392  path="${complete%% *}"
28393  tmp="$complete EOL"
28394  arguments="${tmp#* }"
28395
28396  # Input might be given as Windows format, start by converting to
28397  # unix format.
28398  new_path=`$CYGPATH -u "$path"`
28399
28400  # Now try to locate executable using which
28401  new_path=`$WHICH "$new_path" 2> /dev/null`
28402  # bat and cmd files are not always considered executable in cygwin causing which
28403  # to not find them
28404  if test "x$new_path" = x \
28405      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28406      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28407    new_path=`$CYGPATH -u "$path"`
28408  fi
28409  if test "x$new_path" = x; then
28410    # Oops. Which didn't find the executable.
28411    # The splitting of arguments from the executable at a space might have been incorrect,
28412    # since paths with space are more likely in Windows. Give it another try with the whole
28413    # argument.
28414    path="$complete"
28415    arguments="EOL"
28416    new_path=`$CYGPATH -u "$path"`
28417    new_path=`$WHICH "$new_path" 2> /dev/null`
28418    # bat and cmd files are not always considered executable in cygwin causing which
28419    # to not find them
28420    if test "x$new_path" = x \
28421        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28422        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28423      new_path=`$CYGPATH -u "$path"`
28424    fi
28425    if test "x$new_path" = x; then
28426      # It's still not found. Now this is an unrecoverable error.
28427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28428$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28429      has_space=`$ECHO "$complete" | $GREP " "`
28430      if test "x$has_space" != x; then
28431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28433      fi
28434      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28435    fi
28436  fi
28437
28438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28441  # "foo.exe" is OK but "foo" is an error.
28442  #
28443  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28444  # It is also a way to make sure we got the proper file name for the real test later on.
28445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28446  if test "x$test_shortpath" = x; then
28447    # Short path failed, file does not exist as specified.
28448    # Try adding .exe or .cmd
28449    if test -f "${new_path}.exe"; then
28450      input_to_shortpath="${new_path}.exe"
28451    elif test -f "${new_path}.cmd"; then
28452      input_to_shortpath="${new_path}.cmd"
28453    else
28454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28455$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28456      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28457$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28458      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28459    fi
28460  else
28461    input_to_shortpath="$new_path"
28462  fi
28463
28464  # Call helper function which possibly converts this using DOS-style short mode.
28465  # If so, the updated path is stored in $new_path.
28466  new_path="$input_to_shortpath"
28467
28468  input_path="$input_to_shortpath"
28469  # Check if we need to convert this using DOS-style short mode. If the path
28470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28471  # take no chances and rewrite it.
28472  # Note: m4 eats our [], so we need to use [ and ] instead.
28473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28474  if test "x$has_forbidden_chars" != x; then
28475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28479      # Going to short mode and back again did indeed matter. Since short mode is
28480      # case insensitive, let's make it lowercase to improve readability.
28481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28482      # Now convert it back to Unix-stile (cygpath)
28483      input_path=`$CYGPATH -u "$shortmode_path"`
28484      new_path="$input_path"
28485    fi
28486  fi
28487
28488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28489  if test "x$test_cygdrive_prefix" = x; then
28490    # As a simple fix, exclude /usr/bin since it's not a real path.
28491    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28493      # a path prefixed by /cygdrive for fixpath to work.
28494      new_path="$CYGWIN_ROOT_PATH$input_path"
28495    fi
28496  fi
28497
28498  # remove trailing .exe if any
28499  new_path="${new_path/%.exe/}"
28500
28501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28502
28503  # First separate the path from the arguments. This will split at the first
28504  # space.
28505  complete="$LIPO"
28506  path="${complete%% *}"
28507  tmp="$complete EOL"
28508  arguments="${tmp#* }"
28509
28510  # Input might be given as Windows format, start by converting to
28511  # unix format.
28512  new_path="$path"
28513
28514  windows_path="$new_path"
28515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28516    unix_path=`$CYGPATH -u "$windows_path"`
28517    new_path="$unix_path"
28518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28520    new_path="$unix_path"
28521  fi
28522
28523
28524  # Now try to locate executable using which
28525  new_path=`$WHICH "$new_path" 2> /dev/null`
28526
28527  if test "x$new_path" = x; then
28528    # Oops. Which didn't find the executable.
28529    # The splitting of arguments from the executable at a space might have been incorrect,
28530    # since paths with space are more likely in Windows. Give it another try with the whole
28531    # argument.
28532    path="$complete"
28533    arguments="EOL"
28534    new_path="$path"
28535
28536  windows_path="$new_path"
28537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28538    unix_path=`$CYGPATH -u "$windows_path"`
28539    new_path="$unix_path"
28540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28542    new_path="$unix_path"
28543  fi
28544
28545
28546    new_path=`$WHICH "$new_path" 2> /dev/null`
28547
28548    if test "x$new_path" = x; then
28549      # It's still not found. Now this is an unrecoverable error.
28550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28551$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28552      has_space=`$ECHO "$complete" | $GREP " "`
28553      if test "x$has_space" != x; then
28554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28556      fi
28557      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28558    fi
28559  fi
28560
28561  # Now new_path has a complete unix path to the binary
28562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28563    # Keep paths in /bin as-is, but remove trailing .exe if any
28564    new_path="${new_path/%.exe/}"
28565    # Do not save /bin paths to all_fixpath_prefixes!
28566  else
28567    # Not in mixed or Windows style, start by that.
28568    new_path=`cmd //c echo $new_path`
28569
28570  input_path="$new_path"
28571  # Check if we need to convert this using DOS-style short mode. If the path
28572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28573  # take no chances and rewrite it.
28574  # Note: m4 eats our [], so we need to use [ and ] instead.
28575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28576  if test "x$has_forbidden_chars" != x; then
28577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28579  fi
28580
28581    # Output is in $new_path
28582
28583  windows_path="$new_path"
28584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28585    unix_path=`$CYGPATH -u "$windows_path"`
28586    new_path="$unix_path"
28587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28589    new_path="$unix_path"
28590  fi
28591
28592    # remove trailing .exe if any
28593    new_path="${new_path/%.exe/}"
28594
28595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28597  fi
28598
28599  else
28600    # We're on a posix platform. Hooray! :)
28601    # First separate the path from the arguments. This will split at the first
28602    # space.
28603    complete="$LIPO"
28604    path="${complete%% *}"
28605    tmp="$complete EOL"
28606    arguments="${tmp#* }"
28607
28608    # Cannot rely on the command "which" here since it doesn't always work.
28609    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28610    if test -z "$is_absolute_path"; then
28611      # Path to executable is not absolute. Find it.
28612      IFS_save="$IFS"
28613      IFS=:
28614      for p in $PATH; do
28615        if test -f "$p/$path" && test -x "$p/$path"; then
28616          new_path="$p/$path"
28617          break
28618        fi
28619      done
28620      IFS="$IFS_save"
28621    else
28622      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28623$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28624      new_path="$path"
28625    fi
28626
28627    if test "x$new_path" = x; then
28628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28629$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28630      has_space=`$ECHO "$complete" | $GREP " "`
28631      if test "x$has_space" != x; then
28632        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28634      fi
28635      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28636    fi
28637  fi
28638
28639  # Now join together the path and the arguments once again
28640  if test "x$arguments" != xEOL; then
28641    new_complete="$new_path ${arguments% *}"
28642  else
28643    new_complete="$new_path"
28644  fi
28645
28646  if test "x$complete" != "x$new_complete"; then
28647    LIPO="$new_complete"
28648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28649$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28650  fi
28651
28652  fi
28653
28654
28655
28656  # Restore old path without tools dir
28657  PATH="$OLD_PATH"
28658
28659
28660# FIXME: Currently we must test this after paths but before flags. Fix!
28661
28662# And we can test some aspects on the target using configure macros.
28663
28664
28665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28666$as_echo_n "checking for ANSI C header files... " >&6; }
28667if ${ac_cv_header_stdc+:} false; then :
28668  $as_echo_n "(cached) " >&6
28669else
28670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28671/* end confdefs.h.  */
28672#include <stdlib.h>
28673#include <stdarg.h>
28674#include <string.h>
28675#include <float.h>
28676
28677int
28678main ()
28679{
28680
28681  ;
28682  return 0;
28683}
28684_ACEOF
28685if ac_fn_cxx_try_compile "$LINENO"; then :
28686  ac_cv_header_stdc=yes
28687else
28688  ac_cv_header_stdc=no
28689fi
28690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28691
28692if test $ac_cv_header_stdc = yes; then
28693  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28695/* end confdefs.h.  */
28696#include <string.h>
28697
28698_ACEOF
28699if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28700  $EGREP "memchr" >/dev/null 2>&1; then :
28701
28702else
28703  ac_cv_header_stdc=no
28704fi
28705rm -f conftest*
28706
28707fi
28708
28709if test $ac_cv_header_stdc = yes; then
28710  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28712/* end confdefs.h.  */
28713#include <stdlib.h>
28714
28715_ACEOF
28716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28717  $EGREP "free" >/dev/null 2>&1; then :
28718
28719else
28720  ac_cv_header_stdc=no
28721fi
28722rm -f conftest*
28723
28724fi
28725
28726if test $ac_cv_header_stdc = yes; then
28727  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28728  if test "$cross_compiling" = yes; then :
28729  :
28730else
28731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28732/* end confdefs.h.  */
28733#include <ctype.h>
28734#include <stdlib.h>
28735#if ((' ' & 0x0FF) == 0x020)
28736# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28737# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28738#else
28739# define ISLOWER(c) \
28740		   (('a' <= (c) && (c) <= 'i') \
28741		     || ('j' <= (c) && (c) <= 'r') \
28742		     || ('s' <= (c) && (c) <= 'z'))
28743# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28744#endif
28745
28746#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28747int
28748main ()
28749{
28750  int i;
28751  for (i = 0; i < 256; i++)
28752    if (XOR (islower (i), ISLOWER (i))
28753	|| toupper (i) != TOUPPER (i))
28754      return 2;
28755  return 0;
28756}
28757_ACEOF
28758if ac_fn_cxx_try_run "$LINENO"; then :
28759
28760else
28761  ac_cv_header_stdc=no
28762fi
28763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28764  conftest.$ac_objext conftest.beam conftest.$ac_ext
28765fi
28766
28767fi
28768fi
28769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28770$as_echo "$ac_cv_header_stdc" >&6; }
28771if test $ac_cv_header_stdc = yes; then
28772
28773$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28774
28775fi
28776
28777# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28778for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28779		  inttypes.h stdint.h unistd.h
28780do :
28781  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28782ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28783"
28784if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28785  cat >>confdefs.h <<_ACEOF
28786#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28787_ACEOF
28788
28789fi
28790
28791done
28792
28793
28794
28795  ###############################################################################
28796  #
28797  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28798  # (The JVM can use 32 or 64 bit Java pointers but that decision
28799  # is made at runtime.)
28800  #
28801
28802  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28803    # Always specify -m flags on Solaris
28804
28805  # When we add flags to the "official" CFLAGS etc, we need to
28806  # keep track of these additions in ADDED_CFLAGS etc. These
28807  # will later be checked to make sure only controlled additions
28808  # have been made to CFLAGS etc.
28809  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28810  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28811  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28812
28813  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28814  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28815  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28816
28817  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28818  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28819  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28820
28821  elif test "x$COMPILE_TYPE" = xreduced; then
28822    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28823      # Specify -m if running reduced on other Posix platforms
28824
28825  # When we add flags to the "official" CFLAGS etc, we need to
28826  # keep track of these additions in ADDED_CFLAGS etc. These
28827  # will later be checked to make sure only controlled additions
28828  # have been made to CFLAGS etc.
28829  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28830  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28831  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28832
28833  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28834  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28835  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28836
28837  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28838  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28839  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28840
28841    fi
28842  fi
28843
28844  # Make compilation sanity check
28845  for ac_header in stdio.h
28846do :
28847  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28848if test "x$ac_cv_header_stdio_h" = xyes; then :
28849  cat >>confdefs.h <<_ACEOF
28850#define HAVE_STDIO_H 1
28851_ACEOF
28852
28853else
28854
28855    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28856$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28857    if test "x$COMPILE_TYPE" = xreduced; then
28858      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28859$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28860    elif test "x$COMPILE_TYPE" = xcross; then
28861      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28862$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28863    fi
28864    as_fn_error $? "Cannot continue." "$LINENO" 5
28865
28866fi
28867
28868done
28869
28870
28871  # The cast to long int works around a bug in the HP C Compiler
28872# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28873# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28874# This bug is HP SR number 8606223364.
28875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28876$as_echo_n "checking size of int *... " >&6; }
28877if ${ac_cv_sizeof_int_p+:} false; then :
28878  $as_echo_n "(cached) " >&6
28879else
28880  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28881
28882else
28883  if test "$ac_cv_type_int_p" = yes; then
28884     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28886as_fn_error 77 "cannot compute sizeof (int *)
28887See \`config.log' for more details" "$LINENO" 5; }
28888   else
28889     ac_cv_sizeof_int_p=0
28890   fi
28891fi
28892
28893fi
28894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28895$as_echo "$ac_cv_sizeof_int_p" >&6; }
28896
28897
28898
28899cat >>confdefs.h <<_ACEOF
28900#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28901_ACEOF
28902
28903
28904
28905  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28906    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28907    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28908  fi
28909
28910  if test "x$SIZEOF_INT_P" = x; then
28911    # The test failed, lets stick to the assumed value.
28912    { $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
28913$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28914  else
28915    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28916
28917    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28918      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
28919    fi
28920  fi
28921
28922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28923$as_echo_n "checking for target address size... " >&6; }
28924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28925$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28926
28927
28928  ###############################################################################
28929  #
28930  # Is the target little of big endian?
28931  #
28932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28933$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28934if ${ac_cv_c_bigendian+:} false; then :
28935  $as_echo_n "(cached) " >&6
28936else
28937  ac_cv_c_bigendian=unknown
28938    # See if we're dealing with a universal compiler.
28939    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28940/* end confdefs.h.  */
28941#ifndef __APPLE_CC__
28942	       not a universal capable compiler
28943	     #endif
28944	     typedef int dummy;
28945
28946_ACEOF
28947if ac_fn_cxx_try_compile "$LINENO"; then :
28948
28949	# Check for potential -arch flags.  It is not universal unless
28950	# there are at least two -arch flags with different values.
28951	ac_arch=
28952	ac_prev=
28953	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28954	 if test -n "$ac_prev"; then
28955	   case $ac_word in
28956	     i?86 | x86_64 | ppc | ppc64)
28957	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28958		 ac_arch=$ac_word
28959	       else
28960		 ac_cv_c_bigendian=universal
28961		 break
28962	       fi
28963	       ;;
28964	   esac
28965	   ac_prev=
28966	 elif test "x$ac_word" = "x-arch"; then
28967	   ac_prev=arch
28968	 fi
28969       done
28970fi
28971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28972    if test $ac_cv_c_bigendian = unknown; then
28973      # See if sys/param.h defines the BYTE_ORDER macro.
28974      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28975/* end confdefs.h.  */
28976#include <sys/types.h>
28977	     #include <sys/param.h>
28978
28979int
28980main ()
28981{
28982#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28983		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28984		     && LITTLE_ENDIAN)
28985	      bogus endian macros
28986	     #endif
28987
28988  ;
28989  return 0;
28990}
28991_ACEOF
28992if ac_fn_cxx_try_compile "$LINENO"; then :
28993  # It does; now see whether it defined to BIG_ENDIAN or not.
28994	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28995/* end confdefs.h.  */
28996#include <sys/types.h>
28997		#include <sys/param.h>
28998
28999int
29000main ()
29001{
29002#if BYTE_ORDER != BIG_ENDIAN
29003		 not big endian
29004		#endif
29005
29006  ;
29007  return 0;
29008}
29009_ACEOF
29010if ac_fn_cxx_try_compile "$LINENO"; then :
29011  ac_cv_c_bigendian=yes
29012else
29013  ac_cv_c_bigendian=no
29014fi
29015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29016fi
29017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29018    fi
29019    if test $ac_cv_c_bigendian = unknown; then
29020      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29021      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29022/* end confdefs.h.  */
29023#include <limits.h>
29024
29025int
29026main ()
29027{
29028#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29029	      bogus endian macros
29030	     #endif
29031
29032  ;
29033  return 0;
29034}
29035_ACEOF
29036if ac_fn_cxx_try_compile "$LINENO"; then :
29037  # It does; now see whether it defined to _BIG_ENDIAN or not.
29038	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29039/* end confdefs.h.  */
29040#include <limits.h>
29041
29042int
29043main ()
29044{
29045#ifndef _BIG_ENDIAN
29046		 not big endian
29047		#endif
29048
29049  ;
29050  return 0;
29051}
29052_ACEOF
29053if ac_fn_cxx_try_compile "$LINENO"; then :
29054  ac_cv_c_bigendian=yes
29055else
29056  ac_cv_c_bigendian=no
29057fi
29058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29059fi
29060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29061    fi
29062    if test $ac_cv_c_bigendian = unknown; then
29063      # Compile a test program.
29064      if test "$cross_compiling" = yes; then :
29065  # Try to guess by grepping values from an object file.
29066	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29067/* end confdefs.h.  */
29068short int ascii_mm[] =
29069		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29070		short int ascii_ii[] =
29071		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29072		int use_ascii (int i) {
29073		  return ascii_mm[i] + ascii_ii[i];
29074		}
29075		short int ebcdic_ii[] =
29076		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29077		short int ebcdic_mm[] =
29078		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29079		int use_ebcdic (int i) {
29080		  return ebcdic_mm[i] + ebcdic_ii[i];
29081		}
29082		extern int foo;
29083
29084int
29085main ()
29086{
29087return use_ascii (foo) == use_ebcdic (foo);
29088  ;
29089  return 0;
29090}
29091_ACEOF
29092if ac_fn_cxx_try_compile "$LINENO"; then :
29093  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29094	      ac_cv_c_bigendian=yes
29095	    fi
29096	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29097	      if test "$ac_cv_c_bigendian" = unknown; then
29098		ac_cv_c_bigendian=no
29099	      else
29100		# finding both strings is unlikely to happen, but who knows?
29101		ac_cv_c_bigendian=unknown
29102	      fi
29103	    fi
29104fi
29105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29106else
29107  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29108/* end confdefs.h.  */
29109$ac_includes_default
29110int
29111main ()
29112{
29113
29114	     /* Are we little or big endian?  From Harbison&Steele.  */
29115	     union
29116	     {
29117	       long int l;
29118	       char c[sizeof (long int)];
29119	     } u;
29120	     u.l = 1;
29121	     return u.c[sizeof (long int) - 1] == 1;
29122
29123  ;
29124  return 0;
29125}
29126_ACEOF
29127if ac_fn_cxx_try_run "$LINENO"; then :
29128  ac_cv_c_bigendian=no
29129else
29130  ac_cv_c_bigendian=yes
29131fi
29132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29133  conftest.$ac_objext conftest.beam conftest.$ac_ext
29134fi
29135
29136    fi
29137fi
29138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29139$as_echo "$ac_cv_c_bigendian" >&6; }
29140 case $ac_cv_c_bigendian in #(
29141   yes)
29142     ENDIAN="big";; #(
29143   no)
29144     ENDIAN="little" ;; #(
29145   universal)
29146     ENDIAN="universal_endianness"
29147     ;; #(
29148   *)
29149     ENDIAN="unknown" ;;
29150 esac
29151
29152
29153  if test "x$ENDIAN" = xuniversal_endianness; then
29154    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29155  fi
29156  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29157    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
29158  fi
29159
29160
29161# Configure flags for the tools
29162
29163
29164  ###############################################################################
29165  #
29166  # How to compile shared libraries.
29167  #
29168
29169  if test "x$GCC" = xyes; then
29170    COMPILER_NAME=gcc
29171    PICFLAG="-fPIC"
29172    LIBRARY_PREFIX=lib
29173    SHARED_LIBRARY='lib$1.so'
29174    STATIC_LIBRARY='lib$1.a'
29175    SHARED_LIBRARY_FLAGS="-shared"
29176    SHARED_LIBRARY_SUFFIX='.so'
29177    STATIC_LIBRARY_SUFFIX='.a'
29178    OBJ_SUFFIX='.o'
29179    EXE_SUFFIX=''
29180    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29181    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29182    C_FLAG_REORDER=''
29183    CXX_FLAG_REORDER=''
29184    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29185    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29186    LD="$CC"
29187    LDEXE="$CC"
29188    LDCXX="$CXX"
29189    LDEXECXX="$CXX"
29190    POST_STRIP_CMD="$STRIP -g"
29191
29192    # Linking is different on MacOSX
29193    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29194      # Might change in the future to clang.
29195      COMPILER_NAME=gcc
29196      SHARED_LIBRARY='lib$1.dylib'
29197      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29198      SHARED_LIBRARY_SUFFIX='.dylib'
29199      EXE_SUFFIX=''
29200      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29201      SET_SHARED_LIBRARY_MAPFILE=''
29202      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29203      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29204      POST_STRIP_CMD="$STRIP -S"
29205    fi
29206  else
29207    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29208      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29209      COMPILER_NAME=ossc
29210      PICFLAG="-KPIC"
29211      LIBRARY_PREFIX=lib
29212      SHARED_LIBRARY='lib$1.so'
29213      STATIC_LIBRARY='lib$1.a'
29214      SHARED_LIBRARY_FLAGS="-G"
29215      SHARED_LIBRARY_SUFFIX='.so'
29216      STATIC_LIBRARY_SUFFIX='.a'
29217      OBJ_SUFFIX='.o'
29218      EXE_SUFFIX=''
29219      SET_SHARED_LIBRARY_NAME=''
29220      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29221      C_FLAG_REORDER='-xF'
29222      CXX_FLAG_REORDER='-xF'
29223      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29224      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29225      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29226      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29227      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29228      POST_STRIP_CMD="$STRIP -x"
29229      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29230    fi
29231    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29232      # If it is not gcc, then assume it is the MS Visual Studio compiler
29233      COMPILER_NAME=cl
29234      PICFLAG=""
29235      LIBRARY_PREFIX=
29236      SHARED_LIBRARY='$1.dll'
29237      STATIC_LIBRARY='$1.lib'
29238      SHARED_LIBRARY_FLAGS="-LD"
29239      SHARED_LIBRARY_SUFFIX='.dll'
29240      STATIC_LIBRARY_SUFFIX='.lib'
29241      OBJ_SUFFIX='.obj'
29242      EXE_SUFFIX='.exe'
29243      SET_SHARED_LIBRARY_NAME=''
29244      SET_SHARED_LIBRARY_MAPFILE=''
29245      SET_SHARED_LIBRARY_ORIGIN=''
29246      SET_EXECUTABLE_ORIGIN=''
29247    fi
29248  fi
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268  # The (cross) compiler is now configured, we can now test capabilities
29269  # of the target platform.
29270
29271
29272
29273  ###############################################################################
29274  #
29275  # Setup the opt flags for different compilers
29276  # and different operating systems.
29277  #
29278
29279  #
29280  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29281  #
29282  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29283    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29284    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29285    CFLAGS="$CFLAGS -mstackrealign"
29286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29287$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29288    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29289/* end confdefs.h.  */
29290int main() { return 0; }
29291_ACEOF
29292if ac_fn_cxx_try_link "$LINENO"; then :
29293
29294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29295$as_echo "yes" >&6; }
29296
29297else
29298
29299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29300$as_echo "no" >&6; }
29301          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29302
29303
29304fi
29305rm -f core conftest.err conftest.$ac_objext \
29306    conftest$ac_exeext conftest.$ac_ext
29307  fi
29308
29309  C_FLAG_DEPS="-MMD -MF"
29310  CXX_FLAG_DEPS="-MMD -MF"
29311
29312  case $COMPILER_TYPE in
29313    CC )
29314      case $COMPILER_NAME in
29315        gcc )
29316          case $OPENJDK_TARGET_OS in
29317            macosx )
29318              # On MacOSX we optimize for size, something
29319              # we should do for all platforms?
29320              C_O_FLAG_HI="-Os"
29321              C_O_FLAG_NORM="-Os"
29322              C_O_FLAG_NONE=""
29323              ;;
29324            *)
29325              C_O_FLAG_HI="-O3"
29326              C_O_FLAG_NORM="-O2"
29327              C_O_FLAG_NONE="-O0"
29328              ;;
29329          esac
29330          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29331          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29332          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29333          CFLAGS_DEBUG_SYMBOLS="-g"
29334          CXXFLAGS_DEBUG_SYMBOLS="-g"
29335          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29336            CFLAGS_DEBUG_SYMBOLS="-g1"
29337            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29338          fi
29339          ;;
29340        ossc )
29341          #
29342          # Forte has different names for this with their C++ compiler...
29343          #
29344          C_FLAG_DEPS="-xMMD -xMF"
29345          CXX_FLAG_DEPS="-xMMD -xMF"
29346
29347          # Extra options used with HIGHEST
29348          #
29349          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29350          #          done with care, there are some assumptions below that need to
29351          #          be understood about the use of pointers, and IEEE behavior.
29352          #
29353          # Use non-standard floating point mode (not IEEE 754)
29354          CC_HIGHEST="$CC_HIGHEST -fns"
29355          # Do some simplification of floating point arithmetic (not IEEE 754)
29356          CC_HIGHEST="$CC_HIGHEST -fsimple"
29357          # Use single precision floating point with 'float'
29358          CC_HIGHEST="$CC_HIGHEST -fsingle"
29359          # Assume memory references via basic pointer types do not alias
29360          #   (Source with excessing pointer casting and data access with mixed
29361          #    pointer types are not recommended)
29362          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29363          # Use intrinsic or inline versions for math/std functions
29364          #   (If you expect perfect errno behavior, do not use this)
29365          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29366          # Loop data dependency optimizations (need -xO3 or higher)
29367          CC_HIGHEST="$CC_HIGHEST -xdepend"
29368          # Pointer parameters to functions do not overlap
29369          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29370          #    If you pass in multiple pointers to the same data, do not use this)
29371          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29372          # Inline some library routines
29373          #   (If you expect perfect errno behavior, do not use this)
29374          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29375          # Use optimized math routines
29376          #   (If you expect perfect errno behavior, do not use this)
29377          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29378          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29379
29380          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29381            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29382            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29383          fi
29384
29385          case $OPENJDK_TARGET_CPU_ARCH in
29386            x86)
29387              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29388              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29389              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29390              C_O_FLAG_NONE="-xregs=no%frameptr"
29391              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29392              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29393              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29394              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29395              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29396                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29397                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29398              fi
29399              ;;
29400            sparc)
29401              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29402              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29403              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29404              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29405              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29406              C_O_FLAG_NONE=""
29407              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29408              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29409              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29410              CXX_O_FLAG_NONE=""
29411              ;;
29412          esac
29413
29414          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29415          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29416      esac
29417      ;;
29418    CL )
29419      C_O_FLAG_HIGHEST="-O2"
29420      C_O_FLAG_HI="-O1"
29421      C_O_FLAG_NORM="-O1"
29422      C_O_FLAG_NONE="-Od"
29423      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29424      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29425      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29426      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29427      ;;
29428  esac
29429
29430  if test -z "$C_O_FLAG_HIGHEST"; then
29431    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29432  fi
29433
29434  if test -z "$CXX_O_FLAG_HIGHEST"; then
29435    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29436  fi
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29452    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29453$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29454  fi
29455
29456  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29458$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29459  fi
29460
29461  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29462    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29463$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29464  fi
29465
29466
29467# Check whether --with-extra-cflags was given.
29468if test "${with_extra_cflags+set}" = set; then :
29469  withval=$with_extra_cflags;
29470fi
29471
29472
29473
29474# Check whether --with-extra-cxxflags was given.
29475if test "${with_extra_cxxflags+set}" = set; then :
29476  withval=$with_extra_cxxflags;
29477fi
29478
29479
29480
29481# Check whether --with-extra-ldflags was given.
29482if test "${with_extra_ldflags+set}" = set; then :
29483  withval=$with_extra_ldflags;
29484fi
29485
29486
29487  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29488  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29489  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29490
29491  # Hotspot needs these set in their legacy form
29492  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29493  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29494  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29495
29496
29497
29498
29499
29500  ###############################################################################
29501  #
29502  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29503  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29504  #
29505  case $COMPILER_NAME in
29506    gcc )
29507      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29508      -pipe \
29509      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29510      case $OPENJDK_TARGET_CPU_ARCH in
29511        arm )
29512          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29513          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29514          ;;
29515        ppc )
29516          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29517          ;;
29518        * )
29519          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29520          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29521          ;;
29522      esac
29523      ;;
29524    ossc )
29525      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29526      case $OPENJDK_TARGET_CPU_ARCH in
29527        x86 )
29528          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29529          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29530          ;;
29531      esac
29532
29533      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29534      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29535
29536      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29537      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29538      ;;
29539    cl )
29540      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29541      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29542      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29543      -DWIN32 -DIAL"
29544      case $OPENJDK_TARGET_CPU in
29545        x86 )
29546          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29547          ;;
29548        x86_64 )
29549          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29550          ;;
29551      esac
29552      ;;
29553  esac
29554
29555  ###############################################################################
29556
29557  # Adjust flags according to debug level.
29558  case $DEBUG_LEVEL in
29559    fastdebug )
29560      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29561      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29562      C_O_FLAG_HI="$C_O_FLAG_NORM"
29563      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29564      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29565      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29566      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29567      ;;
29568    slowdebug )
29569      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29570      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29571      C_O_FLAG_HI="$C_O_FLAG_NONE"
29572      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29573      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29574      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29575      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29576      ;;
29577  esac
29578
29579  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29580
29581  # The package path is used only on macosx?
29582  PACKAGE_PATH=/opt/local
29583
29584
29585  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29586    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29587    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29588    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29589    #   Note: -Dmacro         is the same as    #define macro 1
29590    #         -Dmacro=        is the same as    #define macro
29591    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29592      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29593    else
29594      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29595    fi
29596  else
29597    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29598  fi
29599  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29600    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29601  fi
29602  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29603    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29604  fi
29605  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29606    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29607  fi
29608  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29609    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29610    # Setting these parameters makes it an error to link to macosx APIs that are
29611    # newer than the given OS version and makes the linked binaries compatible even
29612    # if built on a newer version of the OS.
29613    # The expected format is X.Y.Z
29614    MACOSX_VERSION_MIN=10.7.0
29615
29616    # The macro takes the version with no dots, ex: 1070
29617    # Let the flags variables get resolved in make for easier override on make
29618    # command line.
29619    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29620    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29621  fi
29622  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29623    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29624  fi
29625  if test "x$DEBUG_LEVEL" = xrelease; then
29626    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29627  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29628    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29629  fi
29630  else
29631    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29632  fi
29633
29634  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29635  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29636
29637  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29638      -I${JDK_OUTPUTDIR}/include \
29639      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29640      -I${JDK_TOPDIR}/src/share/javavm/export \
29641      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29642      -I${JDK_TOPDIR}/src/share/native/common \
29643      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29644
29645  # The shared libraries are compiled using the picflag.
29646  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29647  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29648
29649  # Executable flags
29650  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29651  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29652
29653  # Now this is odd. The JDK native libraries have to link against libjvm.so
29654  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29655  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29656  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29657  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29658  # libraries will link to whatever is in memory. Yuck.
29659  #
29660  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29661  if test "x$COMPILER_NAME" = xcl; then
29662    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29663    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29664      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29665    fi
29666    # TODO: make -debug optional "--disable-full-debug-symbols"
29667    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29668    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29669    LDFLAGS_JDKLIB_SUFFIX=""
29670    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29671      LDFLAGS_STACK_SIZE=1048576
29672    else
29673      LDFLAGS_STACK_SIZE=327680
29674    fi
29675    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29676  else
29677    if test "x$COMPILER_NAME" = xgcc; then
29678      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29679      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29680      if test -n "$HAS_GNU_HASH"; then
29681        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29682      fi
29683      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29684        # And since we now know that the linker is gnu, then add -z defs, to forbid
29685        # undefined symbols in object files.
29686        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29687        if test "x$DEBUG_LEVEL" = "xrelease"; then
29688          # When building release libraries, tell the linker optimize them.
29689          # Should this be supplied to the OSS linker as well?
29690          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29691        fi
29692      fi
29693    fi
29694    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29695        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29696
29697    # On some platforms (mac) the linker warns about non existing -L dirs.
29698    # Add server first if available. Linking aginst client does not always produce the same results.
29699    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29700    # Default to server for other variants.
29701    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29702      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29703    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29704      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29705    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29706      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29707    else
29708      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29709    fi
29710
29711    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29712    if test "x$COMPILER_NAME" = xossc; then
29713      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29714    fi
29715
29716    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29717    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29718      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29719    fi
29720  fi
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736  # Some Zero and Shark settings.
29737  # ZERO_ARCHFLAG tells the compiler which mode to build for
29738  case "${OPENJDK_TARGET_CPU}" in
29739    s390)
29740      ZERO_ARCHFLAG="-m31"
29741      ;;
29742    *)
29743      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29744  esac
29745
29746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29747$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29748  supports=yes
29749
29750  saved_cflags="$CFLAGS"
29751  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29752  ac_ext=c
29753ac_cpp='$CPP $CPPFLAGS'
29754ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29755ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29756ac_compiler_gnu=$ac_cv_c_compiler_gnu
29757
29758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29759/* end confdefs.h.  */
29760int i;
29761_ACEOF
29762if ac_fn_c_try_compile "$LINENO"; then :
29763
29764else
29765  supports=no
29766fi
29767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29768  ac_ext=cpp
29769ac_cpp='$CXXCPP $CPPFLAGS'
29770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29773
29774  CFLAGS="$saved_cflags"
29775
29776  saved_cxxflags="$CXXFLAGS"
29777  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29778  ac_ext=cpp
29779ac_cpp='$CXXCPP $CPPFLAGS'
29780ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29781ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29782ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29783
29784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29785/* end confdefs.h.  */
29786int i;
29787_ACEOF
29788if ac_fn_cxx_try_compile "$LINENO"; then :
29789
29790else
29791  supports=no
29792fi
29793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29794  ac_ext=cpp
29795ac_cpp='$CXXCPP $CPPFLAGS'
29796ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29797ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29798ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29799
29800  CXXFLAGS="$saved_cxxflags"
29801
29802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29803$as_echo "$supports" >&6; }
29804  if test "x$supports" = "xyes" ; then
29805    :
29806  else
29807    ZERO_ARCHFLAG=""
29808  fi
29809
29810
29811
29812  # Check that the compiler supports -mX flags
29813  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29814
29815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29816$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29817  supports=yes
29818
29819  saved_cflags="$CFLAGS"
29820  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29821  ac_ext=c
29822ac_cpp='$CPP $CPPFLAGS'
29823ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29824ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29825ac_compiler_gnu=$ac_cv_c_compiler_gnu
29826
29827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29828/* end confdefs.h.  */
29829int i;
29830_ACEOF
29831if ac_fn_c_try_compile "$LINENO"; then :
29832
29833else
29834  supports=no
29835fi
29836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29837  ac_ext=cpp
29838ac_cpp='$CXXCPP $CPPFLAGS'
29839ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29840ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29841ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29842
29843  CFLAGS="$saved_cflags"
29844
29845  saved_cxxflags="$CXXFLAGS"
29846  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29847  ac_ext=cpp
29848ac_cpp='$CXXCPP $CPPFLAGS'
29849ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29850ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29851ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29852
29853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29854/* end confdefs.h.  */
29855int i;
29856_ACEOF
29857if ac_fn_cxx_try_compile "$LINENO"; then :
29858
29859else
29860  supports=no
29861fi
29862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29863  ac_ext=cpp
29864ac_cpp='$CXXCPP $CPPFLAGS'
29865ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29866ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29867ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29868
29869  CXXFLAGS="$saved_cxxflags"
29870
29871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29872$as_echo "$supports" >&6; }
29873  if test "x$supports" = "xyes" ; then
29874    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29875  else
29876    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29877  fi
29878
29879
29880
29881
29882# Setup debug symbols (need objcopy from the toolchain for that)
29883
29884  #
29885  # ENABLE_DEBUG_SYMBOLS
29886  # This must be done after the toolchain is setup, since we're looking at objcopy.
29887  #
29888  # Check whether --enable-debug-symbols was given.
29889if test "${enable_debug_symbols+set}" = set; then :
29890  enableval=$enable_debug_symbols;
29891fi
29892
29893
29894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29895$as_echo_n "checking if we should generate debug symbols... " >&6; }
29896
29897  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29898    # explicit enabling of enable-debug-symbols and can't find objcopy
29899    #   this is an error
29900    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29901  fi
29902
29903  if test "x$enable_debug_symbols" = "xyes"; then
29904    ENABLE_DEBUG_SYMBOLS=true
29905  elif test "x$enable_debug_symbols" = "xno"; then
29906    ENABLE_DEBUG_SYMBOLS=false
29907  else
29908  # Default is on if objcopy is found
29909  if test "x$OBJCOPY" != x; then
29910    ENABLE_DEBUG_SYMBOLS=true
29911  # MacOS X and Windows don't use objcopy but default is on for those OSes
29912  elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
29913      ENABLE_DEBUG_SYMBOLS=true
29914    else
29915      ENABLE_DEBUG_SYMBOLS=false
29916    fi
29917  fi
29918
29919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29920$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29921
29922  #
29923  # ZIP_DEBUGINFO_FILES
29924  #
29925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29926$as_echo_n "checking if we should zip debug-info files... " >&6; }
29927  # Check whether --enable-zip-debug-info was given.
29928if test "${enable_zip_debug_info+set}" = set; then :
29929  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29930else
29931  enable_zip_debug_info="yes"
29932fi
29933
29934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29935$as_echo "${enable_zip_debug_info}" >&6; }
29936
29937  if test "x${enable_zip_debug_info}" = "xno"; then
29938    ZIP_DEBUGINFO_FILES=false
29939  else
29940    ZIP_DEBUGINFO_FILES=true
29941  fi
29942
29943
29944
29945
29946
29947
29948
29949###############################################################################
29950#
29951# Check dependencies for external and internal libraries.
29952#
29953###############################################################################
29954
29955# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
29956
29957  # When using cygwin or msys, we need a wrapper binary that renames
29958  # /cygdrive/c/ arguments into c:/ arguments and peeks into
29959  # @files and rewrites these too! This wrapper binary is
29960  # called fixpath.
29961  FIXPATH=
29962  if test "x$OPENJDK_BUILD_OS" = xwindows; then
29963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
29964$as_echo_n "checking if fixpath can be created... " >&6; }
29965    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
29966    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
29967    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
29968      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
29969      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
29970      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
29971      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
29972    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
29973      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
29974      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
29975
29976      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
29977      # @ was chosen as separator to minimize risk of other tools messing around with it
29978      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
29979      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
29980
29981      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
29982    fi
29983    rm -f $OUTPUT_ROOT/fixpath*
29984    cd $OUTPUT_ROOT
29985    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
29986    cd $CURDIR
29987
29988    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
29989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29990$as_echo "no" >&6; }
29991      cat $OUTPUT_ROOT/fixpath1.log
29992      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
29993    fi
29994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29995$as_echo "yes" >&6; }
29996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
29997$as_echo_n "checking if fixpath.exe works... " >&6; }
29998    cd $OUTPUT_ROOT
29999    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30000    cd $CURDIR
30001    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30003$as_echo "no" >&6; }
30004      cat $OUTPUT_ROOT/fixpath2.log
30005      as_fn_error $? "fixpath did not work!" "$LINENO" 5
30006    fi
30007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30008$as_echo "yes" >&6; }
30009    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30010  fi
30011
30012
30013
30014
30015
30016
30017  ###############################################################################
30018  #
30019  # OS specific settings that we never will need to probe.
30020  #
30021  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30023$as_echo_n "checking what is not needed on Linux?... " >&6; }
30024    PULSE_NOT_NEEDED=yes
30025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30026$as_echo "pulse" >&6; }
30027  fi
30028
30029  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30031$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30032    ALSA_NOT_NEEDED=yes
30033    PULSE_NOT_NEEDED=yes
30034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30035$as_echo "alsa pulse" >&6; }
30036  fi
30037
30038  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30040$as_echo_n "checking what is not needed on Windows?... " >&6; }
30041    CUPS_NOT_NEEDED=yes
30042    ALSA_NOT_NEEDED=yes
30043    PULSE_NOT_NEEDED=yes
30044    X11_NOT_NEEDED=yes
30045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30046$as_echo "alsa cups pulse x11" >&6; }
30047  fi
30048
30049  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30051$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30052    ALSA_NOT_NEEDED=yes
30053    PULSE_NOT_NEEDED=yes
30054    X11_NOT_NEEDED=yes
30055    # If the java runtime framework is disabled, then we need X11.
30056    # This will be adjusted below.
30057    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30058$as_echo "alsa pulse x11" >&6; }
30059  fi
30060
30061  if test "x$OPENJDK_TARGET_OS" = xbsd; then
30062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30063$as_echo_n "checking what is not needed on bsd?... " >&6; }
30064    ALSA_NOT_NEEDED=yes
30065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30066$as_echo "alsa" >&6; }
30067  fi
30068
30069  if test "x$OPENJDK" = "xfalse"; then
30070    FREETYPE_NOT_NEEDED=yes
30071  fi
30072
30073  if test "x$SUPPORT_HEADFUL" = xno; then
30074    X11_NOT_NEEDED=yes
30075  fi
30076
30077  ###############################################################################
30078  #
30079  # Check for MacOSX support for OpenJDK.
30080  #
30081
30082
30083  # Check whether --enable-macosx-runtime-support was given.
30084if test "${enable_macosx_runtime_support+set}" = set; then :
30085  enableval=$enable_macosx_runtime_support;
30086fi
30087
30088  if test "x$enable_macosx_runtime_support" != x; then
30089    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30090$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30091  fi
30092
30093
30094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30095$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30096  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30098$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30099  else
30100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30101$as_echo "no" >&6; }
30102  fi
30103
30104
30105
30106  ###############################################################################
30107  #
30108  # Check for X Windows
30109  #
30110
30111  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30112  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30113  # --x-libraries for the sysroot, if that seems to be correct.
30114  if test "x$SYS_ROOT" != "x/"; then
30115    if test "x$x_includes" = xNONE; then
30116      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30117        x_includes="$SYS_ROOT/usr/X11R6/include"
30118      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30119        x_includes="$SYS_ROOT/usr/include"
30120      fi
30121    fi
30122    if test "x$x_libraries" = xNONE; then
30123      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30124        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30125      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30126        x_libraries="$SYS_ROOT/usr/lib64"
30127      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30128        x_libraries="$SYS_ROOT/usr/lib"
30129      fi
30130    fi
30131  fi
30132
30133  # Now let autoconf do it's magic
30134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30135$as_echo_n "checking for X... " >&6; }
30136
30137
30138# Check whether --with-x was given.
30139if test "${with_x+set}" = set; then :
30140  withval=$with_x;
30141fi
30142
30143# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30144if test "x$with_x" = xno; then
30145  # The user explicitly disabled X.
30146  have_x=disabled
30147else
30148  case $x_includes,$x_libraries in #(
30149    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30150    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30151  $as_echo_n "(cached) " >&6
30152else
30153  # One or both of the vars are not set, and there is no cached value.
30154ac_x_includes=no ac_x_libraries=no
30155rm -f -r conftest.dir
30156if mkdir conftest.dir; then
30157  cd conftest.dir
30158  cat >Imakefile <<'_ACEOF'
30159incroot:
30160	@echo incroot='${INCROOT}'
30161usrlibdir:
30162	@echo usrlibdir='${USRLIBDIR}'
30163libdir:
30164	@echo libdir='${LIBDIR}'
30165_ACEOF
30166  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30167    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30168    for ac_var in incroot usrlibdir libdir; do
30169      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30170    done
30171    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30172    for ac_extension in a so sl dylib la dll; do
30173      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30174	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30175	ac_im_usrlibdir=$ac_im_libdir; break
30176      fi
30177    done
30178    # Screen out bogus values from the imake configuration.  They are
30179    # bogus both because they are the default anyway, and because
30180    # using them would break gcc on systems where it needs fixed includes.
30181    case $ac_im_incroot in
30182	/usr/include) ac_x_includes= ;;
30183	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30184    esac
30185    case $ac_im_usrlibdir in
30186	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30187	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30188    esac
30189  fi
30190  cd ..
30191  rm -f -r conftest.dir
30192fi
30193
30194# Standard set of common directories for X headers.
30195# Check X11 before X11Rn because it is often a symlink to the current release.
30196ac_x_header_dirs='
30197/usr/X11/include
30198/usr/X11R7/include
30199/usr/X11R6/include
30200/usr/X11R5/include
30201/usr/X11R4/include
30202
30203/usr/include/X11
30204/usr/include/X11R7
30205/usr/include/X11R6
30206/usr/include/X11R5
30207/usr/include/X11R4
30208
30209/usr/local/X11/include
30210/usr/local/X11R7/include
30211/usr/local/X11R6/include
30212/usr/local/X11R5/include
30213/usr/local/X11R4/include
30214
30215/usr/local/include/X11
30216/usr/local/include/X11R7
30217/usr/local/include/X11R6
30218/usr/local/include/X11R5
30219/usr/local/include/X11R4
30220
30221/usr/X386/include
30222/usr/x386/include
30223/usr/XFree86/include/X11
30224
30225/usr/include
30226/usr/local/include
30227/usr/unsupported/include
30228/usr/athena/include
30229/usr/local/x11r5/include
30230/usr/lpp/Xamples/include
30231
30232/usr/openwin/include
30233/usr/openwin/share/include'
30234
30235if test "$ac_x_includes" = no; then
30236  # Guess where to find include files, by looking for Xlib.h.
30237  # First, try using that file with no special directory specified.
30238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30239/* end confdefs.h.  */
30240#include <X11/Xlib.h>
30241_ACEOF
30242if ac_fn_cxx_try_cpp "$LINENO"; then :
30243  # We can compile using X headers with no special include directory.
30244ac_x_includes=
30245else
30246  for ac_dir in $ac_x_header_dirs; do
30247  if test -r "$ac_dir/X11/Xlib.h"; then
30248    ac_x_includes=$ac_dir
30249    break
30250  fi
30251done
30252fi
30253rm -f conftest.err conftest.i conftest.$ac_ext
30254fi # $ac_x_includes = no
30255
30256if test "$ac_x_libraries" = no; then
30257  # Check for the libraries.
30258  # See if we find them without any special options.
30259  # Don't add to $LIBS permanently.
30260  ac_save_LIBS=$LIBS
30261  LIBS="-lX11 $LIBS"
30262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30263/* end confdefs.h.  */
30264#include <X11/Xlib.h>
30265int
30266main ()
30267{
30268XrmInitialize ()
30269  ;
30270  return 0;
30271}
30272_ACEOF
30273if ac_fn_cxx_try_link "$LINENO"; then :
30274  LIBS=$ac_save_LIBS
30275# We can link X programs with no special library path.
30276ac_x_libraries=
30277else
30278  LIBS=$ac_save_LIBS
30279for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30280do
30281  # Don't even attempt the hair of trying to link an X program!
30282  for ac_extension in a so sl dylib la dll; do
30283    if test -r "$ac_dir/libX11.$ac_extension"; then
30284      ac_x_libraries=$ac_dir
30285      break 2
30286    fi
30287  done
30288done
30289fi
30290rm -f core conftest.err conftest.$ac_objext \
30291    conftest$ac_exeext conftest.$ac_ext
30292fi # $ac_x_libraries = no
30293
30294case $ac_x_includes,$ac_x_libraries in #(
30295  no,* | *,no | *\'*)
30296    # Didn't find X, or a directory has "'" in its name.
30297    ac_cv_have_x="have_x=no";; #(
30298  *)
30299    # Record where we found X for the cache.
30300    ac_cv_have_x="have_x=yes\
30301	ac_x_includes='$ac_x_includes'\
30302	ac_x_libraries='$ac_x_libraries'"
30303esac
30304fi
30305;; #(
30306    *) have_x=yes;;
30307  esac
30308  eval "$ac_cv_have_x"
30309fi # $with_x != no
30310
30311if test "$have_x" != yes; then
30312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30313$as_echo "$have_x" >&6; }
30314  no_x=yes
30315else
30316  # If each of the values was on the command line, it overrides each guess.
30317  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30318  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30319  # Update the cache value to reflect the command line values.
30320  ac_cv_have_x="have_x=yes\
30321	ac_x_includes='$x_includes'\
30322	ac_x_libraries='$x_libraries'"
30323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30324$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30325fi
30326
30327  if test "$no_x" = yes; then
30328  # Not all programs may use this symbol, but it does not hurt to define it.
30329
30330$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30331
30332  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30333else
30334  if test -n "$x_includes"; then
30335    X_CFLAGS="$X_CFLAGS -I$x_includes"
30336  fi
30337
30338  # It would also be nice to do this for all -L options, not just this one.
30339  if test -n "$x_libraries"; then
30340    X_LIBS="$X_LIBS -L$x_libraries"
30341    # For Solaris; some versions of Sun CC require a space after -R and
30342    # others require no space.  Words are not sufficient . . . .
30343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30344$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30345    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30346    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30347    ac_cxx_werror_flag=yes
30348    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30349/* end confdefs.h.  */
30350
30351int
30352main ()
30353{
30354
30355  ;
30356  return 0;
30357}
30358_ACEOF
30359if ac_fn_cxx_try_link "$LINENO"; then :
30360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30361$as_echo "no" >&6; }
30362       X_LIBS="$X_LIBS -R$x_libraries"
30363else
30364  LIBS="$ac_xsave_LIBS -R $x_libraries"
30365       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30366/* end confdefs.h.  */
30367
30368int
30369main ()
30370{
30371
30372  ;
30373  return 0;
30374}
30375_ACEOF
30376if ac_fn_cxx_try_link "$LINENO"; then :
30377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30378$as_echo "yes" >&6; }
30379	  X_LIBS="$X_LIBS -R $x_libraries"
30380else
30381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30382$as_echo "neither works" >&6; }
30383fi
30384rm -f core conftest.err conftest.$ac_objext \
30385    conftest$ac_exeext conftest.$ac_ext
30386fi
30387rm -f core conftest.err conftest.$ac_objext \
30388    conftest$ac_exeext conftest.$ac_ext
30389    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30390    LIBS=$ac_xsave_LIBS
30391  fi
30392
30393  # Check for system-dependent libraries X programs must link with.
30394  # Do this before checking for the system-independent R6 libraries
30395  # (-lICE), since we may need -lsocket or whatever for X linking.
30396
30397  if test "$ISC" = yes; then
30398    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30399  else
30400    # Martyn Johnson says this is needed for Ultrix, if the X
30401    # libraries were built with DECnet support.  And Karl Berry says
30402    # the Alpha needs dnet_stub (dnet does not exist).
30403    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30404    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30405/* end confdefs.h.  */
30406
30407/* Override any GCC internal prototype to avoid an error.
30408   Use char because int might match the return type of a GCC
30409   builtin and then its argument prototype would still apply.  */
30410#ifdef __cplusplus
30411extern "C"
30412#endif
30413char XOpenDisplay ();
30414int
30415main ()
30416{
30417return XOpenDisplay ();
30418  ;
30419  return 0;
30420}
30421_ACEOF
30422if ac_fn_cxx_try_link "$LINENO"; then :
30423
30424else
30425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30426$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30427if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30428  $as_echo_n "(cached) " >&6
30429else
30430  ac_check_lib_save_LIBS=$LIBS
30431LIBS="-ldnet  $LIBS"
30432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30433/* end confdefs.h.  */
30434
30435/* Override any GCC internal prototype to avoid an error.
30436   Use char because int might match the return type of a GCC
30437   builtin and then its argument prototype would still apply.  */
30438#ifdef __cplusplus
30439extern "C"
30440#endif
30441char dnet_ntoa ();
30442int
30443main ()
30444{
30445return dnet_ntoa ();
30446  ;
30447  return 0;
30448}
30449_ACEOF
30450if ac_fn_cxx_try_link "$LINENO"; then :
30451  ac_cv_lib_dnet_dnet_ntoa=yes
30452else
30453  ac_cv_lib_dnet_dnet_ntoa=no
30454fi
30455rm -f core conftest.err conftest.$ac_objext \
30456    conftest$ac_exeext conftest.$ac_ext
30457LIBS=$ac_check_lib_save_LIBS
30458fi
30459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30460$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30461if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30462  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30463fi
30464
30465    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30467$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30468if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30469  $as_echo_n "(cached) " >&6
30470else
30471  ac_check_lib_save_LIBS=$LIBS
30472LIBS="-ldnet_stub  $LIBS"
30473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30474/* end confdefs.h.  */
30475
30476/* Override any GCC internal prototype to avoid an error.
30477   Use char because int might match the return type of a GCC
30478   builtin and then its argument prototype would still apply.  */
30479#ifdef __cplusplus
30480extern "C"
30481#endif
30482char dnet_ntoa ();
30483int
30484main ()
30485{
30486return dnet_ntoa ();
30487  ;
30488  return 0;
30489}
30490_ACEOF
30491if ac_fn_cxx_try_link "$LINENO"; then :
30492  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30493else
30494  ac_cv_lib_dnet_stub_dnet_ntoa=no
30495fi
30496rm -f core conftest.err conftest.$ac_objext \
30497    conftest$ac_exeext conftest.$ac_ext
30498LIBS=$ac_check_lib_save_LIBS
30499fi
30500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30501$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30502if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30503  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30504fi
30505
30506    fi
30507fi
30508rm -f core conftest.err conftest.$ac_objext \
30509    conftest$ac_exeext conftest.$ac_ext
30510    LIBS="$ac_xsave_LIBS"
30511
30512    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30513    # to get the SysV transport functions.
30514    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30515    # needs -lnsl.
30516    # The nsl library prevents programs from opening the X display
30517    # on Irix 5.2, according to T.E. Dickey.
30518    # The functions gethostbyname, getservbyname, and inet_addr are
30519    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30520    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30521if test "x$ac_cv_func_gethostbyname" = xyes; then :
30522
30523fi
30524
30525    if test $ac_cv_func_gethostbyname = no; then
30526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30527$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30528if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30529  $as_echo_n "(cached) " >&6
30530else
30531  ac_check_lib_save_LIBS=$LIBS
30532LIBS="-lnsl  $LIBS"
30533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30534/* end confdefs.h.  */
30535
30536/* Override any GCC internal prototype to avoid an error.
30537   Use char because int might match the return type of a GCC
30538   builtin and then its argument prototype would still apply.  */
30539#ifdef __cplusplus
30540extern "C"
30541#endif
30542char gethostbyname ();
30543int
30544main ()
30545{
30546return gethostbyname ();
30547  ;
30548  return 0;
30549}
30550_ACEOF
30551if ac_fn_cxx_try_link "$LINENO"; then :
30552  ac_cv_lib_nsl_gethostbyname=yes
30553else
30554  ac_cv_lib_nsl_gethostbyname=no
30555fi
30556rm -f core conftest.err conftest.$ac_objext \
30557    conftest$ac_exeext conftest.$ac_ext
30558LIBS=$ac_check_lib_save_LIBS
30559fi
30560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30561$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30562if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30563  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30564fi
30565
30566      if test $ac_cv_lib_nsl_gethostbyname = no; then
30567	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30568$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30569if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30570  $as_echo_n "(cached) " >&6
30571else
30572  ac_check_lib_save_LIBS=$LIBS
30573LIBS="-lbsd  $LIBS"
30574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30575/* end confdefs.h.  */
30576
30577/* Override any GCC internal prototype to avoid an error.
30578   Use char because int might match the return type of a GCC
30579   builtin and then its argument prototype would still apply.  */
30580#ifdef __cplusplus
30581extern "C"
30582#endif
30583char gethostbyname ();
30584int
30585main ()
30586{
30587return gethostbyname ();
30588  ;
30589  return 0;
30590}
30591_ACEOF
30592if ac_fn_cxx_try_link "$LINENO"; then :
30593  ac_cv_lib_bsd_gethostbyname=yes
30594else
30595  ac_cv_lib_bsd_gethostbyname=no
30596fi
30597rm -f core conftest.err conftest.$ac_objext \
30598    conftest$ac_exeext conftest.$ac_ext
30599LIBS=$ac_check_lib_save_LIBS
30600fi
30601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30602$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30603if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30604  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30605fi
30606
30607      fi
30608    fi
30609
30610    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30611    # socket/setsockopt and other routines are undefined under SCO ODT
30612    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30613    # on later versions), says Simon Leinen: it contains gethostby*
30614    # variants that don't use the name server (or something).  -lsocket
30615    # must be given before -lnsl if both are needed.  We assume that
30616    # if connect needs -lnsl, so does gethostbyname.
30617    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30618if test "x$ac_cv_func_connect" = xyes; then :
30619
30620fi
30621
30622    if test $ac_cv_func_connect = no; then
30623      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30624$as_echo_n "checking for connect in -lsocket... " >&6; }
30625if ${ac_cv_lib_socket_connect+:} false; then :
30626  $as_echo_n "(cached) " >&6
30627else
30628  ac_check_lib_save_LIBS=$LIBS
30629LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30631/* end confdefs.h.  */
30632
30633/* Override any GCC internal prototype to avoid an error.
30634   Use char because int might match the return type of a GCC
30635   builtin and then its argument prototype would still apply.  */
30636#ifdef __cplusplus
30637extern "C"
30638#endif
30639char connect ();
30640int
30641main ()
30642{
30643return connect ();
30644  ;
30645  return 0;
30646}
30647_ACEOF
30648if ac_fn_cxx_try_link "$LINENO"; then :
30649  ac_cv_lib_socket_connect=yes
30650else
30651  ac_cv_lib_socket_connect=no
30652fi
30653rm -f core conftest.err conftest.$ac_objext \
30654    conftest$ac_exeext conftest.$ac_ext
30655LIBS=$ac_check_lib_save_LIBS
30656fi
30657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30658$as_echo "$ac_cv_lib_socket_connect" >&6; }
30659if test "x$ac_cv_lib_socket_connect" = xyes; then :
30660  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30661fi
30662
30663    fi
30664
30665    # Guillermo Gomez says -lposix is necessary on A/UX.
30666    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30667if test "x$ac_cv_func_remove" = xyes; then :
30668
30669fi
30670
30671    if test $ac_cv_func_remove = no; then
30672      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30673$as_echo_n "checking for remove in -lposix... " >&6; }
30674if ${ac_cv_lib_posix_remove+:} false; then :
30675  $as_echo_n "(cached) " >&6
30676else
30677  ac_check_lib_save_LIBS=$LIBS
30678LIBS="-lposix  $LIBS"
30679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30680/* end confdefs.h.  */
30681
30682/* Override any GCC internal prototype to avoid an error.
30683   Use char because int might match the return type of a GCC
30684   builtin and then its argument prototype would still apply.  */
30685#ifdef __cplusplus
30686extern "C"
30687#endif
30688char remove ();
30689int
30690main ()
30691{
30692return remove ();
30693  ;
30694  return 0;
30695}
30696_ACEOF
30697if ac_fn_cxx_try_link "$LINENO"; then :
30698  ac_cv_lib_posix_remove=yes
30699else
30700  ac_cv_lib_posix_remove=no
30701fi
30702rm -f core conftest.err conftest.$ac_objext \
30703    conftest$ac_exeext conftest.$ac_ext
30704LIBS=$ac_check_lib_save_LIBS
30705fi
30706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30707$as_echo "$ac_cv_lib_posix_remove" >&6; }
30708if test "x$ac_cv_lib_posix_remove" = xyes; then :
30709  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30710fi
30711
30712    fi
30713
30714    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30715    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30716if test "x$ac_cv_func_shmat" = xyes; then :
30717
30718fi
30719
30720    if test $ac_cv_func_shmat = no; then
30721      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30722$as_echo_n "checking for shmat in -lipc... " >&6; }
30723if ${ac_cv_lib_ipc_shmat+:} false; then :
30724  $as_echo_n "(cached) " >&6
30725else
30726  ac_check_lib_save_LIBS=$LIBS
30727LIBS="-lipc  $LIBS"
30728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30729/* end confdefs.h.  */
30730
30731/* Override any GCC internal prototype to avoid an error.
30732   Use char because int might match the return type of a GCC
30733   builtin and then its argument prototype would still apply.  */
30734#ifdef __cplusplus
30735extern "C"
30736#endif
30737char shmat ();
30738int
30739main ()
30740{
30741return shmat ();
30742  ;
30743  return 0;
30744}
30745_ACEOF
30746if ac_fn_cxx_try_link "$LINENO"; then :
30747  ac_cv_lib_ipc_shmat=yes
30748else
30749  ac_cv_lib_ipc_shmat=no
30750fi
30751rm -f core conftest.err conftest.$ac_objext \
30752    conftest$ac_exeext conftest.$ac_ext
30753LIBS=$ac_check_lib_save_LIBS
30754fi
30755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30756$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30757if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30758  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30759fi
30760
30761    fi
30762  fi
30763
30764  # Check for libraries that X11R6 Xt/Xaw programs need.
30765  ac_save_LDFLAGS=$LDFLAGS
30766  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30767  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30768  # check for ICE first), but we must link in the order -lSM -lICE or
30769  # we get undefined symbols.  So assume we have SM if we have ICE.
30770  # These have to be linked with before -lX11, unlike the other
30771  # libraries we check for below, so use a different variable.
30772  # John Interrante, Karl Berry
30773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30774$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30775if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30776  $as_echo_n "(cached) " >&6
30777else
30778  ac_check_lib_save_LIBS=$LIBS
30779LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30781/* end confdefs.h.  */
30782
30783/* Override any GCC internal prototype to avoid an error.
30784   Use char because int might match the return type of a GCC
30785   builtin and then its argument prototype would still apply.  */
30786#ifdef __cplusplus
30787extern "C"
30788#endif
30789char IceConnectionNumber ();
30790int
30791main ()
30792{
30793return IceConnectionNumber ();
30794  ;
30795  return 0;
30796}
30797_ACEOF
30798if ac_fn_cxx_try_link "$LINENO"; then :
30799  ac_cv_lib_ICE_IceConnectionNumber=yes
30800else
30801  ac_cv_lib_ICE_IceConnectionNumber=no
30802fi
30803rm -f core conftest.err conftest.$ac_objext \
30804    conftest$ac_exeext conftest.$ac_ext
30805LIBS=$ac_check_lib_save_LIBS
30806fi
30807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30808$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30809if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30810  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30811fi
30812
30813  LDFLAGS=$ac_save_LDFLAGS
30814
30815fi
30816
30817
30818  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30819  # this doesn't make sense so we remove it.
30820  if test "x$COMPILE_TYPE" = xcross; then
30821    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30822  fi
30823
30824  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30825
30826  # Print a helpful message on how to acquire the necessary build dependency.
30827  # x11 is the help tag: freetype, cups, pulse, alsa etc
30828  MISSING_DEPENDENCY=x11
30829
30830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30831    cygwin_help $MISSING_DEPENDENCY
30832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30833    msys_help $MISSING_DEPENDENCY
30834  else
30835    PKGHANDLER_COMMAND=
30836
30837    case $PKGHANDLER in
30838      apt-get)
30839        apt_help     $MISSING_DEPENDENCY ;;
30840      yum)
30841        yum_help     $MISSING_DEPENDENCY ;;
30842      port)
30843        port_help    $MISSING_DEPENDENCY ;;
30844      pkgutil)
30845        pkgutil_help $MISSING_DEPENDENCY ;;
30846      pkgadd)
30847        pkgadd_help  $MISSING_DEPENDENCY ;;
30848      * )
30849        break ;;
30850    esac
30851
30852    if test "x$PKGHANDLER_COMMAND" != x; then
30853      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30854    fi
30855  fi
30856
30857    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30858  fi
30859
30860  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30861    OPENWIN_HOME="/usr/openwin"
30862  fi
30863
30864
30865
30866  #
30867  # Weird Sol10 something check...TODO change to try compile
30868  #
30869  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30870    if test "`uname -r`" = "5.10"; then
30871      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30872        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30873      fi
30874    fi
30875  fi
30876
30877  ac_ext=c
30878ac_cpp='$CPP $CPPFLAGS'
30879ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30880ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30881ac_compiler_gnu=$ac_cv_c_compiler_gnu
30882
30883  OLD_CFLAGS="$CFLAGS"
30884  CFLAGS="$CFLAGS $X_CFLAGS"
30885
30886  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30887  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30888do :
30889  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30890ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30891        # include <X11/Xlib.h>
30892        # include <X11/Xutil.h>
30893
30894
30895"
30896if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30897  cat >>confdefs.h <<_ACEOF
30898#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30899_ACEOF
30900 X11_A_OK=yes
30901else
30902  X11_A_OK=no; break
30903fi
30904
30905done
30906
30907
30908  CFLAGS="$OLD_CFLAGS"
30909  ac_ext=cpp
30910ac_cpp='$CXXCPP $CPPFLAGS'
30911ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30912ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30913ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30914
30915
30916  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30917
30918  # Print a helpful message on how to acquire the necessary build dependency.
30919  # x11 is the help tag: freetype, cups, pulse, alsa etc
30920  MISSING_DEPENDENCY=x11
30921
30922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30923    cygwin_help $MISSING_DEPENDENCY
30924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30925    msys_help $MISSING_DEPENDENCY
30926  else
30927    PKGHANDLER_COMMAND=
30928
30929    case $PKGHANDLER in
30930      apt-get)
30931        apt_help     $MISSING_DEPENDENCY ;;
30932      yum)
30933        yum_help     $MISSING_DEPENDENCY ;;
30934      port)
30935        port_help    $MISSING_DEPENDENCY ;;
30936      pkgutil)
30937        pkgutil_help $MISSING_DEPENDENCY ;;
30938      pkgadd)
30939        pkgadd_help  $MISSING_DEPENDENCY ;;
30940      * )
30941        break ;;
30942    esac
30943
30944    if test "x$PKGHANDLER_COMMAND" != x; then
30945      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30946    fi
30947  fi
30948
30949    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30950  fi
30951
30952
30953
30954
30955
30956
30957  ###############################################################################
30958  #
30959  # The common unix printing system cups is used to print from java.
30960  #
30961
30962# Check whether --with-cups was given.
30963if test "${with_cups+set}" = set; then :
30964  withval=$with_cups;
30965fi
30966
30967
30968# Check whether --with-cups-include was given.
30969if test "${with_cups_include+set}" = set; then :
30970  withval=$with_cups_include;
30971fi
30972
30973
30974  if test "x$CUPS_NOT_NEEDED" = xyes; then
30975    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30976      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30977$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30978    fi
30979    CUPS_CFLAGS=
30980  else
30981    CUPS_FOUND=no
30982
30983    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30984      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30985    fi
30986
30987    if test "x${with_cups}" != x; then
30988      CUPS_CFLAGS="-I${with_cups}/include"
30989      CUPS_FOUND=yes
30990    fi
30991    if test "x${with_cups_include}" != x; then
30992      CUPS_CFLAGS="-I${with_cups_include}"
30993      CUPS_FOUND=yes
30994    fi
30995    if test "x$CUPS_FOUND" = xno; then
30996
30997
30998  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30999    # Source the builddeps file again, to make sure it uses the latest variables!
31000    . $builddepsfile
31001    # Look for a target and build machine specific resource!
31002    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31003    if test "x$resource" = x; then
31004      # Ok, lets instead look for a target specific resource
31005      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31006    fi
31007    if test "x$resource" = x; then
31008      # Ok, lets instead look for a build specific resource
31009      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31010    fi
31011    if test "x$resource" = x; then
31012      # Ok, lets instead look for a generic resource
31013      # (The cups comes from M4 and not the shell, thus no need for eval here.)
31014      resource=${builddep_cups}
31015    fi
31016    if test "x$resource" != x; then
31017      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31018$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31019      # If the resource in the builddeps.conf file is an existing directory,
31020      # for example /java/linux/cups
31021      if test -d ${resource}; then
31022        depdir=${resource}
31023      else
31024
31025  # cups is for example mymodule
31026  # $resource is for example libs/general/libmymod_1_2_3.zip
31027  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31028  # $with_builddeps_dir is for example /localhome/builddeps
31029  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31030  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31031  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31032  filename=`basename $resource`
31033  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31034  filebase=${filename%%.*}
31035  extension=${filename#*.}
31036  installdir=$with_builddeps_dir/$filebase
31037  if test ! -f $installdir/$filename.unpacked; then
31038    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31039$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31040    if test ! -d $installdir; then
31041      mkdir -p $installdir
31042    fi
31043    if test ! -d $installdir; then
31044      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31045    fi
31046    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31047    touch $tmpfile
31048    if test ! -f $tmpfile; then
31049      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31050    fi
31051
31052  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31053  # $tmpfile is the local file name for the downloaded file.
31054  VALID_TOOL=no
31055  if test "x$BDEPS_FTP" = xwget; then
31056    VALID_TOOL=yes
31057    wget -O $tmpfile $with_builddeps_server/$resource
31058  fi
31059  if test "x$BDEPS_FTP" = xlftp; then
31060    VALID_TOOL=yes
31061    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31062  fi
31063  if test "x$BDEPS_FTP" = xftp; then
31064    VALID_TOOL=yes
31065    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31066    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31067    FTPUSERPWD=${FTPSERVER%%@*}
31068    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31069      FTPUSER=${userpwd%%:*}
31070      FTPPWD=${userpwd#*@}
31071      FTPSERVER=${FTPSERVER#*@}
31072    else
31073      FTPUSER=ftp
31074      FTPPWD=ftp
31075    fi
31076    # the "pass" command does not work on some
31077    # ftp clients (read ftp.exe) but if it works,
31078    # passive mode is better!
31079    ( \
31080        echo "user $FTPUSER $FTPPWD"        ; \
31081        echo "pass"                         ; \
31082        echo "bin"                          ; \
31083        echo "get $FTPPATH $tmpfile"              ; \
31084    ) | ftp -in $FTPSERVER
31085  fi
31086  if test "x$VALID_TOOL" != xyes; then
31087    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31088  fi
31089
31090    mv $tmpfile $installdir/$filename
31091    if test ! -s $installdir/$filename; then
31092      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31093    fi
31094    case "$extension" in
31095      zip)  echo "Unzipping $installdir/$filename..."
31096        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31097        ;;
31098      tar.gz) echo "Untaring $installdir/$filename..."
31099        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31100        ;;
31101      tgz) echo "Untaring $installdir/$filename..."
31102        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31103        ;;
31104      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31105        ;;
31106    esac
31107  fi
31108  if test -f $installdir/$filename.unpacked; then
31109    depdir=$installdir
31110  fi
31111
31112      fi
31113      # Source the builddeps file again, because in the previous command, the depdir
31114      # was updated to point at the current build dependency install directory.
31115      . $builddepsfile
31116      # Now extract variables from the builddeps.conf files.
31117      theroot=${builddep_cups_ROOT}
31118      thecflags=${builddep_cups_CFLAGS}
31119      thelibs=${builddep_cups_LIBS}
31120      if test "x$depdir" = x; then
31121        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31122      fi
31123      CUPS=$depdir
31124      if test "x$theroot" != x; then
31125        CUPS="$theroot"
31126      fi
31127      if test "x$thecflags" != x; then
31128        CUPS_CFLAGS="$thecflags"
31129      fi
31130      if test "x$thelibs" != x; then
31131        CUPS_LIBS="$thelibs"
31132      fi
31133      CUPS_FOUND=yes
31134
31135    fi
31136
31137  fi
31138
31139    fi
31140    if test "x$CUPS_FOUND" = xno; then
31141      # Are the cups headers installed in the default /usr/include location?
31142      for ac_header in cups/cups.h cups/ppd.h
31143do :
31144  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31145ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31146if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31147  cat >>confdefs.h <<_ACEOF
31148#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31149_ACEOF
31150
31151            CUPS_FOUND=yes
31152            CUPS_CFLAGS=
31153            DEFAULT_CUPS=yes
31154
31155
31156fi
31157
31158done
31159
31160    fi
31161    if test "x$CUPS_FOUND" = xno; then
31162      # Getting nervous now? Lets poke around for standard Solaris third-party
31163      # package installation locations.
31164      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31165$as_echo_n "checking for cups headers... " >&6; }
31166      if test -s /opt/sfw/cups/include/cups/cups.h; then
31167        # An SFW package seems to be installed!
31168        CUPS_FOUND=yes
31169        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31170      elif test -s /opt/csw/include/cups/cups.h; then
31171        # A CSW package seems to be installed!
31172        CUPS_FOUND=yes
31173        CUPS_CFLAGS="-I/opt/csw/include"
31174      fi
31175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31176$as_echo "$CUPS_FOUND" >&6; }
31177    fi
31178    if test "x$CUPS_FOUND" = xno; then
31179
31180  # Print a helpful message on how to acquire the necessary build dependency.
31181  # cups is the help tag: freetype, cups, pulse, alsa etc
31182  MISSING_DEPENDENCY=cups
31183
31184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31185    cygwin_help $MISSING_DEPENDENCY
31186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31187    msys_help $MISSING_DEPENDENCY
31188  else
31189    PKGHANDLER_COMMAND=
31190
31191    case $PKGHANDLER in
31192      apt-get)
31193        apt_help     $MISSING_DEPENDENCY ;;
31194      yum)
31195        yum_help     $MISSING_DEPENDENCY ;;
31196      port)
31197        port_help    $MISSING_DEPENDENCY ;;
31198      pkgutil)
31199        pkgutil_help $MISSING_DEPENDENCY ;;
31200      pkgadd)
31201        pkgadd_help  $MISSING_DEPENDENCY ;;
31202      * )
31203        break ;;
31204    esac
31205
31206    if test "x$PKGHANDLER_COMMAND" != x; then
31207      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31208    fi
31209  fi
31210
31211      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31212    fi
31213  fi
31214
31215
31216
31217
31218
31219
31220  ###############################################################################
31221  #
31222  # The ubiquitous freetype library is used to render fonts.
31223  #
31224
31225# Check whether --with-freetype was given.
31226if test "${with_freetype+set}" = set; then :
31227  withval=$with_freetype;
31228fi
31229
31230
31231# Check whether --with-freetype-include was given.
31232if test "${with_freetype_include+set}" = set; then :
31233  withval=$with_freetype_include;
31234fi
31235
31236
31237# Check whether --with-freetype-lib was given.
31238if test "${with_freetype_lib+set}" = set; then :
31239  withval=$with_freetype_lib;
31240fi
31241
31242  # Check whether --enable-freetype-bundling was given.
31243if test "${enable_freetype_bundling+set}" = set; then :
31244  enableval=$enable_freetype_bundling;
31245fi
31246
31247
31248  FREETYPE_CFLAGS=
31249  FREETYPE_LIBS=
31250  FREETYPE_BUNDLE_LIB_PATH=
31251
31252  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31253    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31254      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31255$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31256    fi
31257    if test "x$enable_freetype_bundling" != x; then
31258      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31259$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31260    fi
31261  else
31262    # freetype is needed to build; go get it!
31263
31264    BUNDLE_FREETYPE="$enable_freetype_bundling"
31265
31266    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31267      # User has specified settings
31268
31269      if test "x$BUNDLE_FREETYPE" = x; then
31270        # If not specified, default is to bundle freetype
31271        BUNDLE_FREETYPE=yes
31272      fi
31273
31274      if test "x$with_freetype" != x; then
31275        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31276        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31277      fi
31278
31279      # Allow --with-freetype-lib and --with-freetype-include to override
31280      if test "x$with_freetype_include" != x; then
31281        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31282      fi
31283      if test "x$with_freetype_lib" != x; then
31284        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31285      fi
31286
31287      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31288        # Okay, we got it. Check that it works.
31289
31290  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31291  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31292  METHOD="--with-freetype"
31293
31294  # First check if the files exists.
31295  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31296    # We found an arbitrary include file. That's a good sign.
31297    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31298$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31299    FOUND_FREETYPE=yes
31300
31301    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31302    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31303      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31304$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31305      FOUND_FREETYPE=no
31306    else
31307      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31308        # On Windows, we will need both .lib and .dll file.
31309        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31310          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31311$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31312          FOUND_FREETYPE=no
31313        fi
31314      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
31315        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31316        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31317      fi
31318    fi
31319  fi
31320
31321  if test "x$FOUND_FREETYPE" = xyes; then
31322
31323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31324
31325  # Input might be given as Windows format, start by converting to
31326  # unix format.
31327  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31328  new_path=`$CYGPATH -u "$path"`
31329
31330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31333  # "foo.exe" is OK but "foo" is an error.
31334  #
31335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31336  # It is also a way to make sure we got the proper file name for the real test later on.
31337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31338  if test "x$test_shortpath" = x; then
31339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31341    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31342  fi
31343
31344  # Call helper function which possibly converts this using DOS-style short mode.
31345  # If so, the updated path is stored in $new_path.
31346
31347  input_path="$new_path"
31348  # Check if we need to convert this using DOS-style short mode. If the path
31349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31350  # take no chances and rewrite it.
31351  # Note: m4 eats our [], so we need to use [ and ] instead.
31352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31353  if test "x$has_forbidden_chars" != x; then
31354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31358      # Going to short mode and back again did indeed matter. Since short mode is
31359      # case insensitive, let's make it lowercase to improve readability.
31360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31361      # Now convert it back to Unix-stile (cygpath)
31362      input_path=`$CYGPATH -u "$shortmode_path"`
31363      new_path="$input_path"
31364    fi
31365  fi
31366
31367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31368  if test "x$test_cygdrive_prefix" = x; then
31369    # As a simple fix, exclude /usr/bin since it's not a real path.
31370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31372      # a path prefixed by /cygdrive for fixpath to work.
31373      new_path="$CYGWIN_ROOT_PATH$input_path"
31374    fi
31375  fi
31376
31377
31378  if test "x$path" != "x$new_path"; then
31379    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31382  fi
31383
31384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31385
31386  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31387  has_colon=`$ECHO $path | $GREP ^.:`
31388  new_path="$path"
31389  if test "x$has_colon" = x; then
31390    # Not in mixed or Windows style, start by that.
31391    new_path=`cmd //c echo $path`
31392  fi
31393
31394
31395  input_path="$new_path"
31396  # Check if we need to convert this using DOS-style short mode. If the path
31397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31398  # take no chances and rewrite it.
31399  # Note: m4 eats our [], so we need to use [ and ] instead.
31400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31401  if test "x$has_forbidden_chars" != x; then
31402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31404  fi
31405
31406
31407  windows_path="$new_path"
31408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31409    unix_path=`$CYGPATH -u "$windows_path"`
31410    new_path="$unix_path"
31411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31413    new_path="$unix_path"
31414  fi
31415
31416  if test "x$path" != "x$new_path"; then
31417    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31419$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31420  fi
31421
31422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31424
31425  else
31426    # We're on a posix platform. Hooray! :)
31427    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31428    has_space=`$ECHO "$path" | $GREP " "`
31429    if test "x$has_space" != x; then
31430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31432      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31433    fi
31434
31435    # Use eval to expand a potential ~
31436    eval path="$path"
31437    if test ! -f "$path" && test ! -d "$path"; then
31438      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31439    fi
31440
31441    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31442  fi
31443
31444
31445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31446
31447  # Input might be given as Windows format, start by converting to
31448  # unix format.
31449  path="$POTENTIAL_FREETYPE_LIB_PATH"
31450  new_path=`$CYGPATH -u "$path"`
31451
31452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31455  # "foo.exe" is OK but "foo" is an error.
31456  #
31457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31458  # It is also a way to make sure we got the proper file name for the real test later on.
31459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31460  if test "x$test_shortpath" = x; then
31461    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31462$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31463    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31464  fi
31465
31466  # Call helper function which possibly converts this using DOS-style short mode.
31467  # If so, the updated path is stored in $new_path.
31468
31469  input_path="$new_path"
31470  # Check if we need to convert this using DOS-style short mode. If the path
31471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31472  # take no chances and rewrite it.
31473  # Note: m4 eats our [], so we need to use [ and ] instead.
31474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31475  if test "x$has_forbidden_chars" != x; then
31476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31480      # Going to short mode and back again did indeed matter. Since short mode is
31481      # case insensitive, let's make it lowercase to improve readability.
31482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31483      # Now convert it back to Unix-stile (cygpath)
31484      input_path=`$CYGPATH -u "$shortmode_path"`
31485      new_path="$input_path"
31486    fi
31487  fi
31488
31489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31490  if test "x$test_cygdrive_prefix" = x; then
31491    # As a simple fix, exclude /usr/bin since it's not a real path.
31492    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31494      # a path prefixed by /cygdrive for fixpath to work.
31495      new_path="$CYGWIN_ROOT_PATH$input_path"
31496    fi
31497  fi
31498
31499
31500  if test "x$path" != "x$new_path"; then
31501    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31503$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31504  fi
31505
31506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31507
31508  path="$POTENTIAL_FREETYPE_LIB_PATH"
31509  has_colon=`$ECHO $path | $GREP ^.:`
31510  new_path="$path"
31511  if test "x$has_colon" = x; then
31512    # Not in mixed or Windows style, start by that.
31513    new_path=`cmd //c echo $path`
31514  fi
31515
31516
31517  input_path="$new_path"
31518  # Check if we need to convert this using DOS-style short mode. If the path
31519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31520  # take no chances and rewrite it.
31521  # Note: m4 eats our [], so we need to use [ and ] instead.
31522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31523  if test "x$has_forbidden_chars" != x; then
31524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31526  fi
31527
31528
31529  windows_path="$new_path"
31530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31531    unix_path=`$CYGPATH -u "$windows_path"`
31532    new_path="$unix_path"
31533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31535    new_path="$unix_path"
31536  fi
31537
31538  if test "x$path" != "x$new_path"; then
31539    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31542  fi
31543
31544  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31545  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31546
31547  else
31548    # We're on a posix platform. Hooray! :)
31549    path="$POTENTIAL_FREETYPE_LIB_PATH"
31550    has_space=`$ECHO "$path" | $GREP " "`
31551    if test "x$has_space" != x; then
31552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31553$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31554      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31555    fi
31556
31557    # Use eval to expand a potential ~
31558    eval path="$path"
31559    if test ! -f "$path" && test ! -d "$path"; then
31560      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31561    fi
31562
31563    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31564  fi
31565
31566
31567    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31569$as_echo_n "checking for freetype includes... " >&6; }
31570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31571$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31572    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31574$as_echo_n "checking for freetype libraries... " >&6; }
31575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31576$as_echo "$FREETYPE_LIB_PATH" >&6; }
31577  fi
31578
31579        if test "x$FOUND_FREETYPE" != xyes; then
31580          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31581        fi
31582      else
31583        # User specified only one of lib or include. This is an error.
31584        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31585          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31586$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31587          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31588        else
31589          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31590$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31591          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31592        fi
31593      fi
31594    else
31595      # User did not specify settings, but we need freetype. Try to locate it.
31596
31597      if test "x$BUNDLE_FREETYPE" = x; then
31598        # If not specified, default is to bundle freetype only on windows
31599        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31600          BUNDLE_FREETYPE=yes
31601        else
31602          BUNDLE_FREETYPE=no
31603        fi
31604      fi
31605
31606      if test "x$FOUND_FREETYPE" != xyes; then
31607        # Check builddeps
31608
31609
31610  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31611    # Source the builddeps file again, to make sure it uses the latest variables!
31612    . $builddepsfile
31613    # Look for a target and build machine specific resource!
31614    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31615    if test "x$resource" = x; then
31616      # Ok, lets instead look for a target specific resource
31617      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31618    fi
31619    if test "x$resource" = x; then
31620      # Ok, lets instead look for a build specific resource
31621      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31622    fi
31623    if test "x$resource" = x; then
31624      # Ok, lets instead look for a generic resource
31625      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31626      resource=${builddep_freetype2}
31627    fi
31628    if test "x$resource" != x; then
31629      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31630$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31631      # If the resource in the builddeps.conf file is an existing directory,
31632      # for example /java/linux/cups
31633      if test -d ${resource}; then
31634        depdir=${resource}
31635      else
31636
31637  # freetype2 is for example mymodule
31638  # $resource is for example libs/general/libmymod_1_2_3.zip
31639  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31640  # $with_builddeps_dir is for example /localhome/builddeps
31641  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31642  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31643  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31644  filename=`basename $resource`
31645  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31646  filebase=${filename%%.*}
31647  extension=${filename#*.}
31648  installdir=$with_builddeps_dir/$filebase
31649  if test ! -f $installdir/$filename.unpacked; then
31650    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31651$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31652    if test ! -d $installdir; then
31653      mkdir -p $installdir
31654    fi
31655    if test ! -d $installdir; then
31656      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31657    fi
31658    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31659    touch $tmpfile
31660    if test ! -f $tmpfile; then
31661      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31662    fi
31663
31664  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31665  # $tmpfile is the local file name for the downloaded file.
31666  VALID_TOOL=no
31667  if test "x$BDEPS_FTP" = xwget; then
31668    VALID_TOOL=yes
31669    wget -O $tmpfile $with_builddeps_server/$resource
31670  fi
31671  if test "x$BDEPS_FTP" = xlftp; then
31672    VALID_TOOL=yes
31673    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31674  fi
31675  if test "x$BDEPS_FTP" = xftp; then
31676    VALID_TOOL=yes
31677    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31678    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31679    FTPUSERPWD=${FTPSERVER%%@*}
31680    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31681      FTPUSER=${userpwd%%:*}
31682      FTPPWD=${userpwd#*@}
31683      FTPSERVER=${FTPSERVER#*@}
31684    else
31685      FTPUSER=ftp
31686      FTPPWD=ftp
31687    fi
31688    # the "pass" command does not work on some
31689    # ftp clients (read ftp.exe) but if it works,
31690    # passive mode is better!
31691    ( \
31692        echo "user $FTPUSER $FTPPWD"        ; \
31693        echo "pass"                         ; \
31694        echo "bin"                          ; \
31695        echo "get $FTPPATH $tmpfile"              ; \
31696    ) | ftp -in $FTPSERVER
31697  fi
31698  if test "x$VALID_TOOL" != xyes; then
31699    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31700  fi
31701
31702    mv $tmpfile $installdir/$filename
31703    if test ! -s $installdir/$filename; then
31704      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31705    fi
31706    case "$extension" in
31707      zip)  echo "Unzipping $installdir/$filename..."
31708        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31709        ;;
31710      tar.gz) echo "Untaring $installdir/$filename..."
31711        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31712        ;;
31713      tgz) echo "Untaring $installdir/$filename..."
31714        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31715        ;;
31716      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31717        ;;
31718    esac
31719  fi
31720  if test -f $installdir/$filename.unpacked; then
31721    depdir=$installdir
31722  fi
31723
31724      fi
31725      # Source the builddeps file again, because in the previous command, the depdir
31726      # was updated to point at the current build dependency install directory.
31727      . $builddepsfile
31728      # Now extract variables from the builddeps.conf files.
31729      theroot=${builddep_freetype2_ROOT}
31730      thecflags=${builddep_freetype2_CFLAGS}
31731      thelibs=${builddep_freetype2_LIBS}
31732      if test "x$depdir" = x; then
31733        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31734      fi
31735      FREETYPE=$depdir
31736      if test "x$theroot" != x; then
31737        FREETYPE="$theroot"
31738      fi
31739      if test "x$thecflags" != x; then
31740        FREETYPE_CFLAGS="$thecflags"
31741      fi
31742      if test "x$thelibs" != x; then
31743        FREETYPE_LIBS="$thelibs"
31744      fi
31745      FOUND_FREETYPE=yes
31746      else FOUND_FREETYPE=no
31747
31748    fi
31749    else FOUND_FREETYPE=no
31750
31751  fi
31752
31753        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31754        if test "x$FOUND_FREETYPE" = xyes; then
31755          if test "x$BUNDLE_FREETYPE" = xyes; then
31756            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31757$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31758            FOUND_FREETYPE=no
31759          else
31760            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31761$as_echo_n "checking for freetype... " >&6; }
31762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31763$as_echo "yes (using builddeps)" >&6; }
31764          fi
31765        fi
31766      fi
31767
31768      if test "x$FOUND_FREETYPE" != xyes; then
31769        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31770        if test "x$PKG_CONFIG" != x; then
31771
31772pkg_failed=no
31773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31774$as_echo_n "checking for FREETYPE... " >&6; }
31775
31776if test -n "$FREETYPE_CFLAGS"; then
31777    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
31778 elif test -n "$PKG_CONFIG"; then
31779    if test -n "$PKG_CONFIG" && \
31780    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31781  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31782  ac_status=$?
31783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31784  test $ac_status = 0; }; then
31785  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31786else
31787  pkg_failed=yes
31788fi
31789 else
31790    pkg_failed=untried
31791fi
31792if test -n "$FREETYPE_LIBS"; then
31793    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
31794 elif test -n "$PKG_CONFIG"; then
31795    if test -n "$PKG_CONFIG" && \
31796    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31797  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31798  ac_status=$?
31799  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31800  test $ac_status = 0; }; then
31801  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31802else
31803  pkg_failed=yes
31804fi
31805 else
31806    pkg_failed=untried
31807fi
31808
31809
31810
31811if test $pkg_failed = yes; then
31812
31813if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31814        _pkg_short_errors_supported=yes
31815else
31816        _pkg_short_errors_supported=no
31817fi
31818        if test $_pkg_short_errors_supported = yes; then
31819	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31820        else
31821	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31822        fi
31823	# Put the nasty error message in config.log where it belongs
31824	echo "$FREETYPE_PKG_ERRORS" >&5
31825
31826	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31827$as_echo "no" >&6; }
31828                FOUND_FREETYPE=no
31829elif test $pkg_failed = untried; then
31830	FOUND_FREETYPE=no
31831else
31832	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
31833	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
31834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31835$as_echo "yes" >&6; }
31836	FOUND_FREETYPE=yes
31837fi
31838          if test "x$FOUND_FREETYPE" = xyes; then
31839            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31840            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
31841            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31842            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31843              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
31844            fi
31845            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31846            if test "x$BUNDLE_FREETYPE" = xyes; then
31847              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
31848$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
31849              FOUND_FREETYPE=no
31850            else
31851              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31852$as_echo_n "checking for freetype... " >&6; }
31853              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
31854$as_echo "yes (using pkg-config)" >&6; }
31855            fi
31856          fi
31857        fi
31858      fi
31859
31860      if test "x$FOUND_FREETYPE" != xyes; then
31861        # Check in well-known locations
31862        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31863          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
31864
31865  windows_path="$FREETYPE_BASE_DIR"
31866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31867    unix_path=`$CYGPATH -u "$windows_path"`
31868    FREETYPE_BASE_DIR="$unix_path"
31869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31871    FREETYPE_BASE_DIR="$unix_path"
31872  fi
31873
31874
31875  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
31876  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
31877  METHOD="well-known location"
31878
31879  # First check if the files exists.
31880  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31881    # We found an arbitrary include file. That's a good sign.
31882    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31883$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31884    FOUND_FREETYPE=yes
31885
31886    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31887    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31888      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31889$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31890      FOUND_FREETYPE=no
31891    else
31892      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31893        # On Windows, we will need both .lib and .dll file.
31894        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31895          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31896$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31897          FOUND_FREETYPE=no
31898        fi
31899      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
31900        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31901        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31902      fi
31903    fi
31904  fi
31905
31906  if test "x$FOUND_FREETYPE" = xyes; then
31907
31908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31909
31910  # Input might be given as Windows format, start by converting to
31911  # unix format.
31912  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31913  new_path=`$CYGPATH -u "$path"`
31914
31915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31918  # "foo.exe" is OK but "foo" is an error.
31919  #
31920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31921  # It is also a way to make sure we got the proper file name for the real test later on.
31922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31923  if test "x$test_shortpath" = x; then
31924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31925$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31926    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31927  fi
31928
31929  # Call helper function which possibly converts this using DOS-style short mode.
31930  # If so, the updated path is stored in $new_path.
31931
31932  input_path="$new_path"
31933  # Check if we need to convert this using DOS-style short mode. If the path
31934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31935  # take no chances and rewrite it.
31936  # Note: m4 eats our [], so we need to use [ and ] instead.
31937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31938  if test "x$has_forbidden_chars" != x; then
31939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31943      # Going to short mode and back again did indeed matter. Since short mode is
31944      # case insensitive, let's make it lowercase to improve readability.
31945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31946      # Now convert it back to Unix-stile (cygpath)
31947      input_path=`$CYGPATH -u "$shortmode_path"`
31948      new_path="$input_path"
31949    fi
31950  fi
31951
31952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31953  if test "x$test_cygdrive_prefix" = x; then
31954    # As a simple fix, exclude /usr/bin since it's not a real path.
31955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31957      # a path prefixed by /cygdrive for fixpath to work.
31958      new_path="$CYGWIN_ROOT_PATH$input_path"
31959    fi
31960  fi
31961
31962
31963  if test "x$path" != "x$new_path"; then
31964    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31966$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31967  fi
31968
31969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31970
31971  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31972  has_colon=`$ECHO $path | $GREP ^.:`
31973  new_path="$path"
31974  if test "x$has_colon" = x; then
31975    # Not in mixed or Windows style, start by that.
31976    new_path=`cmd //c echo $path`
31977  fi
31978
31979
31980  input_path="$new_path"
31981  # Check if we need to convert this using DOS-style short mode. If the path
31982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31983  # take no chances and rewrite it.
31984  # Note: m4 eats our [], so we need to use [ and ] instead.
31985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31986  if test "x$has_forbidden_chars" != x; then
31987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31989  fi
31990
31991
31992  windows_path="$new_path"
31993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31994    unix_path=`$CYGPATH -u "$windows_path"`
31995    new_path="$unix_path"
31996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31998    new_path="$unix_path"
31999  fi
32000
32001  if test "x$path" != "x$new_path"; then
32002    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32004$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32005  fi
32006
32007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32009
32010  else
32011    # We're on a posix platform. Hooray! :)
32012    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32013    has_space=`$ECHO "$path" | $GREP " "`
32014    if test "x$has_space" != x; then
32015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32017      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32018    fi
32019
32020    # Use eval to expand a potential ~
32021    eval path="$path"
32022    if test ! -f "$path" && test ! -d "$path"; then
32023      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32024    fi
32025
32026    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32027  fi
32028
32029
32030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32031
32032  # Input might be given as Windows format, start by converting to
32033  # unix format.
32034  path="$POTENTIAL_FREETYPE_LIB_PATH"
32035  new_path=`$CYGPATH -u "$path"`
32036
32037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32040  # "foo.exe" is OK but "foo" is an error.
32041  #
32042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32043  # It is also a way to make sure we got the proper file name for the real test later on.
32044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32045  if test "x$test_shortpath" = x; then
32046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32047$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32048    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32049  fi
32050
32051  # Call helper function which possibly converts this using DOS-style short mode.
32052  # If so, the updated path is stored in $new_path.
32053
32054  input_path="$new_path"
32055  # Check if we need to convert this using DOS-style short mode. If the path
32056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32057  # take no chances and rewrite it.
32058  # Note: m4 eats our [], so we need to use [ and ] instead.
32059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32060  if test "x$has_forbidden_chars" != x; then
32061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32065      # Going to short mode and back again did indeed matter. Since short mode is
32066      # case insensitive, let's make it lowercase to improve readability.
32067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32068      # Now convert it back to Unix-stile (cygpath)
32069      input_path=`$CYGPATH -u "$shortmode_path"`
32070      new_path="$input_path"
32071    fi
32072  fi
32073
32074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32075  if test "x$test_cygdrive_prefix" = x; then
32076    # As a simple fix, exclude /usr/bin since it's not a real path.
32077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32079      # a path prefixed by /cygdrive for fixpath to work.
32080      new_path="$CYGWIN_ROOT_PATH$input_path"
32081    fi
32082  fi
32083
32084
32085  if test "x$path" != "x$new_path"; then
32086    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32088$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32089  fi
32090
32091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32092
32093  path="$POTENTIAL_FREETYPE_LIB_PATH"
32094  has_colon=`$ECHO $path | $GREP ^.:`
32095  new_path="$path"
32096  if test "x$has_colon" = x; then
32097    # Not in mixed or Windows style, start by that.
32098    new_path=`cmd //c echo $path`
32099  fi
32100
32101
32102  input_path="$new_path"
32103  # Check if we need to convert this using DOS-style short mode. If the path
32104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32105  # take no chances and rewrite it.
32106  # Note: m4 eats our [], so we need to use [ and ] instead.
32107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32108  if test "x$has_forbidden_chars" != x; then
32109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32111  fi
32112
32113
32114  windows_path="$new_path"
32115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32116    unix_path=`$CYGPATH -u "$windows_path"`
32117    new_path="$unix_path"
32118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32120    new_path="$unix_path"
32121  fi
32122
32123  if test "x$path" != "x$new_path"; then
32124    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32126$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32127  fi
32128
32129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32131
32132  else
32133    # We're on a posix platform. Hooray! :)
32134    path="$POTENTIAL_FREETYPE_LIB_PATH"
32135    has_space=`$ECHO "$path" | $GREP " "`
32136    if test "x$has_space" != x; then
32137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32138$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32139      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32140    fi
32141
32142    # Use eval to expand a potential ~
32143    eval path="$path"
32144    if test ! -f "$path" && test ! -d "$path"; then
32145      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32146    fi
32147
32148    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32149  fi
32150
32151
32152    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32154$as_echo_n "checking for freetype includes... " >&6; }
32155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32156$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32157    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32159$as_echo_n "checking for freetype libraries... " >&6; }
32160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32161$as_echo "$FREETYPE_LIB_PATH" >&6; }
32162  fi
32163
32164          if test "x$FOUND_FREETYPE" != xyes; then
32165            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32166
32167  windows_path="$FREETYPE_BASE_DIR"
32168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32169    unix_path=`$CYGPATH -u "$windows_path"`
32170    FREETYPE_BASE_DIR="$unix_path"
32171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32173    FREETYPE_BASE_DIR="$unix_path"
32174  fi
32175
32176
32177  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32178  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32179  METHOD="well-known location"
32180
32181  # First check if the files exists.
32182  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32183    # We found an arbitrary include file. That's a good sign.
32184    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32185$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32186    FOUND_FREETYPE=yes
32187
32188    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32189    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32190      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32191$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32192      FOUND_FREETYPE=no
32193    else
32194      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32195        # On Windows, we will need both .lib and .dll file.
32196        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32197          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32198$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32199          FOUND_FREETYPE=no
32200        fi
32201      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
32202        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32203        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32204      fi
32205    fi
32206  fi
32207
32208  if test "x$FOUND_FREETYPE" = xyes; then
32209
32210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32211
32212  # Input might be given as Windows format, start by converting to
32213  # unix format.
32214  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32215  new_path=`$CYGPATH -u "$path"`
32216
32217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32220  # "foo.exe" is OK but "foo" is an error.
32221  #
32222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32223  # It is also a way to make sure we got the proper file name for the real test later on.
32224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32225  if test "x$test_shortpath" = x; then
32226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32227$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32228    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32229  fi
32230
32231  # Call helper function which possibly converts this using DOS-style short mode.
32232  # If so, the updated path is stored in $new_path.
32233
32234  input_path="$new_path"
32235  # Check if we need to convert this using DOS-style short mode. If the path
32236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32237  # take no chances and rewrite it.
32238  # Note: m4 eats our [], so we need to use [ and ] instead.
32239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32240  if test "x$has_forbidden_chars" != x; then
32241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32245      # Going to short mode and back again did indeed matter. Since short mode is
32246      # case insensitive, let's make it lowercase to improve readability.
32247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32248      # Now convert it back to Unix-stile (cygpath)
32249      input_path=`$CYGPATH -u "$shortmode_path"`
32250      new_path="$input_path"
32251    fi
32252  fi
32253
32254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32255  if test "x$test_cygdrive_prefix" = x; then
32256    # As a simple fix, exclude /usr/bin since it's not a real path.
32257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32259      # a path prefixed by /cygdrive for fixpath to work.
32260      new_path="$CYGWIN_ROOT_PATH$input_path"
32261    fi
32262  fi
32263
32264
32265  if test "x$path" != "x$new_path"; then
32266    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32268$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32269  fi
32270
32271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32272
32273  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32274  has_colon=`$ECHO $path | $GREP ^.:`
32275  new_path="$path"
32276  if test "x$has_colon" = x; then
32277    # Not in mixed or Windows style, start by that.
32278    new_path=`cmd //c echo $path`
32279  fi
32280
32281
32282  input_path="$new_path"
32283  # Check if we need to convert this using DOS-style short mode. If the path
32284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32285  # take no chances and rewrite it.
32286  # Note: m4 eats our [], so we need to use [ and ] instead.
32287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32288  if test "x$has_forbidden_chars" != x; then
32289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32291  fi
32292
32293
32294  windows_path="$new_path"
32295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32296    unix_path=`$CYGPATH -u "$windows_path"`
32297    new_path="$unix_path"
32298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32300    new_path="$unix_path"
32301  fi
32302
32303  if test "x$path" != "x$new_path"; then
32304    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32306$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32307  fi
32308
32309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32311
32312  else
32313    # We're on a posix platform. Hooray! :)
32314    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32315    has_space=`$ECHO "$path" | $GREP " "`
32316    if test "x$has_space" != x; then
32317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32319      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32320    fi
32321
32322    # Use eval to expand a potential ~
32323    eval path="$path"
32324    if test ! -f "$path" && test ! -d "$path"; then
32325      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32326    fi
32327
32328    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32329  fi
32330
32331
32332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32333
32334  # Input might be given as Windows format, start by converting to
32335  # unix format.
32336  path="$POTENTIAL_FREETYPE_LIB_PATH"
32337  new_path=`$CYGPATH -u "$path"`
32338
32339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32342  # "foo.exe" is OK but "foo" is an error.
32343  #
32344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32345  # It is also a way to make sure we got the proper file name for the real test later on.
32346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32347  if test "x$test_shortpath" = x; then
32348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32349$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32350    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32351  fi
32352
32353  # Call helper function which possibly converts this using DOS-style short mode.
32354  # If so, the updated path is stored in $new_path.
32355
32356  input_path="$new_path"
32357  # Check if we need to convert this using DOS-style short mode. If the path
32358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32359  # take no chances and rewrite it.
32360  # Note: m4 eats our [], so we need to use [ and ] instead.
32361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32362  if test "x$has_forbidden_chars" != x; then
32363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32367      # Going to short mode and back again did indeed matter. Since short mode is
32368      # case insensitive, let's make it lowercase to improve readability.
32369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32370      # Now convert it back to Unix-stile (cygpath)
32371      input_path=`$CYGPATH -u "$shortmode_path"`
32372      new_path="$input_path"
32373    fi
32374  fi
32375
32376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32377  if test "x$test_cygdrive_prefix" = x; then
32378    # As a simple fix, exclude /usr/bin since it's not a real path.
32379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32381      # a path prefixed by /cygdrive for fixpath to work.
32382      new_path="$CYGWIN_ROOT_PATH$input_path"
32383    fi
32384  fi
32385
32386
32387  if test "x$path" != "x$new_path"; then
32388    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32390$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32391  fi
32392
32393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32394
32395  path="$POTENTIAL_FREETYPE_LIB_PATH"
32396  has_colon=`$ECHO $path | $GREP ^.:`
32397  new_path="$path"
32398  if test "x$has_colon" = x; then
32399    # Not in mixed or Windows style, start by that.
32400    new_path=`cmd //c echo $path`
32401  fi
32402
32403
32404  input_path="$new_path"
32405  # Check if we need to convert this using DOS-style short mode. If the path
32406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32407  # take no chances and rewrite it.
32408  # Note: m4 eats our [], so we need to use [ and ] instead.
32409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32410  if test "x$has_forbidden_chars" != x; then
32411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32413  fi
32414
32415
32416  windows_path="$new_path"
32417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32418    unix_path=`$CYGPATH -u "$windows_path"`
32419    new_path="$unix_path"
32420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32422    new_path="$unix_path"
32423  fi
32424
32425  if test "x$path" != "x$new_path"; then
32426    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32428$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32429  fi
32430
32431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32433
32434  else
32435    # We're on a posix platform. Hooray! :)
32436    path="$POTENTIAL_FREETYPE_LIB_PATH"
32437    has_space=`$ECHO "$path" | $GREP " "`
32438    if test "x$has_space" != x; then
32439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32440$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32441      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32442    fi
32443
32444    # Use eval to expand a potential ~
32445    eval path="$path"
32446    if test ! -f "$path" && test ! -d "$path"; then
32447      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32448    fi
32449
32450    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32451  fi
32452
32453
32454    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32456$as_echo_n "checking for freetype includes... " >&6; }
32457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32458$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32459    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32461$as_echo_n "checking for freetype libraries... " >&6; }
32462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32463$as_echo "$FREETYPE_LIB_PATH" >&6; }
32464  fi
32465
32466          fi
32467        else
32468          if test "x$SYS_ROOT" = "x/"; then
32469            FREETYPE_ROOT=
32470          else
32471            FREETYPE_ROOT="$SYS_ROOT"
32472          fi
32473          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32474
32475  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32476  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32477  METHOD="well-known location"
32478
32479  # First check if the files exists.
32480  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32481    # We found an arbitrary include file. That's a good sign.
32482    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32483$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32484    FOUND_FREETYPE=yes
32485
32486    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32487    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32488      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32489$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32490      FOUND_FREETYPE=no
32491    else
32492      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32493        # On Windows, we will need both .lib and .dll file.
32494        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32495          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32496$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32497          FOUND_FREETYPE=no
32498        fi
32499      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
32500        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32501        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32502      fi
32503    fi
32504  fi
32505
32506  if test "x$FOUND_FREETYPE" = xyes; then
32507
32508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32509
32510  # Input might be given as Windows format, start by converting to
32511  # unix format.
32512  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32513  new_path=`$CYGPATH -u "$path"`
32514
32515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32518  # "foo.exe" is OK but "foo" is an error.
32519  #
32520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32521  # It is also a way to make sure we got the proper file name for the real test later on.
32522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32523  if test "x$test_shortpath" = x; then
32524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32526    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32527  fi
32528
32529  # Call helper function which possibly converts this using DOS-style short mode.
32530  # If so, the updated path is stored in $new_path.
32531
32532  input_path="$new_path"
32533  # Check if we need to convert this using DOS-style short mode. If the path
32534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32535  # take no chances and rewrite it.
32536  # Note: m4 eats our [], so we need to use [ and ] instead.
32537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32538  if test "x$has_forbidden_chars" != x; then
32539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32543      # Going to short mode and back again did indeed matter. Since short mode is
32544      # case insensitive, let's make it lowercase to improve readability.
32545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32546      # Now convert it back to Unix-stile (cygpath)
32547      input_path=`$CYGPATH -u "$shortmode_path"`
32548      new_path="$input_path"
32549    fi
32550  fi
32551
32552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32553  if test "x$test_cygdrive_prefix" = x; then
32554    # As a simple fix, exclude /usr/bin since it's not a real path.
32555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32557      # a path prefixed by /cygdrive for fixpath to work.
32558      new_path="$CYGWIN_ROOT_PATH$input_path"
32559    fi
32560  fi
32561
32562
32563  if test "x$path" != "x$new_path"; then
32564    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32567  fi
32568
32569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32570
32571  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32572  has_colon=`$ECHO $path | $GREP ^.:`
32573  new_path="$path"
32574  if test "x$has_colon" = x; then
32575    # Not in mixed or Windows style, start by that.
32576    new_path=`cmd //c echo $path`
32577  fi
32578
32579
32580  input_path="$new_path"
32581  # Check if we need to convert this using DOS-style short mode. If the path
32582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32583  # take no chances and rewrite it.
32584  # Note: m4 eats our [], so we need to use [ and ] instead.
32585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32586  if test "x$has_forbidden_chars" != x; then
32587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32589  fi
32590
32591
32592  windows_path="$new_path"
32593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32594    unix_path=`$CYGPATH -u "$windows_path"`
32595    new_path="$unix_path"
32596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32598    new_path="$unix_path"
32599  fi
32600
32601  if test "x$path" != "x$new_path"; then
32602    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32604$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32605  fi
32606
32607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32609
32610  else
32611    # We're on a posix platform. Hooray! :)
32612    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32613    has_space=`$ECHO "$path" | $GREP " "`
32614    if test "x$has_space" != x; then
32615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32617      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32618    fi
32619
32620    # Use eval to expand a potential ~
32621    eval path="$path"
32622    if test ! -f "$path" && test ! -d "$path"; then
32623      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32624    fi
32625
32626    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32627  fi
32628
32629
32630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32631
32632  # Input might be given as Windows format, start by converting to
32633  # unix format.
32634  path="$POTENTIAL_FREETYPE_LIB_PATH"
32635  new_path=`$CYGPATH -u "$path"`
32636
32637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32640  # "foo.exe" is OK but "foo" is an error.
32641  #
32642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32643  # It is also a way to make sure we got the proper file name for the real test later on.
32644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32645  if test "x$test_shortpath" = x; then
32646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32647$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32648    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32649  fi
32650
32651  # Call helper function which possibly converts this using DOS-style short mode.
32652  # If so, the updated path is stored in $new_path.
32653
32654  input_path="$new_path"
32655  # Check if we need to convert this using DOS-style short mode. If the path
32656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32657  # take no chances and rewrite it.
32658  # Note: m4 eats our [], so we need to use [ and ] instead.
32659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32660  if test "x$has_forbidden_chars" != x; then
32661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32665      # Going to short mode and back again did indeed matter. Since short mode is
32666      # case insensitive, let's make it lowercase to improve readability.
32667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32668      # Now convert it back to Unix-stile (cygpath)
32669      input_path=`$CYGPATH -u "$shortmode_path"`
32670      new_path="$input_path"
32671    fi
32672  fi
32673
32674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32675  if test "x$test_cygdrive_prefix" = x; then
32676    # As a simple fix, exclude /usr/bin since it's not a real path.
32677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32679      # a path prefixed by /cygdrive for fixpath to work.
32680      new_path="$CYGWIN_ROOT_PATH$input_path"
32681    fi
32682  fi
32683
32684
32685  if test "x$path" != "x$new_path"; then
32686    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32688$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32689  fi
32690
32691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32692
32693  path="$POTENTIAL_FREETYPE_LIB_PATH"
32694  has_colon=`$ECHO $path | $GREP ^.:`
32695  new_path="$path"
32696  if test "x$has_colon" = x; then
32697    # Not in mixed or Windows style, start by that.
32698    new_path=`cmd //c echo $path`
32699  fi
32700
32701
32702  input_path="$new_path"
32703  # Check if we need to convert this using DOS-style short mode. If the path
32704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32705  # take no chances and rewrite it.
32706  # Note: m4 eats our [], so we need to use [ and ] instead.
32707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32708  if test "x$has_forbidden_chars" != x; then
32709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32711  fi
32712
32713
32714  windows_path="$new_path"
32715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32716    unix_path=`$CYGPATH -u "$windows_path"`
32717    new_path="$unix_path"
32718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32720    new_path="$unix_path"
32721  fi
32722
32723  if test "x$path" != "x$new_path"; then
32724    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32726$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32727  fi
32728
32729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32731
32732  else
32733    # We're on a posix platform. Hooray! :)
32734    path="$POTENTIAL_FREETYPE_LIB_PATH"
32735    has_space=`$ECHO "$path" | $GREP " "`
32736    if test "x$has_space" != x; then
32737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32738$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32739      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32740    fi
32741
32742    # Use eval to expand a potential ~
32743    eval path="$path"
32744    if test ! -f "$path" && test ! -d "$path"; then
32745      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32746    fi
32747
32748    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32749  fi
32750
32751
32752    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32754$as_echo_n "checking for freetype includes... " >&6; }
32755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32756$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32757    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32759$as_echo_n "checking for freetype libraries... " >&6; }
32760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32761$as_echo "$FREETYPE_LIB_PATH" >&6; }
32762  fi
32763
32764
32765          if test "x$FOUND_FREETYPE" != xyes; then
32766            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32767
32768  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32769  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32770  METHOD="well-known location"
32771
32772  # First check if the files exists.
32773  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32774    # We found an arbitrary include file. That's a good sign.
32775    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32776$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32777    FOUND_FREETYPE=yes
32778
32779    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32780    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32781      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32782$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32783      FOUND_FREETYPE=no
32784    else
32785      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32786        # On Windows, we will need both .lib and .dll file.
32787        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32788          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32789$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32790          FOUND_FREETYPE=no
32791        fi
32792      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
32793        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32794        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32795      fi
32796    fi
32797  fi
32798
32799  if test "x$FOUND_FREETYPE" = xyes; then
32800
32801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32802
32803  # Input might be given as Windows format, start by converting to
32804  # unix format.
32805  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32806  new_path=`$CYGPATH -u "$path"`
32807
32808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32811  # "foo.exe" is OK but "foo" is an error.
32812  #
32813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32814  # It is also a way to make sure we got the proper file name for the real test later on.
32815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32816  if test "x$test_shortpath" = x; then
32817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32818$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32819    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32820  fi
32821
32822  # Call helper function which possibly converts this using DOS-style short mode.
32823  # If so, the updated path is stored in $new_path.
32824
32825  input_path="$new_path"
32826  # Check if we need to convert this using DOS-style short mode. If the path
32827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32828  # take no chances and rewrite it.
32829  # Note: m4 eats our [], so we need to use [ and ] instead.
32830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32831  if test "x$has_forbidden_chars" != x; then
32832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32836      # Going to short mode and back again did indeed matter. Since short mode is
32837      # case insensitive, let's make it lowercase to improve readability.
32838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32839      # Now convert it back to Unix-stile (cygpath)
32840      input_path=`$CYGPATH -u "$shortmode_path"`
32841      new_path="$input_path"
32842    fi
32843  fi
32844
32845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32846  if test "x$test_cygdrive_prefix" = x; then
32847    # As a simple fix, exclude /usr/bin since it's not a real path.
32848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32850      # a path prefixed by /cygdrive for fixpath to work.
32851      new_path="$CYGWIN_ROOT_PATH$input_path"
32852    fi
32853  fi
32854
32855
32856  if test "x$path" != "x$new_path"; then
32857    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32859$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32860  fi
32861
32862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32863
32864  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32865  has_colon=`$ECHO $path | $GREP ^.:`
32866  new_path="$path"
32867  if test "x$has_colon" = x; then
32868    # Not in mixed or Windows style, start by that.
32869    new_path=`cmd //c echo $path`
32870  fi
32871
32872
32873  input_path="$new_path"
32874  # Check if we need to convert this using DOS-style short mode. If the path
32875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32876  # take no chances and rewrite it.
32877  # Note: m4 eats our [], so we need to use [ and ] instead.
32878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32879  if test "x$has_forbidden_chars" != x; then
32880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32882  fi
32883
32884
32885  windows_path="$new_path"
32886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32887    unix_path=`$CYGPATH -u "$windows_path"`
32888    new_path="$unix_path"
32889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32891    new_path="$unix_path"
32892  fi
32893
32894  if test "x$path" != "x$new_path"; then
32895    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32898  fi
32899
32900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32902
32903  else
32904    # We're on a posix platform. Hooray! :)
32905    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32906    has_space=`$ECHO "$path" | $GREP " "`
32907    if test "x$has_space" != x; then
32908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32910      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32911    fi
32912
32913    # Use eval to expand a potential ~
32914    eval path="$path"
32915    if test ! -f "$path" && test ! -d "$path"; then
32916      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32917    fi
32918
32919    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32920  fi
32921
32922
32923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32924
32925  # Input might be given as Windows format, start by converting to
32926  # unix format.
32927  path="$POTENTIAL_FREETYPE_LIB_PATH"
32928  new_path=`$CYGPATH -u "$path"`
32929
32930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32933  # "foo.exe" is OK but "foo" is an error.
32934  #
32935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32936  # It is also a way to make sure we got the proper file name for the real test later on.
32937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32938  if test "x$test_shortpath" = x; then
32939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32941    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32942  fi
32943
32944  # Call helper function which possibly converts this using DOS-style short mode.
32945  # If so, the updated path is stored in $new_path.
32946
32947  input_path="$new_path"
32948  # Check if we need to convert this using DOS-style short mode. If the path
32949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32950  # take no chances and rewrite it.
32951  # Note: m4 eats our [], so we need to use [ and ] instead.
32952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32953  if test "x$has_forbidden_chars" != x; then
32954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32958      # Going to short mode and back again did indeed matter. Since short mode is
32959      # case insensitive, let's make it lowercase to improve readability.
32960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32961      # Now convert it back to Unix-stile (cygpath)
32962      input_path=`$CYGPATH -u "$shortmode_path"`
32963      new_path="$input_path"
32964    fi
32965  fi
32966
32967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32968  if test "x$test_cygdrive_prefix" = x; then
32969    # As a simple fix, exclude /usr/bin since it's not a real path.
32970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32972      # a path prefixed by /cygdrive for fixpath to work.
32973      new_path="$CYGWIN_ROOT_PATH$input_path"
32974    fi
32975  fi
32976
32977
32978  if test "x$path" != "x$new_path"; then
32979    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32982  fi
32983
32984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32985
32986  path="$POTENTIAL_FREETYPE_LIB_PATH"
32987  has_colon=`$ECHO $path | $GREP ^.:`
32988  new_path="$path"
32989  if test "x$has_colon" = x; then
32990    # Not in mixed or Windows style, start by that.
32991    new_path=`cmd //c echo $path`
32992  fi
32993
32994
32995  input_path="$new_path"
32996  # Check if we need to convert this using DOS-style short mode. If the path
32997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32998  # take no chances and rewrite it.
32999  # Note: m4 eats our [], so we need to use [ and ] instead.
33000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33001  if test "x$has_forbidden_chars" != x; then
33002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33004  fi
33005
33006
33007  windows_path="$new_path"
33008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33009    unix_path=`$CYGPATH -u "$windows_path"`
33010    new_path="$unix_path"
33011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33013    new_path="$unix_path"
33014  fi
33015
33016  if test "x$path" != "x$new_path"; then
33017    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33019$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33020  fi
33021
33022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33024
33025  else
33026    # We're on a posix platform. Hooray! :)
33027    path="$POTENTIAL_FREETYPE_LIB_PATH"
33028    has_space=`$ECHO "$path" | $GREP " "`
33029    if test "x$has_space" != x; then
33030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33032      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33033    fi
33034
33035    # Use eval to expand a potential ~
33036    eval path="$path"
33037    if test ! -f "$path" && test ! -d "$path"; then
33038      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33039    fi
33040
33041    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33042  fi
33043
33044
33045    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33047$as_echo_n "checking for freetype includes... " >&6; }
33048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33049$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33050    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33052$as_echo_n "checking for freetype libraries... " >&6; }
33053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33054$as_echo "$FREETYPE_LIB_PATH" >&6; }
33055  fi
33056
33057          fi
33058
33059          if test "x$FOUND_FREETYPE" != xyes; then
33060            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33061            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33062
33063  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33064  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33065  METHOD="well-known location"
33066
33067  # First check if the files exists.
33068  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33069    # We found an arbitrary include file. That's a good sign.
33070    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33071$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33072    FOUND_FREETYPE=yes
33073
33074    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33075    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33076      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33077$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33078      FOUND_FREETYPE=no
33079    else
33080      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33081        # On Windows, we will need both .lib and .dll file.
33082        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33083          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33084$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33085          FOUND_FREETYPE=no
33086        fi
33087      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
33088        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33089        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33090      fi
33091    fi
33092  fi
33093
33094  if test "x$FOUND_FREETYPE" = xyes; then
33095
33096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33097
33098  # Input might be given as Windows format, start by converting to
33099  # unix format.
33100  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33101  new_path=`$CYGPATH -u "$path"`
33102
33103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33106  # "foo.exe" is OK but "foo" is an error.
33107  #
33108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33109  # It is also a way to make sure we got the proper file name for the real test later on.
33110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33111  if test "x$test_shortpath" = x; then
33112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33113$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33114    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33115  fi
33116
33117  # Call helper function which possibly converts this using DOS-style short mode.
33118  # If so, the updated path is stored in $new_path.
33119
33120  input_path="$new_path"
33121  # Check if we need to convert this using DOS-style short mode. If the path
33122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33123  # take no chances and rewrite it.
33124  # Note: m4 eats our [], so we need to use [ and ] instead.
33125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33126  if test "x$has_forbidden_chars" != x; then
33127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33131      # Going to short mode and back again did indeed matter. Since short mode is
33132      # case insensitive, let's make it lowercase to improve readability.
33133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33134      # Now convert it back to Unix-stile (cygpath)
33135      input_path=`$CYGPATH -u "$shortmode_path"`
33136      new_path="$input_path"
33137    fi
33138  fi
33139
33140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33141  if test "x$test_cygdrive_prefix" = x; then
33142    # As a simple fix, exclude /usr/bin since it's not a real path.
33143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33145      # a path prefixed by /cygdrive for fixpath to work.
33146      new_path="$CYGWIN_ROOT_PATH$input_path"
33147    fi
33148  fi
33149
33150
33151  if test "x$path" != "x$new_path"; then
33152    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33154$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33155  fi
33156
33157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33158
33159  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33160  has_colon=`$ECHO $path | $GREP ^.:`
33161  new_path="$path"
33162  if test "x$has_colon" = x; then
33163    # Not in mixed or Windows style, start by that.
33164    new_path=`cmd //c echo $path`
33165  fi
33166
33167
33168  input_path="$new_path"
33169  # Check if we need to convert this using DOS-style short mode. If the path
33170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33171  # take no chances and rewrite it.
33172  # Note: m4 eats our [], so we need to use [ and ] instead.
33173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33174  if test "x$has_forbidden_chars" != x; then
33175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33177  fi
33178
33179
33180  windows_path="$new_path"
33181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33182    unix_path=`$CYGPATH -u "$windows_path"`
33183    new_path="$unix_path"
33184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33186    new_path="$unix_path"
33187  fi
33188
33189  if test "x$path" != "x$new_path"; then
33190    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33192$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33193  fi
33194
33195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33197
33198  else
33199    # We're on a posix platform. Hooray! :)
33200    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33201    has_space=`$ECHO "$path" | $GREP " "`
33202    if test "x$has_space" != x; then
33203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33205      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33206    fi
33207
33208    # Use eval to expand a potential ~
33209    eval path="$path"
33210    if test ! -f "$path" && test ! -d "$path"; then
33211      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33212    fi
33213
33214    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33215  fi
33216
33217
33218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33219
33220  # Input might be given as Windows format, start by converting to
33221  # unix format.
33222  path="$POTENTIAL_FREETYPE_LIB_PATH"
33223  new_path=`$CYGPATH -u "$path"`
33224
33225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33228  # "foo.exe" is OK but "foo" is an error.
33229  #
33230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33231  # It is also a way to make sure we got the proper file name for the real test later on.
33232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33233  if test "x$test_shortpath" = x; then
33234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33235$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33236    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33237  fi
33238
33239  # Call helper function which possibly converts this using DOS-style short mode.
33240  # If so, the updated path is stored in $new_path.
33241
33242  input_path="$new_path"
33243  # Check if we need to convert this using DOS-style short mode. If the path
33244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33245  # take no chances and rewrite it.
33246  # Note: m4 eats our [], so we need to use [ and ] instead.
33247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33248  if test "x$has_forbidden_chars" != x; then
33249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33253      # Going to short mode and back again did indeed matter. Since short mode is
33254      # case insensitive, let's make it lowercase to improve readability.
33255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33256      # Now convert it back to Unix-stile (cygpath)
33257      input_path=`$CYGPATH -u "$shortmode_path"`
33258      new_path="$input_path"
33259    fi
33260  fi
33261
33262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33263  if test "x$test_cygdrive_prefix" = x; then
33264    # As a simple fix, exclude /usr/bin since it's not a real path.
33265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33267      # a path prefixed by /cygdrive for fixpath to work.
33268      new_path="$CYGWIN_ROOT_PATH$input_path"
33269    fi
33270  fi
33271
33272
33273  if test "x$path" != "x$new_path"; then
33274    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33277  fi
33278
33279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33280
33281  path="$POTENTIAL_FREETYPE_LIB_PATH"
33282  has_colon=`$ECHO $path | $GREP ^.:`
33283  new_path="$path"
33284  if test "x$has_colon" = x; then
33285    # Not in mixed or Windows style, start by that.
33286    new_path=`cmd //c echo $path`
33287  fi
33288
33289
33290  input_path="$new_path"
33291  # Check if we need to convert this using DOS-style short mode. If the path
33292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33293  # take no chances and rewrite it.
33294  # Note: m4 eats our [], so we need to use [ and ] instead.
33295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33296  if test "x$has_forbidden_chars" != x; then
33297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33299  fi
33300
33301
33302  windows_path="$new_path"
33303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33304    unix_path=`$CYGPATH -u "$windows_path"`
33305    new_path="$unix_path"
33306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33308    new_path="$unix_path"
33309  fi
33310
33311  if test "x$path" != "x$new_path"; then
33312    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33314$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33315  fi
33316
33317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33319
33320  else
33321    # We're on a posix platform. Hooray! :)
33322    path="$POTENTIAL_FREETYPE_LIB_PATH"
33323    has_space=`$ECHO "$path" | $GREP " "`
33324    if test "x$has_space" != x; then
33325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33326$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33327      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33328    fi
33329
33330    # Use eval to expand a potential ~
33331    eval path="$path"
33332    if test ! -f "$path" && test ! -d "$path"; then
33333      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33334    fi
33335
33336    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33337  fi
33338
33339
33340    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33342$as_echo_n "checking for freetype includes... " >&6; }
33343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33344$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33345    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33347$as_echo_n "checking for freetype libraries... " >&6; }
33348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33349$as_echo "$FREETYPE_LIB_PATH" >&6; }
33350  fi
33351
33352            else
33353
33354  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33355  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33356  METHOD="well-known location"
33357
33358  # First check if the files exists.
33359  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33360    # We found an arbitrary include file. That's a good sign.
33361    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33362$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33363    FOUND_FREETYPE=yes
33364
33365    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33366    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33367      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33368$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33369      FOUND_FREETYPE=no
33370    else
33371      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33372        # On Windows, we will need both .lib and .dll file.
33373        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33374          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33375$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33376          FOUND_FREETYPE=no
33377        fi
33378      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
33379        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33380        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33381      fi
33382    fi
33383  fi
33384
33385  if test "x$FOUND_FREETYPE" = xyes; then
33386
33387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33388
33389  # Input might be given as Windows format, start by converting to
33390  # unix format.
33391  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33392  new_path=`$CYGPATH -u "$path"`
33393
33394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33397  # "foo.exe" is OK but "foo" is an error.
33398  #
33399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33400  # It is also a way to make sure we got the proper file name for the real test later on.
33401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33402  if test "x$test_shortpath" = x; then
33403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33404$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33405    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33406  fi
33407
33408  # Call helper function which possibly converts this using DOS-style short mode.
33409  # If so, the updated path is stored in $new_path.
33410
33411  input_path="$new_path"
33412  # Check if we need to convert this using DOS-style short mode. If the path
33413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33414  # take no chances and rewrite it.
33415  # Note: m4 eats our [], so we need to use [ and ] instead.
33416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33417  if test "x$has_forbidden_chars" != x; then
33418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33422      # Going to short mode and back again did indeed matter. Since short mode is
33423      # case insensitive, let's make it lowercase to improve readability.
33424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33425      # Now convert it back to Unix-stile (cygpath)
33426      input_path=`$CYGPATH -u "$shortmode_path"`
33427      new_path="$input_path"
33428    fi
33429  fi
33430
33431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33432  if test "x$test_cygdrive_prefix" = x; then
33433    # As a simple fix, exclude /usr/bin since it's not a real path.
33434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33436      # a path prefixed by /cygdrive for fixpath to work.
33437      new_path="$CYGWIN_ROOT_PATH$input_path"
33438    fi
33439  fi
33440
33441
33442  if test "x$path" != "x$new_path"; then
33443    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33445$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33446  fi
33447
33448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33449
33450  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33451  has_colon=`$ECHO $path | $GREP ^.:`
33452  new_path="$path"
33453  if test "x$has_colon" = x; then
33454    # Not in mixed or Windows style, start by that.
33455    new_path=`cmd //c echo $path`
33456  fi
33457
33458
33459  input_path="$new_path"
33460  # Check if we need to convert this using DOS-style short mode. If the path
33461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33462  # take no chances and rewrite it.
33463  # Note: m4 eats our [], so we need to use [ and ] instead.
33464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33465  if test "x$has_forbidden_chars" != x; then
33466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33468  fi
33469
33470
33471  windows_path="$new_path"
33472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33473    unix_path=`$CYGPATH -u "$windows_path"`
33474    new_path="$unix_path"
33475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33477    new_path="$unix_path"
33478  fi
33479
33480  if test "x$path" != "x$new_path"; then
33481    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33483$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33484  fi
33485
33486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33488
33489  else
33490    # We're on a posix platform. Hooray! :)
33491    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33492    has_space=`$ECHO "$path" | $GREP " "`
33493    if test "x$has_space" != x; then
33494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33495$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33496      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33497    fi
33498
33499    # Use eval to expand a potential ~
33500    eval path="$path"
33501    if test ! -f "$path" && test ! -d "$path"; then
33502      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33503    fi
33504
33505    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33506  fi
33507
33508
33509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33510
33511  # Input might be given as Windows format, start by converting to
33512  # unix format.
33513  path="$POTENTIAL_FREETYPE_LIB_PATH"
33514  new_path=`$CYGPATH -u "$path"`
33515
33516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33519  # "foo.exe" is OK but "foo" is an error.
33520  #
33521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33522  # It is also a way to make sure we got the proper file name for the real test later on.
33523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33524  if test "x$test_shortpath" = x; then
33525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33526$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33527    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33528  fi
33529
33530  # Call helper function which possibly converts this using DOS-style short mode.
33531  # If so, the updated path is stored in $new_path.
33532
33533  input_path="$new_path"
33534  # Check if we need to convert this using DOS-style short mode. If the path
33535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33536  # take no chances and rewrite it.
33537  # Note: m4 eats our [], so we need to use [ and ] instead.
33538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33539  if test "x$has_forbidden_chars" != x; then
33540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33544      # Going to short mode and back again did indeed matter. Since short mode is
33545      # case insensitive, let's make it lowercase to improve readability.
33546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33547      # Now convert it back to Unix-stile (cygpath)
33548      input_path=`$CYGPATH -u "$shortmode_path"`
33549      new_path="$input_path"
33550    fi
33551  fi
33552
33553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33554  if test "x$test_cygdrive_prefix" = x; then
33555    # As a simple fix, exclude /usr/bin since it's not a real path.
33556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33558      # a path prefixed by /cygdrive for fixpath to work.
33559      new_path="$CYGWIN_ROOT_PATH$input_path"
33560    fi
33561  fi
33562
33563
33564  if test "x$path" != "x$new_path"; then
33565    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33568  fi
33569
33570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33571
33572  path="$POTENTIAL_FREETYPE_LIB_PATH"
33573  has_colon=`$ECHO $path | $GREP ^.:`
33574  new_path="$path"
33575  if test "x$has_colon" = x; then
33576    # Not in mixed or Windows style, start by that.
33577    new_path=`cmd //c echo $path`
33578  fi
33579
33580
33581  input_path="$new_path"
33582  # Check if we need to convert this using DOS-style short mode. If the path
33583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33584  # take no chances and rewrite it.
33585  # Note: m4 eats our [], so we need to use [ and ] instead.
33586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33587  if test "x$has_forbidden_chars" != x; then
33588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33590  fi
33591
33592
33593  windows_path="$new_path"
33594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33595    unix_path=`$CYGPATH -u "$windows_path"`
33596    new_path="$unix_path"
33597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33599    new_path="$unix_path"
33600  fi
33601
33602  if test "x$path" != "x$new_path"; then
33603    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33606  fi
33607
33608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33610
33611  else
33612    # We're on a posix platform. Hooray! :)
33613    path="$POTENTIAL_FREETYPE_LIB_PATH"
33614    has_space=`$ECHO "$path" | $GREP " "`
33615    if test "x$has_space" != x; then
33616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33618      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33619    fi
33620
33621    # Use eval to expand a potential ~
33622    eval path="$path"
33623    if test ! -f "$path" && test ! -d "$path"; then
33624      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33625    fi
33626
33627    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33628  fi
33629
33630
33631    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33633$as_echo_n "checking for freetype includes... " >&6; }
33634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33635$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33636    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33638$as_echo_n "checking for freetype libraries... " >&6; }
33639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33640$as_echo "$FREETYPE_LIB_PATH" >&6; }
33641  fi
33642
33643              if test "x$FOUND_FREETYPE" != xyes; then
33644
33645  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33646  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33647  METHOD="well-known location"
33648
33649  # First check if the files exists.
33650  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33651    # We found an arbitrary include file. That's a good sign.
33652    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33653$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33654    FOUND_FREETYPE=yes
33655
33656    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33657    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33658      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33659$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33660      FOUND_FREETYPE=no
33661    else
33662      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33663        # On Windows, we will need both .lib and .dll file.
33664        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33665          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33666$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33667          FOUND_FREETYPE=no
33668        fi
33669      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
33670        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33671        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33672      fi
33673    fi
33674  fi
33675
33676  if test "x$FOUND_FREETYPE" = xyes; then
33677
33678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33679
33680  # Input might be given as Windows format, start by converting to
33681  # unix format.
33682  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33683  new_path=`$CYGPATH -u "$path"`
33684
33685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33688  # "foo.exe" is OK but "foo" is an error.
33689  #
33690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33691  # It is also a way to make sure we got the proper file name for the real test later on.
33692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33693  if test "x$test_shortpath" = x; then
33694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33696    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33697  fi
33698
33699  # Call helper function which possibly converts this using DOS-style short mode.
33700  # If so, the updated path is stored in $new_path.
33701
33702  input_path="$new_path"
33703  # Check if we need to convert this using DOS-style short mode. If the path
33704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33705  # take no chances and rewrite it.
33706  # Note: m4 eats our [], so we need to use [ and ] instead.
33707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33708  if test "x$has_forbidden_chars" != x; then
33709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33713      # Going to short mode and back again did indeed matter. Since short mode is
33714      # case insensitive, let's make it lowercase to improve readability.
33715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33716      # Now convert it back to Unix-stile (cygpath)
33717      input_path=`$CYGPATH -u "$shortmode_path"`
33718      new_path="$input_path"
33719    fi
33720  fi
33721
33722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33723  if test "x$test_cygdrive_prefix" = x; then
33724    # As a simple fix, exclude /usr/bin since it's not a real path.
33725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33727      # a path prefixed by /cygdrive for fixpath to work.
33728      new_path="$CYGWIN_ROOT_PATH$input_path"
33729    fi
33730  fi
33731
33732
33733  if test "x$path" != "x$new_path"; then
33734    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33736$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33737  fi
33738
33739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33740
33741  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33742  has_colon=`$ECHO $path | $GREP ^.:`
33743  new_path="$path"
33744  if test "x$has_colon" = x; then
33745    # Not in mixed or Windows style, start by that.
33746    new_path=`cmd //c echo $path`
33747  fi
33748
33749
33750  input_path="$new_path"
33751  # Check if we need to convert this using DOS-style short mode. If the path
33752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33753  # take no chances and rewrite it.
33754  # Note: m4 eats our [], so we need to use [ and ] instead.
33755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33756  if test "x$has_forbidden_chars" != x; then
33757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33759  fi
33760
33761
33762  windows_path="$new_path"
33763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33764    unix_path=`$CYGPATH -u "$windows_path"`
33765    new_path="$unix_path"
33766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33768    new_path="$unix_path"
33769  fi
33770
33771  if test "x$path" != "x$new_path"; then
33772    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33774$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33775  fi
33776
33777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33779
33780  else
33781    # We're on a posix platform. Hooray! :)
33782    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33783    has_space=`$ECHO "$path" | $GREP " "`
33784    if test "x$has_space" != x; then
33785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33786$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33787      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33788    fi
33789
33790    # Use eval to expand a potential ~
33791    eval path="$path"
33792    if test ! -f "$path" && test ! -d "$path"; then
33793      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33794    fi
33795
33796    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33797  fi
33798
33799
33800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33801
33802  # Input might be given as Windows format, start by converting to
33803  # unix format.
33804  path="$POTENTIAL_FREETYPE_LIB_PATH"
33805  new_path=`$CYGPATH -u "$path"`
33806
33807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33810  # "foo.exe" is OK but "foo" is an error.
33811  #
33812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33813  # It is also a way to make sure we got the proper file name for the real test later on.
33814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33815  if test "x$test_shortpath" = x; then
33816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33818    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33819  fi
33820
33821  # Call helper function which possibly converts this using DOS-style short mode.
33822  # If so, the updated path is stored in $new_path.
33823
33824  input_path="$new_path"
33825  # Check if we need to convert this using DOS-style short mode. If the path
33826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33827  # take no chances and rewrite it.
33828  # Note: m4 eats our [], so we need to use [ and ] instead.
33829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33830  if test "x$has_forbidden_chars" != x; then
33831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33835      # Going to short mode and back again did indeed matter. Since short mode is
33836      # case insensitive, let's make it lowercase to improve readability.
33837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33838      # Now convert it back to Unix-stile (cygpath)
33839      input_path=`$CYGPATH -u "$shortmode_path"`
33840      new_path="$input_path"
33841    fi
33842  fi
33843
33844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33845  if test "x$test_cygdrive_prefix" = x; then
33846    # As a simple fix, exclude /usr/bin since it's not a real path.
33847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33849      # a path prefixed by /cygdrive for fixpath to work.
33850      new_path="$CYGWIN_ROOT_PATH$input_path"
33851    fi
33852  fi
33853
33854
33855  if test "x$path" != "x$new_path"; then
33856    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33858$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33859  fi
33860
33861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33862
33863  path="$POTENTIAL_FREETYPE_LIB_PATH"
33864  has_colon=`$ECHO $path | $GREP ^.:`
33865  new_path="$path"
33866  if test "x$has_colon" = x; then
33867    # Not in mixed or Windows style, start by that.
33868    new_path=`cmd //c echo $path`
33869  fi
33870
33871
33872  input_path="$new_path"
33873  # Check if we need to convert this using DOS-style short mode. If the path
33874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33875  # take no chances and rewrite it.
33876  # Note: m4 eats our [], so we need to use [ and ] instead.
33877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33878  if test "x$has_forbidden_chars" != x; then
33879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33881  fi
33882
33883
33884  windows_path="$new_path"
33885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33886    unix_path=`$CYGPATH -u "$windows_path"`
33887    new_path="$unix_path"
33888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33890    new_path="$unix_path"
33891  fi
33892
33893  if test "x$path" != "x$new_path"; then
33894    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33896$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33897  fi
33898
33899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33901
33902  else
33903    # We're on a posix platform. Hooray! :)
33904    path="$POTENTIAL_FREETYPE_LIB_PATH"
33905    has_space=`$ECHO "$path" | $GREP " "`
33906    if test "x$has_space" != x; then
33907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33908$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33909      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33910    fi
33911
33912    # Use eval to expand a potential ~
33913    eval path="$path"
33914    if test ! -f "$path" && test ! -d "$path"; then
33915      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33916    fi
33917
33918    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33919  fi
33920
33921
33922    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33924$as_echo_n "checking for freetype includes... " >&6; }
33925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33926$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33927    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33929$as_echo_n "checking for freetype libraries... " >&6; }
33930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33931$as_echo "$FREETYPE_LIB_PATH" >&6; }
33932  fi
33933
33934              fi
33935            fi
33936          fi
33937        fi
33938      fi # end check in well-known locations
33939
33940      if test "x$FOUND_FREETYPE" != xyes; then
33941
33942  # Print a helpful message on how to acquire the necessary build dependency.
33943  # freetype is the help tag: freetype, cups, pulse, alsa etc
33944  MISSING_DEPENDENCY=freetype
33945
33946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33947    cygwin_help $MISSING_DEPENDENCY
33948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33949    msys_help $MISSING_DEPENDENCY
33950  else
33951    PKGHANDLER_COMMAND=
33952
33953    case $PKGHANDLER in
33954      apt-get)
33955        apt_help     $MISSING_DEPENDENCY ;;
33956      yum)
33957        yum_help     $MISSING_DEPENDENCY ;;
33958      port)
33959        port_help    $MISSING_DEPENDENCY ;;
33960      pkgutil)
33961        pkgutil_help $MISSING_DEPENDENCY ;;
33962      pkgadd)
33963        pkgadd_help  $MISSING_DEPENDENCY ;;
33964      * )
33965        break ;;
33966    esac
33967
33968    if test "x$PKGHANDLER_COMMAND" != x; then
33969      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33970    fi
33971  fi
33972
33973        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
33974      fi
33975    fi # end user specified settings
33976
33977    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
33978    if test "x$FREETYPE_CFLAGS" = x; then
33979
33980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33981
33982  # Input might be given as Windows format, start by converting to
33983  # unix format.
33984  path="$FREETYPE_INCLUDE_PATH"
33985  new_path=`$CYGPATH -u "$path"`
33986
33987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33990  # "foo.exe" is OK but "foo" is an error.
33991  #
33992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33993  # It is also a way to make sure we got the proper file name for the real test later on.
33994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33995  if test "x$test_shortpath" = x; then
33996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33997$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33998    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
33999  fi
34000
34001  # Call helper function which possibly converts this using DOS-style short mode.
34002  # If so, the updated path is stored in $new_path.
34003
34004  input_path="$new_path"
34005  # Check if we need to convert this using DOS-style short mode. If the path
34006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34007  # take no chances and rewrite it.
34008  # Note: m4 eats our [], so we need to use [ and ] instead.
34009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34010  if test "x$has_forbidden_chars" != x; then
34011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34015      # Going to short mode and back again did indeed matter. Since short mode is
34016      # case insensitive, let's make it lowercase to improve readability.
34017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34018      # Now convert it back to Unix-stile (cygpath)
34019      input_path=`$CYGPATH -u "$shortmode_path"`
34020      new_path="$input_path"
34021    fi
34022  fi
34023
34024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34025  if test "x$test_cygdrive_prefix" = x; then
34026    # As a simple fix, exclude /usr/bin since it's not a real path.
34027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34029      # a path prefixed by /cygdrive for fixpath to work.
34030      new_path="$CYGWIN_ROOT_PATH$input_path"
34031    fi
34032  fi
34033
34034
34035  if test "x$path" != "x$new_path"; then
34036    FREETYPE_INCLUDE_PATH="$new_path"
34037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34038$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34039  fi
34040
34041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34042
34043  path="$FREETYPE_INCLUDE_PATH"
34044  has_colon=`$ECHO $path | $GREP ^.:`
34045  new_path="$path"
34046  if test "x$has_colon" = x; then
34047    # Not in mixed or Windows style, start by that.
34048    new_path=`cmd //c echo $path`
34049  fi
34050
34051
34052  input_path="$new_path"
34053  # Check if we need to convert this using DOS-style short mode. If the path
34054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34055  # take no chances and rewrite it.
34056  # Note: m4 eats our [], so we need to use [ and ] instead.
34057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34058  if test "x$has_forbidden_chars" != x; then
34059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34061  fi
34062
34063
34064  windows_path="$new_path"
34065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34066    unix_path=`$CYGPATH -u "$windows_path"`
34067    new_path="$unix_path"
34068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34070    new_path="$unix_path"
34071  fi
34072
34073  if test "x$path" != "x$new_path"; then
34074    FREETYPE_INCLUDE_PATH="$new_path"
34075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34076$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34077  fi
34078
34079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34081
34082  else
34083    # We're on a posix platform. Hooray! :)
34084    path="$FREETYPE_INCLUDE_PATH"
34085    has_space=`$ECHO "$path" | $GREP " "`
34086    if test "x$has_space" != x; then
34087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34088$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34089      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34090    fi
34091
34092    # Use eval to expand a potential ~
34093    eval path="$path"
34094    if test ! -f "$path" && test ! -d "$path"; then
34095      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34096    fi
34097
34098    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34099  fi
34100
34101      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34102        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34103      else
34104        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34105      fi
34106    fi
34107
34108    if test "x$FREETYPE_LIBS" = x; then
34109
34110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34111
34112  # Input might be given as Windows format, start by converting to
34113  # unix format.
34114  path="$FREETYPE_LIB_PATH"
34115  new_path=`$CYGPATH -u "$path"`
34116
34117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34120  # "foo.exe" is OK but "foo" is an error.
34121  #
34122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34123  # It is also a way to make sure we got the proper file name for the real test later on.
34124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34125  if test "x$test_shortpath" = x; then
34126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34127$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34128    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34129  fi
34130
34131  # Call helper function which possibly converts this using DOS-style short mode.
34132  # If so, the updated path is stored in $new_path.
34133
34134  input_path="$new_path"
34135  # Check if we need to convert this using DOS-style short mode. If the path
34136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34137  # take no chances and rewrite it.
34138  # Note: m4 eats our [], so we need to use [ and ] instead.
34139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34140  if test "x$has_forbidden_chars" != x; then
34141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34145      # Going to short mode and back again did indeed matter. Since short mode is
34146      # case insensitive, let's make it lowercase to improve readability.
34147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34148      # Now convert it back to Unix-stile (cygpath)
34149      input_path=`$CYGPATH -u "$shortmode_path"`
34150      new_path="$input_path"
34151    fi
34152  fi
34153
34154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34155  if test "x$test_cygdrive_prefix" = x; then
34156    # As a simple fix, exclude /usr/bin since it's not a real path.
34157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34159      # a path prefixed by /cygdrive for fixpath to work.
34160      new_path="$CYGWIN_ROOT_PATH$input_path"
34161    fi
34162  fi
34163
34164
34165  if test "x$path" != "x$new_path"; then
34166    FREETYPE_LIB_PATH="$new_path"
34167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34168$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34169  fi
34170
34171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34172
34173  path="$FREETYPE_LIB_PATH"
34174  has_colon=`$ECHO $path | $GREP ^.:`
34175  new_path="$path"
34176  if test "x$has_colon" = x; then
34177    # Not in mixed or Windows style, start by that.
34178    new_path=`cmd //c echo $path`
34179  fi
34180
34181
34182  input_path="$new_path"
34183  # Check if we need to convert this using DOS-style short mode. If the path
34184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34185  # take no chances and rewrite it.
34186  # Note: m4 eats our [], so we need to use [ and ] instead.
34187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34188  if test "x$has_forbidden_chars" != x; then
34189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34191  fi
34192
34193
34194  windows_path="$new_path"
34195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34196    unix_path=`$CYGPATH -u "$windows_path"`
34197    new_path="$unix_path"
34198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34200    new_path="$unix_path"
34201  fi
34202
34203  if test "x$path" != "x$new_path"; then
34204    FREETYPE_LIB_PATH="$new_path"
34205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34206$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34207  fi
34208
34209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34211
34212  else
34213    # We're on a posix platform. Hooray! :)
34214    path="$FREETYPE_LIB_PATH"
34215    has_space=`$ECHO "$path" | $GREP " "`
34216    if test "x$has_space" != x; then
34217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34218$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34219      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34220    fi
34221
34222    # Use eval to expand a potential ~
34223    eval path="$path"
34224    if test ! -f "$path" && test ! -d "$path"; then
34225      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34226    fi
34227
34228    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34229  fi
34230
34231      if test "x$OPENJDK_TARGET_OS" = xwindows; then
34232        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34233      else
34234        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34235      fi
34236    fi
34237
34238    # Try to compile it
34239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34240$as_echo_n "checking if we can compile and link with freetype... " >&6; }
34241    ac_ext=cpp
34242ac_cpp='$CXXCPP $CPPFLAGS'
34243ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34244ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34245ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34246
34247    PREV_CXXCFLAGS="$CXXFLAGS"
34248    PREV_LDFLAGS="$LDFLAGS"
34249    PREV_CXX="$CXX"
34250    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34251    LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
34252    CXX="$FIXPATH $CXX"
34253    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34254/* end confdefs.h.  */
34255
34256          #include<ft2build.h>
34257          #include FT_FREETYPE_H
34258          int main () {
34259            FT_Init_FreeType(NULL);
34260            return 0;
34261          }
34262
34263_ACEOF
34264if ac_fn_cxx_try_link "$LINENO"; then :
34265
34266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34267$as_echo "yes" >&6; }
34268
34269else
34270
34271          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34272$as_echo "no" >&6; }
34273          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34274$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34275          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34276$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34277
34278
34279  # Print a helpful message on how to acquire the necessary build dependency.
34280  # freetype is the help tag: freetype, cups, pulse, alsa etc
34281  MISSING_DEPENDENCY=freetype
34282
34283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34284    cygwin_help $MISSING_DEPENDENCY
34285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34286    msys_help $MISSING_DEPENDENCY
34287  else
34288    PKGHANDLER_COMMAND=
34289
34290    case $PKGHANDLER in
34291      apt-get)
34292        apt_help     $MISSING_DEPENDENCY ;;
34293      yum)
34294        yum_help     $MISSING_DEPENDENCY ;;
34295      port)
34296        port_help    $MISSING_DEPENDENCY ;;
34297      pkgutil)
34298        pkgutil_help $MISSING_DEPENDENCY ;;
34299      pkgadd)
34300        pkgadd_help  $MISSING_DEPENDENCY ;;
34301      * )
34302        break ;;
34303    esac
34304
34305    if test "x$PKGHANDLER_COMMAND" != x; then
34306      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34307    fi
34308  fi
34309
34310
34311          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34312
34313
34314fi
34315rm -f core conftest.err conftest.$ac_objext \
34316    conftest$ac_exeext conftest.$ac_ext
34317    CXXCFLAGS="$PREV_CXXFLAGS"
34318    LDFLAGS="$PREV_LDFLAGS"
34319    CXX="$PREV_CXX"
34320    ac_ext=cpp
34321ac_cpp='$CXXCPP $CPPFLAGS'
34322ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34323ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34324ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34325
34326
34327    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34328$as_echo_n "checking if we should bundle freetype... " >&6; }
34329    if test "x$BUNDLE_FREETYPE" = xyes; then
34330      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34331    fi
34332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34333$as_echo "$BUNDLE_FREETYPE" >&6; }
34334
34335  fi # end freetype needed
34336
34337
34338
34339
34340
34341
34342
34343  ###############################################################################
34344  #
34345  # Check for alsa headers and libraries. Used on Linux/GNU systems.
34346  #
34347
34348# Check whether --with-alsa was given.
34349if test "${with_alsa+set}" = set; then :
34350  withval=$with_alsa;
34351fi
34352
34353
34354# Check whether --with-alsa-include was given.
34355if test "${with_alsa_include+set}" = set; then :
34356  withval=$with_alsa_include;
34357fi
34358
34359
34360# Check whether --with-alsa-lib was given.
34361if test "${with_alsa_lib+set}" = set; then :
34362  withval=$with_alsa_lib;
34363fi
34364
34365
34366  if test "x$ALSA_NOT_NEEDED" = xyes; then
34367    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34368      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34369$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34370    fi
34371    ALSA_CFLAGS=
34372    ALSA_LIBS=
34373  else
34374    ALSA_FOUND=no
34375
34376    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34377      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34378    fi
34379
34380    if test "x${with_alsa}" != x; then
34381      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34382      ALSA_CFLAGS="-I${with_alsa}/include"
34383      ALSA_FOUND=yes
34384    fi
34385    if test "x${with_alsa_include}" != x; then
34386      ALSA_CFLAGS="-I${with_alsa_include}"
34387      ALSA_FOUND=yes
34388    fi
34389    if test "x${with_alsa_lib}" != x; then
34390      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34391      ALSA_FOUND=yes
34392    fi
34393    if test "x$ALSA_FOUND" = xno; then
34394
34395
34396  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34397    # Source the builddeps file again, to make sure it uses the latest variables!
34398    . $builddepsfile
34399    # Look for a target and build machine specific resource!
34400    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34401    if test "x$resource" = x; then
34402      # Ok, lets instead look for a target specific resource
34403      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34404    fi
34405    if test "x$resource" = x; then
34406      # Ok, lets instead look for a build specific resource
34407      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34408    fi
34409    if test "x$resource" = x; then
34410      # Ok, lets instead look for a generic resource
34411      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34412      resource=${builddep_alsa}
34413    fi
34414    if test "x$resource" != x; then
34415      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34416$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34417      # If the resource in the builddeps.conf file is an existing directory,
34418      # for example /java/linux/cups
34419      if test -d ${resource}; then
34420        depdir=${resource}
34421      else
34422
34423  # alsa is for example mymodule
34424  # $resource is for example libs/general/libmymod_1_2_3.zip
34425  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34426  # $with_builddeps_dir is for example /localhome/builddeps
34427  # depdir is the name of the variable into which we store the depdir, eg MYMOD
34428  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34429  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34430  filename=`basename $resource`
34431  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34432  filebase=${filename%%.*}
34433  extension=${filename#*.}
34434  installdir=$with_builddeps_dir/$filebase
34435  if test ! -f $installdir/$filename.unpacked; then
34436    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34437$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34438    if test ! -d $installdir; then
34439      mkdir -p $installdir
34440    fi
34441    if test ! -d $installdir; then
34442      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34443    fi
34444    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34445    touch $tmpfile
34446    if test ! -f $tmpfile; then
34447      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34448    fi
34449
34450  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34451  # $tmpfile is the local file name for the downloaded file.
34452  VALID_TOOL=no
34453  if test "x$BDEPS_FTP" = xwget; then
34454    VALID_TOOL=yes
34455    wget -O $tmpfile $with_builddeps_server/$resource
34456  fi
34457  if test "x$BDEPS_FTP" = xlftp; then
34458    VALID_TOOL=yes
34459    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34460  fi
34461  if test "x$BDEPS_FTP" = xftp; then
34462    VALID_TOOL=yes
34463    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34464    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34465    FTPUSERPWD=${FTPSERVER%%@*}
34466    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34467      FTPUSER=${userpwd%%:*}
34468      FTPPWD=${userpwd#*@}
34469      FTPSERVER=${FTPSERVER#*@}
34470    else
34471      FTPUSER=ftp
34472      FTPPWD=ftp
34473    fi
34474    # the "pass" command does not work on some
34475    # ftp clients (read ftp.exe) but if it works,
34476    # passive mode is better!
34477    ( \
34478        echo "user $FTPUSER $FTPPWD"        ; \
34479        echo "pass"                         ; \
34480        echo "bin"                          ; \
34481        echo "get $FTPPATH $tmpfile"              ; \
34482    ) | ftp -in $FTPSERVER
34483  fi
34484  if test "x$VALID_TOOL" != xyes; then
34485    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34486  fi
34487
34488    mv $tmpfile $installdir/$filename
34489    if test ! -s $installdir/$filename; then
34490      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34491    fi
34492    case "$extension" in
34493      zip)  echo "Unzipping $installdir/$filename..."
34494        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34495        ;;
34496      tar.gz) echo "Untaring $installdir/$filename..."
34497        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34498        ;;
34499      tgz) echo "Untaring $installdir/$filename..."
34500        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34501        ;;
34502      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34503        ;;
34504    esac
34505  fi
34506  if test -f $installdir/$filename.unpacked; then
34507    depdir=$installdir
34508  fi
34509
34510      fi
34511      # Source the builddeps file again, because in the previous command, the depdir
34512      # was updated to point at the current build dependency install directory.
34513      . $builddepsfile
34514      # Now extract variables from the builddeps.conf files.
34515      theroot=${builddep_alsa_ROOT}
34516      thecflags=${builddep_alsa_CFLAGS}
34517      thelibs=${builddep_alsa_LIBS}
34518      if test "x$depdir" = x; then
34519        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34520      fi
34521      ALSA=$depdir
34522      if test "x$theroot" != x; then
34523        ALSA="$theroot"
34524      fi
34525      if test "x$thecflags" != x; then
34526        ALSA_CFLAGS="$thecflags"
34527      fi
34528      if test "x$thelibs" != x; then
34529        ALSA_LIBS="$thelibs"
34530      fi
34531      ALSA_FOUND=yes
34532      else ALSA_FOUND=no
34533
34534    fi
34535    else ALSA_FOUND=no
34536
34537  fi
34538
34539    fi
34540    if test "x$ALSA_FOUND" = xno; then
34541
34542pkg_failed=no
34543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34544$as_echo_n "checking for ALSA... " >&6; }
34545
34546if test -n "$ALSA_CFLAGS"; then
34547    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34548 elif test -n "$PKG_CONFIG"; then
34549    if test -n "$PKG_CONFIG" && \
34550    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34551  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34552  ac_status=$?
34553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34554  test $ac_status = 0; }; then
34555  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34556else
34557  pkg_failed=yes
34558fi
34559 else
34560    pkg_failed=untried
34561fi
34562if test -n "$ALSA_LIBS"; then
34563    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34564 elif test -n "$PKG_CONFIG"; then
34565    if test -n "$PKG_CONFIG" && \
34566    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34567  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34568  ac_status=$?
34569  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34570  test $ac_status = 0; }; then
34571  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34572else
34573  pkg_failed=yes
34574fi
34575 else
34576    pkg_failed=untried
34577fi
34578
34579
34580
34581if test $pkg_failed = yes; then
34582
34583if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34584        _pkg_short_errors_supported=yes
34585else
34586        _pkg_short_errors_supported=no
34587fi
34588        if test $_pkg_short_errors_supported = yes; then
34589	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34590        else
34591	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34592        fi
34593	# Put the nasty error message in config.log where it belongs
34594	echo "$ALSA_PKG_ERRORS" >&5
34595
34596	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34597$as_echo "no" >&6; }
34598                ALSA_FOUND=no
34599elif test $pkg_failed = untried; then
34600	ALSA_FOUND=no
34601else
34602	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34603	ALSA_LIBS=$pkg_cv_ALSA_LIBS
34604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34605$as_echo "yes" >&6; }
34606	ALSA_FOUND=yes
34607fi
34608    fi
34609    if test "x$ALSA_FOUND" = xno; then
34610      for ac_header in alsa/asoundlib.h
34611do :
34612  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34613if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34614  cat >>confdefs.h <<_ACEOF
34615#define HAVE_ALSA_ASOUNDLIB_H 1
34616_ACEOF
34617
34618            ALSA_FOUND=yes
34619            ALSA_CFLAGS=-Iignoreme
34620            ALSA_LIBS=-lasound
34621            DEFAULT_ALSA=yes
34622
34623else
34624  ALSA_FOUND=no
34625fi
34626
34627done
34628
34629    fi
34630    if test "x$ALSA_FOUND" = xno; then
34631
34632  # Print a helpful message on how to acquire the necessary build dependency.
34633  # alsa is the help tag: freetype, cups, pulse, alsa etc
34634  MISSING_DEPENDENCY=alsa
34635
34636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34637    cygwin_help $MISSING_DEPENDENCY
34638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34639    msys_help $MISSING_DEPENDENCY
34640  else
34641    PKGHANDLER_COMMAND=
34642
34643    case $PKGHANDLER in
34644      apt-get)
34645        apt_help     $MISSING_DEPENDENCY ;;
34646      yum)
34647        yum_help     $MISSING_DEPENDENCY ;;
34648      port)
34649        port_help    $MISSING_DEPENDENCY ;;
34650      pkgutil)
34651        pkgutil_help $MISSING_DEPENDENCY ;;
34652      pkgadd)
34653        pkgadd_help  $MISSING_DEPENDENCY ;;
34654      * )
34655        break ;;
34656    esac
34657
34658    if test "x$PKGHANDLER_COMMAND" != x; then
34659      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34660    fi
34661  fi
34662
34663      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34664    fi
34665  fi
34666
34667
34668
34669
34670
34671
34672  ###############################################################################
34673  #
34674  # Check for the jpeg library
34675  #
34676
34677  USE_EXTERNAL_LIBJPEG=true
34678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34679$as_echo_n "checking for main in -ljpeg... " >&6; }
34680if ${ac_cv_lib_jpeg_main+:} false; then :
34681  $as_echo_n "(cached) " >&6
34682else
34683  ac_check_lib_save_LIBS=$LIBS
34684LIBS="-ljpeg  $LIBS"
34685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34686/* end confdefs.h.  */
34687
34688
34689int
34690main ()
34691{
34692return main ();
34693  ;
34694  return 0;
34695}
34696_ACEOF
34697if ac_fn_cxx_try_link "$LINENO"; then :
34698  ac_cv_lib_jpeg_main=yes
34699else
34700  ac_cv_lib_jpeg_main=no
34701fi
34702rm -f core conftest.err conftest.$ac_objext \
34703    conftest$ac_exeext conftest.$ac_ext
34704LIBS=$ac_check_lib_save_LIBS
34705fi
34706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34707$as_echo "$ac_cv_lib_jpeg_main" >&6; }
34708if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34709  cat >>confdefs.h <<_ACEOF
34710#define HAVE_LIBJPEG 1
34711_ACEOF
34712
34713  LIBS="-ljpeg $LIBS"
34714
34715else
34716   USE_EXTERNAL_LIBJPEG=false
34717      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34718$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34719
34720fi
34721
34722
34723
34724  ###############################################################################
34725  #
34726  # Check for the gif library
34727  #
34728
34729
34730# Check whether --with-giflib was given.
34731if test "${with_giflib+set}" = set; then :
34732  withval=$with_giflib;
34733fi
34734
34735
34736
34737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34738$as_echo_n "checking for which giflib to use... " >&6; }
34739
34740  # default is bundled
34741  DEFAULT_GIFLIB=bundled
34742
34743  #
34744  # if user didn't specify, use DEFAULT_GIFLIB
34745  #
34746  if test "x${with_giflib}" = "x"; then
34747    with_giflib=${DEFAULT_GIFLIB}
34748  fi
34749
34750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34751$as_echo "${with_giflib}" >&6; }
34752
34753  if test "x${with_giflib}" = "xbundled"; then
34754    USE_EXTERNAL_LIBGIF=false
34755  elif test "x${with_giflib}" = "xsystem"; then
34756    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34757if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34758
34759else
34760   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34761fi
34762
34763
34764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34765$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34766if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34767  $as_echo_n "(cached) " >&6
34768else
34769  ac_check_lib_save_LIBS=$LIBS
34770LIBS="-lgif  $LIBS"
34771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34772/* end confdefs.h.  */
34773
34774/* Override any GCC internal prototype to avoid an error.
34775   Use char because int might match the return type of a GCC
34776   builtin and then its argument prototype would still apply.  */
34777#ifdef __cplusplus
34778extern "C"
34779#endif
34780char DGifGetCode ();
34781int
34782main ()
34783{
34784return DGifGetCode ();
34785  ;
34786  return 0;
34787}
34788_ACEOF
34789if ac_fn_cxx_try_link "$LINENO"; then :
34790  ac_cv_lib_gif_DGifGetCode=yes
34791else
34792  ac_cv_lib_gif_DGifGetCode=no
34793fi
34794rm -f core conftest.err conftest.$ac_objext \
34795    conftest$ac_exeext conftest.$ac_ext
34796LIBS=$ac_check_lib_save_LIBS
34797fi
34798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
34799$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
34800if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
34801  cat >>confdefs.h <<_ACEOF
34802#define HAVE_LIBGIF 1
34803_ACEOF
34804
34805  LIBS="-lgif $LIBS"
34806
34807else
34808   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
34809fi
34810
34811
34812    USE_EXTERNAL_LIBGIF=true
34813  else
34814    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
34815  fi
34816
34817
34818  ###############################################################################
34819  #
34820  # Check for the zlib library
34821  #
34822
34823
34824# Check whether --with-zlib was given.
34825if test "${with_zlib+set}" = set; then :
34826  withval=$with_zlib;
34827fi
34828
34829
34830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
34831$as_echo_n "checking for compress in -lz... " >&6; }
34832if ${ac_cv_lib_z_compress+:} false; then :
34833  $as_echo_n "(cached) " >&6
34834else
34835  ac_check_lib_save_LIBS=$LIBS
34836LIBS="-lz  $LIBS"
34837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34838/* end confdefs.h.  */
34839
34840/* Override any GCC internal prototype to avoid an error.
34841   Use char because int might match the return type of a GCC
34842   builtin and then its argument prototype would still apply.  */
34843#ifdef __cplusplus
34844extern "C"
34845#endif
34846char compress ();
34847int
34848main ()
34849{
34850return compress ();
34851  ;
34852  return 0;
34853}
34854_ACEOF
34855if ac_fn_cxx_try_link "$LINENO"; then :
34856  ac_cv_lib_z_compress=yes
34857else
34858  ac_cv_lib_z_compress=no
34859fi
34860rm -f core conftest.err conftest.$ac_objext \
34861    conftest$ac_exeext conftest.$ac_ext
34862LIBS=$ac_check_lib_save_LIBS
34863fi
34864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
34865$as_echo "$ac_cv_lib_z_compress" >&6; }
34866if test "x$ac_cv_lib_z_compress" = xyes; then :
34867   ZLIB_FOUND=yes
34868else
34869   ZLIB_FOUND=no
34870fi
34871
34872
34873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
34874$as_echo_n "checking for which zlib to use... " >&6; }
34875
34876  DEFAULT_ZLIB=bundled
34877  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
34878    #
34879    # On macosx default is system...on others default is
34880    #
34881    DEFAULT_ZLIB=system
34882  fi
34883
34884  if test "x${ZLIB_FOUND}" != "xyes"; then
34885    #
34886    # If we don't find any system...set default to bundled
34887    #
34888    DEFAULT_ZLIB=bundled
34889  fi
34890
34891  #
34892  # If user didn't specify, use DEFAULT_ZLIB
34893  #
34894  if test "x${with_zlib}" = "x"; then
34895    with_zlib=${DEFAULT_ZLIB}
34896  fi
34897
34898  if test "x${with_zlib}" = "xbundled"; then
34899    USE_EXTERNAL_LIBZ=false
34900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
34901$as_echo "bundled" >&6; }
34902  elif test "x${with_zlib}" = "xsystem"; then
34903    if test "x${ZLIB_FOUND}" = "xyes"; then
34904      USE_EXTERNAL_LIBZ=true
34905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
34906$as_echo "system" >&6; }
34907    else
34908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
34909$as_echo "system not found" >&6; }
34910      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
34911    fi
34912  else
34913    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
34914  fi
34915
34916
34917
34918  ###############################################################################
34919  LIBZIP_CAN_USE_MMAP=true
34920
34921
34922
34923  ###############################################################################
34924  #
34925  # Check if altzone exists in time.h
34926  #
34927
34928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34929/* end confdefs.h.  */
34930#include <time.h>
34931int
34932main ()
34933{
34934return (int)altzone;
34935  ;
34936  return 0;
34937}
34938_ACEOF
34939if ac_fn_cxx_try_link "$LINENO"; then :
34940  has_altzone=yes
34941else
34942  has_altzone=no
34943fi
34944rm -f core conftest.err conftest.$ac_objext \
34945    conftest$ac_exeext conftest.$ac_ext
34946  if test "x$has_altzone" = xyes; then
34947
34948$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
34949
34950  fi
34951
34952  ###############################################################################
34953  #
34954  # Check the maths library
34955  #
34956
34957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
34958$as_echo_n "checking for cos in -lm... " >&6; }
34959if ${ac_cv_lib_m_cos+:} false; then :
34960  $as_echo_n "(cached) " >&6
34961else
34962  ac_check_lib_save_LIBS=$LIBS
34963LIBS="-lm  $LIBS"
34964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34965/* end confdefs.h.  */
34966
34967/* Override any GCC internal prototype to avoid an error.
34968   Use char because int might match the return type of a GCC
34969   builtin and then its argument prototype would still apply.  */
34970#ifdef __cplusplus
34971extern "C"
34972#endif
34973char cos ();
34974int
34975main ()
34976{
34977return cos ();
34978  ;
34979  return 0;
34980}
34981_ACEOF
34982if ac_fn_cxx_try_link "$LINENO"; then :
34983  ac_cv_lib_m_cos=yes
34984else
34985  ac_cv_lib_m_cos=no
34986fi
34987rm -f core conftest.err conftest.$ac_objext \
34988    conftest$ac_exeext conftest.$ac_ext
34989LIBS=$ac_check_lib_save_LIBS
34990fi
34991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
34992$as_echo "$ac_cv_lib_m_cos" >&6; }
34993if test "x$ac_cv_lib_m_cos" = xyes; then :
34994  cat >>confdefs.h <<_ACEOF
34995#define HAVE_LIBM 1
34996_ACEOF
34997
34998  LIBS="-lm $LIBS"
34999
35000else
35001
35002        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35003$as_echo "$as_me: Maths library was not found" >&6;}
35004
35005
35006fi
35007
35008
35009
35010  ###############################################################################
35011  #
35012  # Check for libdl.so
35013
35014  save_LIBS="$LIBS"
35015  LIBS=""
35016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35017$as_echo_n "checking for dlopen in -ldl... " >&6; }
35018if ${ac_cv_lib_dl_dlopen+:} false; then :
35019  $as_echo_n "(cached) " >&6
35020else
35021  ac_check_lib_save_LIBS=$LIBS
35022LIBS="-ldl  $LIBS"
35023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35024/* end confdefs.h.  */
35025
35026/* Override any GCC internal prototype to avoid an error.
35027   Use char because int might match the return type of a GCC
35028   builtin and then its argument prototype would still apply.  */
35029#ifdef __cplusplus
35030extern "C"
35031#endif
35032char dlopen ();
35033int
35034main ()
35035{
35036return dlopen ();
35037  ;
35038  return 0;
35039}
35040_ACEOF
35041if ac_fn_cxx_try_link "$LINENO"; then :
35042  ac_cv_lib_dl_dlopen=yes
35043else
35044  ac_cv_lib_dl_dlopen=no
35045fi
35046rm -f core conftest.err conftest.$ac_objext \
35047    conftest$ac_exeext conftest.$ac_ext
35048LIBS=$ac_check_lib_save_LIBS
35049fi
35050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35051$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35052if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35053  cat >>confdefs.h <<_ACEOF
35054#define HAVE_LIBDL 1
35055_ACEOF
35056
35057  LIBS="-ldl $LIBS"
35058
35059fi
35060
35061  LIBDL="$LIBS"
35062
35063  LIBS="$save_LIBS"
35064
35065
35066  ###############################################################################
35067  #
35068  # statically link libstdc++ before C++ ABI is stablized on Linux unless
35069  # dynamic build is configured on command line.
35070  #
35071
35072# Check whether --with-stdc++lib was given.
35073if test "${with_stdc__lib+set}" = set; then :
35074  withval=$with_stdc__lib;
35075        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35076                && test "x$with_stdc__lib" != xdefault; then
35077          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35078        fi
35079
35080else
35081  with_stdc__lib=default
35082
35083fi
35084
35085
35086  if test "x$OPENJDK_TARGET_OS" = xlinux; then
35087    # Test if -lstdc++ works.
35088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35089$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35090    ac_ext=cpp
35091ac_cpp='$CXXCPP $CPPFLAGS'
35092ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35093ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35094ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35095
35096    OLD_CXXFLAGS="$CXXFLAGS"
35097    CXXFLAGS="$CXXFLAGS -lstdc++"
35098    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35099/* end confdefs.h.  */
35100
35101int
35102main ()
35103{
35104return 0;
35105  ;
35106  return 0;
35107}
35108_ACEOF
35109if ac_fn_cxx_try_link "$LINENO"; then :
35110  has_dynamic_libstdcxx=yes
35111else
35112  has_dynamic_libstdcxx=no
35113fi
35114rm -f core conftest.err conftest.$ac_objext \
35115    conftest$ac_exeext conftest.$ac_ext
35116    CXXFLAGS="$OLD_CXXFLAGS"
35117    ac_ext=cpp
35118ac_cpp='$CXXCPP $CPPFLAGS'
35119ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35120ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35121ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35122
35123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35124$as_echo "$has_dynamic_libstdcxx" >&6; }
35125
35126    # Test if stdc++ can be linked statically.
35127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35128$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35129    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35130    ac_ext=cpp
35131ac_cpp='$CXXCPP $CPPFLAGS'
35132ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35133ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35134ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35135
35136    OLD_LIBS="$LIBS"
35137    OLD_CXX="$CXX"
35138    LIBS="$STATIC_STDCXX_FLAGS"
35139    CXX="$CC"
35140    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35141/* end confdefs.h.  */
35142
35143int
35144main ()
35145{
35146return 0;
35147  ;
35148  return 0;
35149}
35150_ACEOF
35151if ac_fn_cxx_try_link "$LINENO"; then :
35152  has_static_libstdcxx=yes
35153else
35154  has_static_libstdcxx=no
35155fi
35156rm -f core conftest.err conftest.$ac_objext \
35157    conftest$ac_exeext conftest.$ac_ext
35158    LIBS="$OLD_LIBS"
35159    CXX="$OLD_CXX"
35160    ac_ext=cpp
35161ac_cpp='$CXXCPP $CPPFLAGS'
35162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35165
35166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35167$as_echo "$has_static_libstdcxx" >&6; }
35168
35169    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35170      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35171    fi
35172
35173    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35174      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35175    fi
35176
35177    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35178      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35179    fi
35180
35181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35182$as_echo_n "checking how to link with libstdc++... " >&6; }
35183    # If dynamic was requested, it's available since it would fail above otherwise.
35184    # If dynamic wasn't requested, go with static unless it isn't available.
35185    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35186      LIBCXX="$LIBCXX -lstdc++"
35187      LDCXX="$CXX"
35188      STATIC_CXX_SETTING="STATIC_CXX=false"
35189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35190$as_echo "dynamic" >&6; }
35191    else
35192      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35193      LDCXX="$CC"
35194      STATIC_CXX_SETTING="STATIC_CXX=true"
35195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35196$as_echo "static" >&6; }
35197    fi
35198  fi
35199
35200
35201  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35202    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35203
35204pkg_failed=no
35205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35206$as_echo_n "checking for LIBFFI... " >&6; }
35207
35208if test -n "$LIBFFI_CFLAGS"; then
35209    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35210 elif test -n "$PKG_CONFIG"; then
35211    if test -n "$PKG_CONFIG" && \
35212    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35213  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35214  ac_status=$?
35215  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35216  test $ac_status = 0; }; then
35217  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35218else
35219  pkg_failed=yes
35220fi
35221 else
35222    pkg_failed=untried
35223fi
35224if test -n "$LIBFFI_LIBS"; then
35225    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35226 elif test -n "$PKG_CONFIG"; then
35227    if test -n "$PKG_CONFIG" && \
35228    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35229  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35230  ac_status=$?
35231  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35232  test $ac_status = 0; }; then
35233  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35234else
35235  pkg_failed=yes
35236fi
35237 else
35238    pkg_failed=untried
35239fi
35240
35241
35242
35243if test $pkg_failed = yes; then
35244
35245if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35246        _pkg_short_errors_supported=yes
35247else
35248        _pkg_short_errors_supported=no
35249fi
35250        if test $_pkg_short_errors_supported = yes; then
35251	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35252        else
35253	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35254        fi
35255	# Put the nasty error message in config.log where it belongs
35256	echo "$LIBFFI_PKG_ERRORS" >&5
35257
35258	as_fn_error $? "Package requirements (libffi) were not met:
35259
35260$LIBFFI_PKG_ERRORS
35261
35262Consider adjusting the PKG_CONFIG_PATH environment variable if you
35263installed software in a non-standard prefix.
35264
35265Alternatively, you may set the environment variables LIBFFI_CFLAGS
35266and LIBFFI_LIBS to avoid the need to call pkg-config.
35267See the pkg-config man page for more details.
35268" "$LINENO" 5
35269elif test $pkg_failed = untried; then
35270	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35272as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35273is in your PATH or set the PKG_CONFIG environment variable to the full
35274path to pkg-config.
35275
35276Alternatively, you may set the environment variables LIBFFI_CFLAGS
35277and LIBFFI_LIBS to avoid the need to call pkg-config.
35278See the pkg-config man page for more details.
35279
35280To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35281See \`config.log' for more details" "$LINENO" 5; }
35282else
35283	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35284	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35286$as_echo "yes" >&6; }
35287	:
35288fi
35289
35290  fi
35291
35292  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35293    # Extract the first word of "llvm-config", so it can be a program name with args.
35294set dummy llvm-config; ac_word=$2
35295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35296$as_echo_n "checking for $ac_word... " >&6; }
35297if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35298  $as_echo_n "(cached) " >&6
35299else
35300  if test -n "$LLVM_CONFIG"; then
35301  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35302else
35303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35304for as_dir in $PATH
35305do
35306  IFS=$as_save_IFS
35307  test -z "$as_dir" && as_dir=.
35308    for ac_exec_ext in '' $ac_executable_extensions; do
35309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35310    ac_cv_prog_LLVM_CONFIG="llvm-config"
35311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35312    break 2
35313  fi
35314done
35315  done
35316IFS=$as_save_IFS
35317
35318fi
35319fi
35320LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35321if test -n "$LLVM_CONFIG"; then
35322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35323$as_echo "$LLVM_CONFIG" >&6; }
35324else
35325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35326$as_echo "no" >&6; }
35327fi
35328
35329
35330
35331    if test "x$LLVM_CONFIG" != xllvm-config; then
35332      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35333    fi
35334
35335    llvm_components="jit mcjit engine nativecodegen native"
35336    unset LLVM_CFLAGS
35337    for flag in $("$LLVM_CONFIG" --cxxflags); do
35338      if echo "${flag}" | grep -q '^-[ID]'; then
35339        if test "${flag}" != "-D_DEBUG" ; then
35340          if test "${LLVM_CFLAGS}" != "" ; then
35341            LLVM_CFLAGS="${LLVM_CFLAGS} "
35342          fi
35343          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35344        fi
35345      fi
35346    done
35347    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35348    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35349
35350    unset LLVM_LDFLAGS
35351    for flag in $("${LLVM_CONFIG}" --ldflags); do
35352      if echo "${flag}" | grep -q '^-L'; then
35353        if test "${LLVM_LDFLAGS}" != ""; then
35354          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35355        fi
35356        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35357      fi
35358    done
35359
35360    unset LLVM_LIBS
35361    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35362      if echo "${flag}" | grep -q '^-l'; then
35363        if test "${LLVM_LIBS}" != ""; then
35364          LLVM_LIBS="${LLVM_LIBS} "
35365        fi
35366        LLVM_LIBS="${LLVM_LIBS}${flag}"
35367      fi
35368    done
35369
35370
35371
35372
35373  fi
35374
35375  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35376  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35377    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35378  fi
35379
35380  # TODO better (platform agnostic) test
35381  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35382    LIBCXX="-lstdc++"
35383  fi
35384
35385
35386
35387
35388
35389###############################################################################
35390#
35391# We need to do some final tweaking, when everything else is done.
35392#
35393###############################################################################
35394
35395
35396  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35397
35398
35399  # The name of the Service Agent jar.
35400  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35401  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35402    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35403  fi
35404
35405
35406
35407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35408$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35409
35410    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35411      ENABLE_INTREE_EC=yes
35412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35413$as_echo "yes" >&6; }
35414    else
35415      ENABLE_INTREE_EC=no
35416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35417$as_echo "no" >&6; }
35418    fi
35419
35420
35421
35422
35423###############################################################################
35424#
35425# Configure parts of the build that only affect the build performance,
35426# not the result.
35427#
35428###############################################################################
35429
35430
35431  # How many cores do we have on this build system?
35432
35433# Check whether --with-num-cores was given.
35434if test "${with_num_cores+set}" = set; then :
35435  withval=$with_num_cores;
35436fi
35437
35438  if test "x$with_num_cores" = x; then
35439    # The number of cores were not specified, try to probe them.
35440
35441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35442$as_echo_n "checking for number of cores... " >&6; }
35443  NUM_CORES=1
35444  FOUND_CORES=no
35445
35446  if test -f /proc/cpuinfo; then
35447    # Looks like a Linux (or cygwin) system
35448    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35449    FOUND_CORES=yes
35450  elif test -x /usr/sbin/psrinfo; then
35451    # Looks like a Solaris system
35452    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35453    FOUND_CORES=yes
35454  elif test -x /usr/sbin/system_profiler; then
35455    # Looks like a MacOSX system
35456    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35457    FOUND_CORES=yes
35458  elif test -n "$NUMBER_OF_PROCESSORS"; then
35459    # On windows, look in the env
35460    NUM_CORES=$NUMBER_OF_PROCESSORS
35461    FOUND_CORES=yes
35462  fi
35463
35464  if test "x$FOUND_CORES" = xyes; then
35465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35466$as_echo "$NUM_CORES" >&6; }
35467  else
35468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35469$as_echo "could not detect number of cores, defaulting to 1" >&6; }
35470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35471$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35472  fi
35473
35474  else
35475    NUM_CORES=$with_num_cores
35476  fi
35477
35478
35479
35480  # How much memory do we have on this build system?
35481
35482# Check whether --with-memory-size was given.
35483if test "${with_memory_size+set}" = set; then :
35484  withval=$with_memory_size;
35485fi
35486
35487  if test "x$with_memory_size" = x; then
35488    # The memory size was not specified, try to probe it.
35489
35490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35491$as_echo_n "checking for memory size... " >&6; }
35492  # Default to 1024 MB
35493  MEMORY_SIZE=1024
35494  FOUND_MEM=no
35495
35496  if test -f /proc/meminfo; then
35497    # Looks like a Linux (or cygwin) system
35498    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35499    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35500    FOUND_MEM=yes
35501  elif test -x /usr/sbin/prtconf; then
35502    # Looks like a Solaris system
35503    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
35504    FOUND_MEM=yes
35505  elif test -x /usr/sbin/system_profiler; then
35506    # Looks like a MacOSX system
35507    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35508    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35509    FOUND_MEM=yes
35510  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35511    # Windows, but without cygwin
35512    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35513    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35514    FOUND_MEM=yes
35515  fi
35516
35517  if test "x$FOUND_MEM" = xyes; then
35518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35519$as_echo "$MEMORY_SIZE MB" >&6; }
35520  else
35521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35522$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35523    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35524$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35525  fi
35526
35527  else
35528    MEMORY_SIZE=$with_memory_size
35529  fi
35530
35531
35532
35533  # Provide a decent default number of parallel jobs for make depending on
35534  # number of cores, amount of memory and machine architecture.
35535
35536# Check whether --with-jobs was given.
35537if test "${with_jobs+set}" = set; then :
35538  withval=$with_jobs;
35539fi
35540
35541  if test "x$with_jobs" = x; then
35542    # Number of jobs was not specified, calculate.
35543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35544$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35545    # Approximate memory in GB, rounding up a bit.
35546    memory_gb=`expr $MEMORY_SIZE / 1100`
35547    # Pick the lowest of memory in gb and number of cores.
35548    if test "$memory_gb" -lt "$NUM_CORES"; then
35549      JOBS="$memory_gb"
35550    else
35551      JOBS="$NUM_CORES"
35552      # On bigger machines, leave some room for other processes to run
35553      if test "$JOBS" -gt "4"; then
35554        JOBS=`expr $JOBS '*' 90 / 100`
35555      fi
35556    fi
35557    # Cap number of jobs to 16
35558    if test "$JOBS" -gt "16"; then
35559      JOBS=16
35560    fi
35561    if test "$JOBS" -eq "0"; then
35562      JOBS=1
35563    fi
35564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35565$as_echo "$JOBS" >&6; }
35566  else
35567    JOBS=$with_jobs
35568  fi
35569
35570
35571
35572# Setup smart javac (after cores and memory have been setup)
35573
35574
35575# Check whether --with-sjavac-server-java was given.
35576if test "${with_sjavac_server_java+set}" = set; then :
35577  withval=$with_sjavac_server_java;
35578fi
35579
35580
35581  if test "x$with_sjavac_server_java" != x; then
35582    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35583    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35584    if test "x$FOUND_VERSION" = x; then
35585      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35586    fi
35587  else
35588    SJAVAC_SERVER_JAVA=""
35589    # Hotspot specific options.
35590
35591  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35592  $ECHO "Command: $JAVA -verbosegc -version" >&5
35593  OUTPUT=`$JAVA -verbosegc -version 2>&1`
35594  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35595  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35596  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35597    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35598    JVM_ARG_OK=true
35599  else
35600    $ECHO "Arg failed:" >&5
35601    $ECHO "$OUTPUT" >&5
35602    JVM_ARG_OK=false
35603  fi
35604
35605    # JRockit specific options.
35606
35607  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35608  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35609  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35610  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35611  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35612  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35613    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35614    JVM_ARG_OK=true
35615  else
35616    $ECHO "Arg failed:" >&5
35617    $ECHO "$OUTPUT" >&5
35618    JVM_ARG_OK=false
35619  fi
35620
35621    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35622  fi
35623
35624
35625  if test "$MEMORY_SIZE" -gt "2500"; then
35626
35627  $ECHO "Check if jvm arg is ok: -d64" >&5
35628  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35629  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35630  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35631  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35632  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35633    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35634    JVM_ARG_OK=true
35635  else
35636    $ECHO "Arg failed:" >&5
35637    $ECHO "$OUTPUT" >&5
35638    JVM_ARG_OK=false
35639  fi
35640
35641    if test "$JVM_ARG_OK" = true; then
35642      JVM_64BIT=true
35643      JVM_ARG_OK=false
35644    fi
35645  fi
35646
35647  if test "$JVM_64BIT" = true; then
35648    if test "$MEMORY_SIZE" -gt "17000"; then
35649
35650  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35651  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35652  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35653  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35654  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35655  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35656    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35657    JVM_ARG_OK=true
35658  else
35659    $ECHO "Arg failed:" >&5
35660    $ECHO "$OUTPUT" >&5
35661    JVM_ARG_OK=false
35662  fi
35663
35664    fi
35665    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35666
35667  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35668  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35669  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35670  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35671  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35672  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35673    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35674    JVM_ARG_OK=true
35675  else
35676    $ECHO "Arg failed:" >&5
35677    $ECHO "$OUTPUT" >&5
35678    JVM_ARG_OK=false
35679  fi
35680
35681    fi
35682    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35683
35684  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35685  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35686  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35687  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35688  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35689  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35690    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35691    JVM_ARG_OK=true
35692  else
35693    $ECHO "Arg failed:" >&5
35694    $ECHO "$OUTPUT" >&5
35695    JVM_ARG_OK=false
35696  fi
35697
35698    fi
35699    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35700
35701  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35702  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35703  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35704  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35705  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35706  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35707    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35708    JVM_ARG_OK=true
35709  else
35710    $ECHO "Arg failed:" >&5
35711    $ECHO "$OUTPUT" >&5
35712    JVM_ARG_OK=false
35713  fi
35714
35715    fi
35716  fi
35717  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35718
35719  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35720  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35721  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35722  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35723  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35724  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35725    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35726    JVM_ARG_OK=true
35727  else
35728    $ECHO "Arg failed:" >&5
35729    $ECHO "$OUTPUT" >&5
35730    JVM_ARG_OK=false
35731  fi
35732
35733  fi
35734  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35735
35736  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35737  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35738  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35739  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35740  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35741  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35742    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35743    JVM_ARG_OK=true
35744  else
35745    $ECHO "Arg failed:" >&5
35746    $ECHO "$OUTPUT" >&5
35747    JVM_ARG_OK=false
35748  fi
35749
35750  fi
35751  if test "$JVM_ARG_OK" = false; then
35752
35753  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35754  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35755  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35756  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35757  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35758  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35759    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35760    JVM_ARG_OK=true
35761  else
35762    $ECHO "Arg failed:" >&5
35763    $ECHO "$OUTPUT" >&5
35764    JVM_ARG_OK=false
35765  fi
35766
35767  fi
35768
35769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35770$as_echo_n "checking whether to use sjavac... " >&6; }
35771  # Check whether --enable-sjavac was given.
35772if test "${enable_sjavac+set}" = set; then :
35773  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35774else
35775  ENABLE_SJAVAC='no'
35776fi
35777
35778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
35779$as_echo "$ENABLE_SJAVAC" >&6; }
35780
35781
35782  if test "x$ENABLE_SJAVAC" = xyes; then
35783    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
35784  else
35785    SJAVAC_SERVER_DIR=
35786  fi
35787
35788
35789
35790# Can the C/C++ compiler use precompiled headers?
35791
35792
35793  ###############################################################################
35794  #
35795  # Can the C/C++ compiler use precompiled headers?
35796  #
35797  # Check whether --enable-precompiled-headers was given.
35798if test "${enable_precompiled_headers+set}" = set; then :
35799  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
35800else
35801  ENABLE_PRECOMPH=yes
35802fi
35803
35804
35805  USE_PRECOMPILED_HEADER=1
35806  if test "x$ENABLE_PRECOMPH" = xno; then
35807    USE_PRECOMPILED_HEADER=0
35808  fi
35809
35810  if test "x$ENABLE_PRECOMPH" = xyes; then
35811    # Check that the compiler actually supports precomp headers.
35812    if test "x$GCC" = xyes; then
35813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
35814$as_echo_n "checking that precompiled headers work... " >&6; }
35815      echo "int alfa();" > conftest.h
35816      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
35817      if test ! -f conftest.hpp.gch; then
35818        USE_PRECOMPILED_HEADER=0
35819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35820$as_echo "no" >&6; }
35821      else
35822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35823$as_echo "yes" >&6; }
35824      fi
35825      rm -f conftest.h conftest.hpp.gch
35826    fi
35827  fi
35828
35829
35830
35831
35832# Setup use of ccache, if available
35833
35834  # Check whether --enable-ccache was given.
35835if test "${enable_ccache+set}" = set; then :
35836  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
35837else
35838  ENABLE_CCACHE=yes
35839fi
35840
35841  if test "x$ENABLE_CCACHE" = xyes; then
35842    OLD_PATH="$PATH"
35843    if test "x$TOOLS_DIR" != x; then
35844      PATH=$TOOLS_DIR:$PATH
35845    fi
35846    # Extract the first word of "ccache", so it can be a program name with args.
35847set dummy ccache; ac_word=$2
35848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35849$as_echo_n "checking for $ac_word... " >&6; }
35850if ${ac_cv_path_CCACHE+:} false; then :
35851  $as_echo_n "(cached) " >&6
35852else
35853  case $CCACHE in
35854  [\\/]* | ?:[\\/]*)
35855  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
35856  ;;
35857  *)
35858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35859for as_dir in $PATH
35860do
35861  IFS=$as_save_IFS
35862  test -z "$as_dir" && as_dir=.
35863    for ac_exec_ext in '' $ac_executable_extensions; do
35864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35865    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
35866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35867    break 2
35868  fi
35869done
35870  done
35871IFS=$as_save_IFS
35872
35873  ;;
35874esac
35875fi
35876CCACHE=$ac_cv_path_CCACHE
35877if test -n "$CCACHE"; then
35878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
35879$as_echo "$CCACHE" >&6; }
35880else
35881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35882$as_echo "no" >&6; }
35883fi
35884
35885
35886    PATH="$OLD_PATH"
35887  else
35888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
35889$as_echo_n "checking for ccache... " >&6; }
35890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
35891$as_echo "explicitly disabled" >&6; }
35892    CCACHE=
35893  fi
35894
35895
35896
35897# Check whether --with-ccache-dir was given.
35898if test "${with_ccache_dir+set}" = set; then :
35899  withval=$with_ccache_dir;
35900fi
35901
35902
35903  if test "x$with_ccache_dir" != x; then
35904    # When using a non home ccache directory, assume the use is to share ccache files
35905    # with other users. Thus change the umask.
35906    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
35907  fi
35908  CCACHE_FOUND=""
35909  if test "x$CCACHE" != x; then
35910
35911  if test "x$CCACHE" != x; then
35912    CCACHE_FOUND="true"
35913    # Only use ccache if it is 3.1.4 or later, which supports
35914    # precompiled headers.
35915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
35916$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
35917    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
35918    if test "x$HAS_GOOD_CCACHE" = x; then
35919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
35920$as_echo "no, disabling ccache" >&6; }
35921      CCACHE=
35922    else
35923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35924$as_echo "yes" >&6; }
35925      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
35926$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
35927      PUSHED_FLAGS="$CXXFLAGS"
35928      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
35929      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35930/* end confdefs.h.  */
35931
35932int
35933main ()
35934{
35935
35936  ;
35937  return 0;
35938}
35939_ACEOF
35940if ac_fn_cxx_try_compile "$LINENO"; then :
35941  CC_KNOWS_CCACHE_TRICK=yes
35942else
35943  CC_KNOWS_CCACHE_TRICK=no
35944fi
35945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35946      CXXFLAGS="$PUSHED_FLAGS"
35947      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
35948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35949$as_echo "yes" >&6; }
35950      else
35951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
35952$as_echo "no, disabling ccaching of precompiled headers" >&6; }
35953        CCACHE=
35954      fi
35955    fi
35956  fi
35957
35958  if test "x$CCACHE" != x; then
35959    CCACHE_SLOPPINESS=time_macros
35960    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
35961    CCACHE_FLAGS=-fpch-preprocess
35962
35963    if test "x$SET_CCACHE_DIR" != x; then
35964      mkdir -p $CCACHE_DIR > /dev/null 2>&1
35965      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
35966    fi
35967  fi
35968
35969  fi
35970
35971
35972###############################################################################
35973#
35974# And now the finish...
35975#
35976###############################################################################
35977
35978# Check for some common pitfalls
35979
35980  if test x"$OPENJDK_BUILD_OS" = xwindows; then
35981    file_to_test="$SRC_ROOT/LICENSE"
35982    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
35983      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
35984    fi
35985  fi
35986
35987
35988  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
35989$as_echo_n "checking if build directory is on local disk... " >&6; }
35990
35991  # df -l lists only local disks; if the given directory is not found then
35992  # a non-zero exit code is given
35993  if test "x$DF" = x; then
35994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35995      # msys does not have df; use Windows "net use" instead.
35996      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
35997      if test "x$IS_NETWORK_DISK" = x; then
35998        OUTPUT_DIR_IS_LOCAL="yes"
35999      else
36000        OUTPUT_DIR_IS_LOCAL="no"
36001      fi
36002    else
36003      # No df here, say it's local
36004      OUTPUT_DIR_IS_LOCAL="yes"
36005    fi
36006  else
36007    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36008      OUTPUT_DIR_IS_LOCAL="yes"
36009    else
36010      OUTPUT_DIR_IS_LOCAL="no"
36011    fi
36012  fi
36013
36014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36015$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36016
36017
36018
36019  # Check if the user has any old-style ALT_ variables set.
36020  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36021
36022  # Before generating output files, test if they exist. If they do, this is a reconfigure.
36023  # Since we can't properly handle the dependencies for this, warn the user about the situation
36024  if test -e $OUTPUT_ROOT/spec.gmk; then
36025    IS_RECONFIGURE=yes
36026  else
36027    IS_RECONFIGURE=no
36028  fi
36029
36030  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36031    HIDE_PERFORMANCE_HINTS=yes
36032  else
36033    HIDE_PERFORMANCE_HINTS=no
36034    # Hide it the next time around...
36035    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36036  fi
36037
36038
36039# At the end, call the custom hook. (Dummy macro if no custom sources available)
36040
36041
36042# We're messing a bit with internal autoconf variables to put the config.status
36043# in the output directory instead of the current directory.
36044CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36045
36046# Create the actual output files. Now the main work of configure is done.
36047cat >confcache <<\_ACEOF
36048# This file is a shell script that caches the results of configure
36049# tests run on this system so they can be shared between configure
36050# scripts and configure runs, see configure's option --config-cache.
36051# It is not useful on other systems.  If it contains results you don't
36052# want to keep, you may remove or edit it.
36053#
36054# config.status only pays attention to the cache file if you give it
36055# the --recheck option to rerun configure.
36056#
36057# `ac_cv_env_foo' variables (set or unset) will be overridden when
36058# loading this file, other *unset* `ac_cv_foo' will be assigned the
36059# following values.
36060
36061_ACEOF
36062
36063# The following way of writing the cache mishandles newlines in values,
36064# but we know of no workaround that is simple, portable, and efficient.
36065# So, we kill variables containing newlines.
36066# Ultrix sh set writes to stderr and can't be redirected directly,
36067# and sets the high bit in the cache file unless we assign to the vars.
36068(
36069  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36070    eval ac_val=\$$ac_var
36071    case $ac_val in #(
36072    *${as_nl}*)
36073      case $ac_var in #(
36074      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36075$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36076      esac
36077      case $ac_var in #(
36078      _ | IFS | as_nl) ;; #(
36079      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36080      *) { eval $ac_var=; unset $ac_var;} ;;
36081      esac ;;
36082    esac
36083  done
36084
36085  (set) 2>&1 |
36086    case $as_nl`(ac_space=' '; set) 2>&1` in #(
36087    *${as_nl}ac_space=\ *)
36088      # `set' does not quote correctly, so add quotes: double-quote
36089      # substitution turns \\\\ into \\, and sed turns \\ into \.
36090      sed -n \
36091	"s/'/'\\\\''/g;
36092	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36093      ;; #(
36094    *)
36095      # `set' quotes correctly as required by POSIX, so do not add quotes.
36096      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36097      ;;
36098    esac |
36099    sort
36100) |
36101  sed '
36102     /^ac_cv_env_/b end
36103     t clear
36104     :clear
36105     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36106     t end
36107     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36108     :end' >>confcache
36109if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36110  if test -w "$cache_file"; then
36111    if test "x$cache_file" != "x/dev/null"; then
36112      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36113$as_echo "$as_me: updating cache $cache_file" >&6;}
36114      if test ! -f "$cache_file" || test -h "$cache_file"; then
36115	cat confcache >"$cache_file"
36116      else
36117        case $cache_file in #(
36118        */* | ?:*)
36119	  mv -f confcache "$cache_file"$$ &&
36120	  mv -f "$cache_file"$$ "$cache_file" ;; #(
36121        *)
36122	  mv -f confcache "$cache_file" ;;
36123	esac
36124      fi
36125    fi
36126  else
36127    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36128$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36129  fi
36130fi
36131rm -f confcache
36132
36133test "x$prefix" = xNONE && prefix=$ac_default_prefix
36134# Let make expand exec_prefix.
36135test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36136
36137DEFS=-DHAVE_CONFIG_H
36138
36139ac_libobjs=
36140ac_ltlibobjs=
36141U=
36142for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36143  # 1. Remove the extension, and $U if already installed.
36144  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36145  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36146  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36147  #    will be set to the directory where LIBOBJS objects are built.
36148  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36149  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36150done
36151LIBOBJS=$ac_libobjs
36152
36153LTLIBOBJS=$ac_ltlibobjs
36154
36155
36156
36157: "${CONFIG_STATUS=./config.status}"
36158ac_write_fail=0
36159ac_clean_files_save=$ac_clean_files
36160ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36161{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36162$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36163as_write_fail=0
36164cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36165#! $SHELL
36166# Generated by $as_me.
36167# Run this file to recreate the current configuration.
36168# Compiler output produced by configure, useful for debugging
36169# configure, is in config.log if it exists.
36170
36171debug=false
36172ac_cs_recheck=false
36173ac_cs_silent=false
36174
36175SHELL=\${CONFIG_SHELL-$SHELL}
36176export SHELL
36177_ASEOF
36178cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36179## -------------------- ##
36180## M4sh Initialization. ##
36181## -------------------- ##
36182
36183# Be more Bourne compatible
36184DUALCASE=1; export DUALCASE # for MKS sh
36185if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36186  emulate sh
36187  NULLCMD=:
36188  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36189  # is contrary to our usage.  Disable this feature.
36190  alias -g '${1+"$@"}'='"$@"'
36191  setopt NO_GLOB_SUBST
36192else
36193  case `(set -o) 2>/dev/null` in #(
36194  *posix*) :
36195    set -o posix ;; #(
36196  *) :
36197     ;;
36198esac
36199fi
36200
36201
36202as_nl='
36203'
36204export as_nl
36205# Printing a long string crashes Solaris 7 /usr/bin/printf.
36206as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36207as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36208as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36209# Prefer a ksh shell builtin over an external printf program on Solaris,
36210# but without wasting forks for bash or zsh.
36211if test -z "$BASH_VERSION$ZSH_VERSION" \
36212    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36213  as_echo='print -r --'
36214  as_echo_n='print -rn --'
36215elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36216  as_echo='printf %s\n'
36217  as_echo_n='printf %s'
36218else
36219  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36220    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36221    as_echo_n='/usr/ucb/echo -n'
36222  else
36223    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36224    as_echo_n_body='eval
36225      arg=$1;
36226      case $arg in #(
36227      *"$as_nl"*)
36228	expr "X$arg" : "X\\(.*\\)$as_nl";
36229	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36230      esac;
36231      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36232    '
36233    export as_echo_n_body
36234    as_echo_n='sh -c $as_echo_n_body as_echo'
36235  fi
36236  export as_echo_body
36237  as_echo='sh -c $as_echo_body as_echo'
36238fi
36239
36240# The user is always right.
36241if test "${PATH_SEPARATOR+set}" != set; then
36242  PATH_SEPARATOR=:
36243  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36244    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36245      PATH_SEPARATOR=';'
36246  }
36247fi
36248
36249
36250# IFS
36251# We need space, tab and new line, in precisely that order.  Quoting is
36252# there to prevent editors from complaining about space-tab.
36253# (If _AS_PATH_WALK were called with IFS unset, it would disable word
36254# splitting by setting IFS to empty value.)
36255IFS=" ""	$as_nl"
36256
36257# Find who we are.  Look in the path if we contain no directory separator.
36258as_myself=
36259case $0 in #((
36260  *[\\/]* ) as_myself=$0 ;;
36261  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36262for as_dir in $PATH
36263do
36264  IFS=$as_save_IFS
36265  test -z "$as_dir" && as_dir=.
36266    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36267  done
36268IFS=$as_save_IFS
36269
36270     ;;
36271esac
36272# We did not find ourselves, most probably we were run as `sh COMMAND'
36273# in which case we are not to be found in the path.
36274if test "x$as_myself" = x; then
36275  as_myself=$0
36276fi
36277if test ! -f "$as_myself"; then
36278  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36279  exit 1
36280fi
36281
36282# Unset variables that we do not need and which cause bugs (e.g. in
36283# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36284# suppresses any "Segmentation fault" message there.  '((' could
36285# trigger a bug in pdksh 5.2.14.
36286for as_var in BASH_ENV ENV MAIL MAILPATH
36287do eval test x\${$as_var+set} = xset \
36288  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36289done
36290PS1='$ '
36291PS2='> '
36292PS4='+ '
36293
36294# NLS nuisances.
36295LC_ALL=C
36296export LC_ALL
36297LANGUAGE=C
36298export LANGUAGE
36299
36300# CDPATH.
36301(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36302
36303
36304# as_fn_error STATUS ERROR [LINENO LOG_FD]
36305# ----------------------------------------
36306# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36307# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36308# script with STATUS, using 1 if that was 0.
36309as_fn_error ()
36310{
36311  as_status=$1; test $as_status -eq 0 && as_status=1
36312  if test "$4"; then
36313    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36314    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36315  fi
36316  $as_echo "$as_me: error: $2" >&2
36317  as_fn_exit $as_status
36318} # as_fn_error
36319
36320
36321# as_fn_set_status STATUS
36322# -----------------------
36323# Set $? to STATUS, without forking.
36324as_fn_set_status ()
36325{
36326  return $1
36327} # as_fn_set_status
36328
36329# as_fn_exit STATUS
36330# -----------------
36331# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36332as_fn_exit ()
36333{
36334  set +e
36335  as_fn_set_status $1
36336  exit $1
36337} # as_fn_exit
36338
36339# as_fn_unset VAR
36340# ---------------
36341# Portably unset VAR.
36342as_fn_unset ()
36343{
36344  { eval $1=; unset $1;}
36345}
36346as_unset=as_fn_unset
36347# as_fn_append VAR VALUE
36348# ----------------------
36349# Append the text in VALUE to the end of the definition contained in VAR. Take
36350# advantage of any shell optimizations that allow amortized linear growth over
36351# repeated appends, instead of the typical quadratic growth present in naive
36352# implementations.
36353if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36354  eval 'as_fn_append ()
36355  {
36356    eval $1+=\$2
36357  }'
36358else
36359  as_fn_append ()
36360  {
36361    eval $1=\$$1\$2
36362  }
36363fi # as_fn_append
36364
36365# as_fn_arith ARG...
36366# ------------------
36367# Perform arithmetic evaluation on the ARGs, and store the result in the
36368# global $as_val. Take advantage of shells that can avoid forks. The arguments
36369# must be portable across $(()) and expr.
36370if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36371  eval 'as_fn_arith ()
36372  {
36373    as_val=$(( $* ))
36374  }'
36375else
36376  as_fn_arith ()
36377  {
36378    as_val=`expr "$@" || test $? -eq 1`
36379  }
36380fi # as_fn_arith
36381
36382
36383if expr a : '\(a\)' >/dev/null 2>&1 &&
36384   test "X`expr 00001 : '.*\(...\)'`" = X001; then
36385  as_expr=expr
36386else
36387  as_expr=false
36388fi
36389
36390if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36391  as_basename=basename
36392else
36393  as_basename=false
36394fi
36395
36396if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36397  as_dirname=dirname
36398else
36399  as_dirname=false
36400fi
36401
36402as_me=`$as_basename -- "$0" ||
36403$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36404	 X"$0" : 'X\(//\)$' \| \
36405	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36406$as_echo X/"$0" |
36407    sed '/^.*\/\([^/][^/]*\)\/*$/{
36408	    s//\1/
36409	    q
36410	  }
36411	  /^X\/\(\/\/\)$/{
36412	    s//\1/
36413	    q
36414	  }
36415	  /^X\/\(\/\).*/{
36416	    s//\1/
36417	    q
36418	  }
36419	  s/.*/./; q'`
36420
36421# Avoid depending upon Character Ranges.
36422as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36423as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36424as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36425as_cr_digits='0123456789'
36426as_cr_alnum=$as_cr_Letters$as_cr_digits
36427
36428ECHO_C= ECHO_N= ECHO_T=
36429case `echo -n x` in #(((((
36430-n*)
36431  case `echo 'xy\c'` in
36432  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
36433  xy)  ECHO_C='\c';;
36434  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36435       ECHO_T='	';;
36436  esac;;
36437*)
36438  ECHO_N='-n';;
36439esac
36440
36441rm -f conf$$ conf$$.exe conf$$.file
36442if test -d conf$$.dir; then
36443  rm -f conf$$.dir/conf$$.file
36444else
36445  rm -f conf$$.dir
36446  mkdir conf$$.dir 2>/dev/null
36447fi
36448if (echo >conf$$.file) 2>/dev/null; then
36449  if ln -s conf$$.file conf$$ 2>/dev/null; then
36450    as_ln_s='ln -s'
36451    # ... but there are two gotchas:
36452    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36453    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36454    # In both cases, we have to default to `cp -pR'.
36455    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36456      as_ln_s='cp -pR'
36457  elif ln conf$$.file conf$$ 2>/dev/null; then
36458    as_ln_s=ln
36459  else
36460    as_ln_s='cp -pR'
36461  fi
36462else
36463  as_ln_s='cp -pR'
36464fi
36465rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36466rmdir conf$$.dir 2>/dev/null
36467
36468
36469# as_fn_mkdir_p
36470# -------------
36471# Create "$as_dir" as a directory, including parents if necessary.
36472as_fn_mkdir_p ()
36473{
36474
36475  case $as_dir in #(
36476  -*) as_dir=./$as_dir;;
36477  esac
36478  test -d "$as_dir" || eval $as_mkdir_p || {
36479    as_dirs=
36480    while :; do
36481      case $as_dir in #(
36482      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36483      *) as_qdir=$as_dir;;
36484      esac
36485      as_dirs="'$as_qdir' $as_dirs"
36486      as_dir=`$as_dirname -- "$as_dir" ||
36487$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36488	 X"$as_dir" : 'X\(//\)[^/]' \| \
36489	 X"$as_dir" : 'X\(//\)$' \| \
36490	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36491$as_echo X"$as_dir" |
36492    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36493	    s//\1/
36494	    q
36495	  }
36496	  /^X\(\/\/\)[^/].*/{
36497	    s//\1/
36498	    q
36499	  }
36500	  /^X\(\/\/\)$/{
36501	    s//\1/
36502	    q
36503	  }
36504	  /^X\(\/\).*/{
36505	    s//\1/
36506	    q
36507	  }
36508	  s/.*/./; q'`
36509      test -d "$as_dir" && break
36510    done
36511    test -z "$as_dirs" || eval "mkdir $as_dirs"
36512  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36513
36514
36515} # as_fn_mkdir_p
36516if mkdir -p . 2>/dev/null; then
36517  as_mkdir_p='mkdir -p "$as_dir"'
36518else
36519  test -d ./-p && rmdir ./-p
36520  as_mkdir_p=false
36521fi
36522
36523
36524# as_fn_executable_p FILE
36525# -----------------------
36526# Test if FILE is an executable regular file.
36527as_fn_executable_p ()
36528{
36529  test -f "$1" && test -x "$1"
36530} # as_fn_executable_p
36531as_test_x='test -x'
36532as_executable_p=as_fn_executable_p
36533
36534# Sed expression to map a string onto a valid CPP name.
36535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36536
36537# Sed expression to map a string onto a valid variable name.
36538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36539
36540
36541exec 6>&1
36542## ----------------------------------- ##
36543## Main body of $CONFIG_STATUS script. ##
36544## ----------------------------------- ##
36545_ASEOF
36546test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36547
36548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36549# Save the log message, to keep $0 and so on meaningful, and to
36550# report actual input values of CONFIG_FILES etc. instead of their
36551# values after options handling.
36552ac_log="
36553This file was extended by OpenJDK $as_me jdk8, which was
36554generated by GNU Autoconf 2.69.  Invocation command line was
36555
36556  CONFIG_FILES    = $CONFIG_FILES
36557  CONFIG_HEADERS  = $CONFIG_HEADERS
36558  CONFIG_LINKS    = $CONFIG_LINKS
36559  CONFIG_COMMANDS = $CONFIG_COMMANDS
36560  $ $0 $@
36561
36562on `(hostname || uname -n) 2>/dev/null | sed 1q`
36563"
36564
36565_ACEOF
36566
36567case $ac_config_files in *"
36568"*) set x $ac_config_files; shift; ac_config_files=$*;;
36569esac
36570
36571case $ac_config_headers in *"
36572"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36573esac
36574
36575
36576cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36577# Files that config.status was made for.
36578config_files="$ac_config_files"
36579config_headers="$ac_config_headers"
36580
36581_ACEOF
36582
36583cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36584ac_cs_usage="\
36585\`$as_me' instantiates files and other configuration actions
36586from templates according to the current configuration.  Unless the files
36587and actions are specified as TAGs, all are instantiated by default.
36588
36589Usage: $0 [OPTION]... [TAG]...
36590
36591  -h, --help       print this help, then exit
36592  -V, --version    print version number and configuration settings, then exit
36593      --config     print configuration, then exit
36594  -q, --quiet, --silent
36595                   do not print progress messages
36596  -d, --debug      don't remove temporary files
36597      --recheck    update $as_me by reconfiguring in the same conditions
36598      --file=FILE[:TEMPLATE]
36599                   instantiate the configuration file FILE
36600      --header=FILE[:TEMPLATE]
36601                   instantiate the configuration header FILE
36602
36603Configuration files:
36604$config_files
36605
36606Configuration headers:
36607$config_headers
36608
36609Report bugs to <build-dev@openjdk.java.net>.
36610OpenJDK home page: <http://openjdk.java.net>."
36611
36612_ACEOF
36613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36614ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36615ac_cs_version="\\
36616OpenJDK config.status jdk8
36617configured by $0, generated by GNU Autoconf 2.69,
36618  with options \\"\$ac_cs_config\\"
36619
36620Copyright (C) 2012 Free Software Foundation, Inc.
36621This config.status script is free software; the Free Software Foundation
36622gives unlimited permission to copy, distribute and modify it."
36623
36624ac_pwd='$ac_pwd'
36625srcdir='$srcdir'
36626AWK='$AWK'
36627test -n "\$AWK" || AWK=awk
36628_ACEOF
36629
36630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36631# The default lists apply if the user does not specify any file.
36632ac_need_defaults=:
36633while test $# != 0
36634do
36635  case $1 in
36636  --*=?*)
36637    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36638    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36639    ac_shift=:
36640    ;;
36641  --*=)
36642    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36643    ac_optarg=
36644    ac_shift=:
36645    ;;
36646  *)
36647    ac_option=$1
36648    ac_optarg=$2
36649    ac_shift=shift
36650    ;;
36651  esac
36652
36653  case $ac_option in
36654  # Handling of the options.
36655  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36656    ac_cs_recheck=: ;;
36657  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36658    $as_echo "$ac_cs_version"; exit ;;
36659  --config | --confi | --conf | --con | --co | --c )
36660    $as_echo "$ac_cs_config"; exit ;;
36661  --debug | --debu | --deb | --de | --d | -d )
36662    debug=: ;;
36663  --file | --fil | --fi | --f )
36664    $ac_shift
36665    case $ac_optarg in
36666    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36667    '') as_fn_error $? "missing file argument" ;;
36668    esac
36669    as_fn_append CONFIG_FILES " '$ac_optarg'"
36670    ac_need_defaults=false;;
36671  --header | --heade | --head | --hea )
36672    $ac_shift
36673    case $ac_optarg in
36674    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36675    esac
36676    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36677    ac_need_defaults=false;;
36678  --he | --h)
36679    # Conflict between --help and --header
36680    as_fn_error $? "ambiguous option: \`$1'
36681Try \`$0 --help' for more information.";;
36682  --help | --hel | -h )
36683    $as_echo "$ac_cs_usage"; exit ;;
36684  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36685  | -silent | --silent | --silen | --sile | --sil | --si | --s)
36686    ac_cs_silent=: ;;
36687
36688  # This is an error.
36689  -*) as_fn_error $? "unrecognized option: \`$1'
36690Try \`$0 --help' for more information." ;;
36691
36692  *) as_fn_append ac_config_targets " $1"
36693     ac_need_defaults=false ;;
36694
36695  esac
36696  shift
36697done
36698
36699ac_configure_extra_args=
36700
36701if $ac_cs_silent; then
36702  exec 6>/dev/null
36703  ac_configure_extra_args="$ac_configure_extra_args --silent"
36704fi
36705
36706_ACEOF
36707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36708if \$ac_cs_recheck; then
36709  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36710  shift
36711  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36712  CONFIG_SHELL='$SHELL'
36713  export CONFIG_SHELL
36714  exec "\$@"
36715fi
36716
36717_ACEOF
36718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36719exec 5>>config.log
36720{
36721  echo
36722  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36723## Running $as_me. ##
36724_ASBOX
36725  $as_echo "$ac_log"
36726} >&5
36727
36728_ACEOF
36729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36730_ACEOF
36731
36732cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36733
36734# Handling of arguments.
36735for ac_config_target in $ac_config_targets
36736do
36737  case $ac_config_target in
36738    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36739    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36740    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36741    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36742    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36743    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36744    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36745
36746  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36747  esac
36748done
36749
36750
36751# If the user did not use the arguments to specify the items to instantiate,
36752# then the envvar interface is used.  Set only those that are not.
36753# We use the long form for the default assignment because of an extremely
36754# bizarre bug on SunOS 4.1.3.
36755if $ac_need_defaults; then
36756  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36757  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36758fi
36759
36760# Have a temporary directory for convenience.  Make it in the build tree
36761# simply because there is no reason against having it here, and in addition,
36762# creating and moving files from /tmp can sometimes cause problems.
36763# Hook for its removal unless debugging.
36764# Note that there is a small window in which the directory will not be cleaned:
36765# after its creation but before its name has been assigned to `$tmp'.
36766$debug ||
36767{
36768  tmp= ac_tmp=
36769  trap 'exit_status=$?
36770  : "${ac_tmp:=$tmp}"
36771  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36772' 0
36773  trap 'as_fn_exit 1' 1 2 13 15
36774}
36775# Create a (secure) tmp directory for tmp files.
36776
36777{
36778  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36779  test -d "$tmp"
36780}  ||
36781{
36782  tmp=./conf$$-$RANDOM
36783  (umask 077 && mkdir "$tmp")
36784} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36785ac_tmp=$tmp
36786
36787# Set up the scripts for CONFIG_FILES section.
36788# No need to generate them if there are no CONFIG_FILES.
36789# This happens for instance with `./config.status config.h'.
36790if test -n "$CONFIG_FILES"; then
36791
36792
36793ac_cr=`echo X | tr X '\015'`
36794# On cygwin, bash can eat \r inside `` if the user requested igncr.
36795# But we know of no other shell where ac_cr would be empty at this
36796# point, so we can use a bashism as a fallback.
36797if test "x$ac_cr" = x; then
36798  eval ac_cr=\$\'\\r\'
36799fi
36800ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36801if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36802  ac_cs_awk_cr='\\r'
36803else
36804  ac_cs_awk_cr=$ac_cr
36805fi
36806
36807echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36808_ACEOF
36809
36810
36811{
36812  echo "cat >conf$$subs.awk <<_ACEOF" &&
36813  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36814  echo "_ACEOF"
36815} >conf$$subs.sh ||
36816  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36817ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36818ac_delim='%!_!# '
36819for ac_last_try in false false false false false :; do
36820  . ./conf$$subs.sh ||
36821    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36822
36823  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36824  if test $ac_delim_n = $ac_delim_num; then
36825    break
36826  elif $ac_last_try; then
36827    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36828  else
36829    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36830  fi
36831done
36832rm -f conf$$subs.sh
36833
36834cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36835cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36836_ACEOF
36837sed -n '
36838h
36839s/^/S["/; s/!.*/"]=/
36840p
36841g
36842s/^[^!]*!//
36843:repl
36844t repl
36845s/'"$ac_delim"'$//
36846t delim
36847:nl
36848h
36849s/\(.\{148\}\)..*/\1/
36850t more1
36851s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36852p
36853n
36854b repl
36855:more1
36856s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36857p
36858g
36859s/.\{148\}//
36860t nl
36861:delim
36862h
36863s/\(.\{148\}\)..*/\1/
36864t more2
36865s/["\\]/\\&/g; s/^/"/; s/$/"/
36866p
36867b
36868:more2
36869s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36870p
36871g
36872s/.\{148\}//
36873t delim
36874' <conf$$subs.awk | sed '
36875/^[^""]/{
36876  N
36877  s/\n//
36878}
36879' >>$CONFIG_STATUS || ac_write_fail=1
36880rm -f conf$$subs.awk
36881cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36882_ACAWK
36883cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36884  for (key in S) S_is_set[key] = 1
36885  FS = ""
36886
36887}
36888{
36889  line = $ 0
36890  nfields = split(line, field, "@")
36891  substed = 0
36892  len = length(field[1])
36893  for (i = 2; i < nfields; i++) {
36894    key = field[i]
36895    keylen = length(key)
36896    if (S_is_set[key]) {
36897      value = S[key]
36898      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
36899      len += length(value) + length(field[++i])
36900      substed = 1
36901    } else
36902      len += 1 + keylen
36903  }
36904
36905  print line
36906}
36907
36908_ACAWK
36909_ACEOF
36910cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36911if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36912  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36913else
36914  cat
36915fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
36916  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
36917_ACEOF
36918
36919# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
36920# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
36921# trailing colons and then remove the whole line if VPATH becomes empty
36922# (actually we leave an empty line to preserve line numbers).
36923if test "x$srcdir" = x.; then
36924  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
36925h
36926s///
36927s/^/:/
36928s/[	 ]*$/:/
36929s/:\$(srcdir):/:/g
36930s/:\${srcdir}:/:/g
36931s/:@srcdir@:/:/g
36932s/^:*//
36933s/:*$//
36934x
36935s/\(=[	 ]*\).*/\1/
36936G
36937s/\n//
36938s/^[^=]*=[	 ]*$//
36939}'
36940fi
36941
36942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36943fi # test -n "$CONFIG_FILES"
36944
36945# Set up the scripts for CONFIG_HEADERS section.
36946# No need to generate them if there are no CONFIG_HEADERS.
36947# This happens for instance with `./config.status Makefile'.
36948if test -n "$CONFIG_HEADERS"; then
36949cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36950BEGIN {
36951_ACEOF
36952
36953# Transform confdefs.h into an awk script `defines.awk', embedded as
36954# here-document in config.status, that substitutes the proper values into
36955# config.h.in to produce config.h.
36956
36957# Create a delimiter string that does not exist in confdefs.h, to ease
36958# handling of long lines.
36959ac_delim='%!_!# '
36960for ac_last_try in false false :; do
36961  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
36962  if test -z "$ac_tt"; then
36963    break
36964  elif $ac_last_try; then
36965    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
36966  else
36967    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36968  fi
36969done
36970
36971# For the awk script, D is an array of macro values keyed by name,
36972# likewise P contains macro parameters if any.  Preserve backslash
36973# newline sequences.
36974
36975ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36976sed -n '
36977s/.\{148\}/&'"$ac_delim"'/g
36978t rset
36979:rset
36980s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
36981t def
36982d
36983:def
36984s/\\$//
36985t bsnl
36986s/["\\]/\\&/g
36987s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36988D["\1"]=" \3"/p
36989s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
36990d
36991:bsnl
36992s/["\\]/\\&/g
36993s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36994D["\1"]=" \3\\\\\\n"\\/p
36995t cont
36996s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
36997t cont
36998d
36999:cont
37000n
37001s/.\{148\}/&'"$ac_delim"'/g
37002t clear
37003:clear
37004s/\\$//
37005t bsnlc
37006s/["\\]/\\&/g; s/^/"/; s/$/"/p
37007d
37008:bsnlc
37009s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37010b cont
37011' <confdefs.h | sed '
37012s/'"$ac_delim"'/"\\\
37013"/g' >>$CONFIG_STATUS || ac_write_fail=1
37014
37015cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37016  for (key in D) D_is_set[key] = 1
37017  FS = ""
37018}
37019/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37020  line = \$ 0
37021  split(line, arg, " ")
37022  if (arg[1] == "#") {
37023    defundef = arg[2]
37024    mac1 = arg[3]
37025  } else {
37026    defundef = substr(arg[1], 2)
37027    mac1 = arg[2]
37028  }
37029  split(mac1, mac2, "(") #)
37030  macro = mac2[1]
37031  prefix = substr(line, 1, index(line, defundef) - 1)
37032  if (D_is_set[macro]) {
37033    # Preserve the white space surrounding the "#".
37034    print prefix "define", macro P[macro] D[macro]
37035    next
37036  } else {
37037    # Replace #undef with comments.  This is necessary, for example,
37038    # in the case of _POSIX_SOURCE, which is predefined and required
37039    # on some systems where configure will not decide to define it.
37040    if (defundef == "undef") {
37041      print "/*", prefix defundef, macro, "*/"
37042      next
37043    }
37044  }
37045}
37046{ print }
37047_ACAWK
37048_ACEOF
37049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37050  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37051fi # test -n "$CONFIG_HEADERS"
37052
37053
37054eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37055shift
37056for ac_tag
37057do
37058  case $ac_tag in
37059  :[FHLC]) ac_mode=$ac_tag; continue;;
37060  esac
37061  case $ac_mode$ac_tag in
37062  :[FHL]*:*);;
37063  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37064  :[FH]-) ac_tag=-:-;;
37065  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37066  esac
37067  ac_save_IFS=$IFS
37068  IFS=:
37069  set x $ac_tag
37070  IFS=$ac_save_IFS
37071  shift
37072  ac_file=$1
37073  shift
37074
37075  case $ac_mode in
37076  :L) ac_source=$1;;
37077  :[FH])
37078    ac_file_inputs=
37079    for ac_f
37080    do
37081      case $ac_f in
37082      -) ac_f="$ac_tmp/stdin";;
37083      *) # Look for the file first in the build tree, then in the source tree
37084	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
37085	 # because $ac_f cannot contain `:'.
37086	 test -f "$ac_f" ||
37087	   case $ac_f in
37088	   [\\/$]*) false;;
37089	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37090	   esac ||
37091	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37092      esac
37093      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37094      as_fn_append ac_file_inputs " '$ac_f'"
37095    done
37096
37097    # Let's still pretend it is `configure' which instantiates (i.e., don't
37098    # use $as_me), people would be surprised to read:
37099    #    /* config.h.  Generated by config.status.  */
37100    configure_input='Generated from '`
37101	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37102	`' by configure.'
37103    if test x"$ac_file" != x-; then
37104      configure_input="$ac_file.  $configure_input"
37105      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37106$as_echo "$as_me: creating $ac_file" >&6;}
37107    fi
37108    # Neutralize special characters interpreted by sed in replacement strings.
37109    case $configure_input in #(
37110    *\&* | *\|* | *\\* )
37111       ac_sed_conf_input=`$as_echo "$configure_input" |
37112       sed 's/[\\\\&|]/\\\\&/g'`;; #(
37113    *) ac_sed_conf_input=$configure_input;;
37114    esac
37115
37116    case $ac_tag in
37117    *:-:* | *:-) cat >"$ac_tmp/stdin" \
37118      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37119    esac
37120    ;;
37121  esac
37122
37123  ac_dir=`$as_dirname -- "$ac_file" ||
37124$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37125	 X"$ac_file" : 'X\(//\)[^/]' \| \
37126	 X"$ac_file" : 'X\(//\)$' \| \
37127	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37128$as_echo X"$ac_file" |
37129    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37130	    s//\1/
37131	    q
37132	  }
37133	  /^X\(\/\/\)[^/].*/{
37134	    s//\1/
37135	    q
37136	  }
37137	  /^X\(\/\/\)$/{
37138	    s//\1/
37139	    q
37140	  }
37141	  /^X\(\/\).*/{
37142	    s//\1/
37143	    q
37144	  }
37145	  s/.*/./; q'`
37146  as_dir="$ac_dir"; as_fn_mkdir_p
37147  ac_builddir=.
37148
37149case "$ac_dir" in
37150.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37151*)
37152  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37153  # A ".." for each directory in $ac_dir_suffix.
37154  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37155  case $ac_top_builddir_sub in
37156  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37157  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37158  esac ;;
37159esac
37160ac_abs_top_builddir=$ac_pwd
37161ac_abs_builddir=$ac_pwd$ac_dir_suffix
37162# for backward compatibility:
37163ac_top_builddir=$ac_top_build_prefix
37164
37165case $srcdir in
37166  .)  # We are building in place.
37167    ac_srcdir=.
37168    ac_top_srcdir=$ac_top_builddir_sub
37169    ac_abs_top_srcdir=$ac_pwd ;;
37170  [\\/]* | ?:[\\/]* )  # Absolute name.
37171    ac_srcdir=$srcdir$ac_dir_suffix;
37172    ac_top_srcdir=$srcdir
37173    ac_abs_top_srcdir=$srcdir ;;
37174  *) # Relative name.
37175    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37176    ac_top_srcdir=$ac_top_build_prefix$srcdir
37177    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37178esac
37179ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37180
37181
37182  case $ac_mode in
37183  :F)
37184  #
37185  # CONFIG_FILE
37186  #
37187
37188_ACEOF
37189
37190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37191# If the template does not know about datarootdir, expand it.
37192# FIXME: This hack should be removed a few years after 2.60.
37193ac_datarootdir_hack=; ac_datarootdir_seen=
37194ac_sed_dataroot='
37195/datarootdir/ {
37196  p
37197  q
37198}
37199/@datadir@/p
37200/@docdir@/p
37201/@infodir@/p
37202/@localedir@/p
37203/@mandir@/p'
37204case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37205*datarootdir*) ac_datarootdir_seen=yes;;
37206*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37207  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37208$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37209_ACEOF
37210cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37211  ac_datarootdir_hack='
37212  s&@datadir@&$datadir&g
37213  s&@docdir@&$docdir&g
37214  s&@infodir@&$infodir&g
37215  s&@localedir@&$localedir&g
37216  s&@mandir@&$mandir&g
37217  s&\\\${datarootdir}&$datarootdir&g' ;;
37218esac
37219_ACEOF
37220
37221# Neutralize VPATH when `$srcdir' = `.'.
37222# Shell code in configure.ac might set extrasub.
37223# FIXME: do we really want to maintain this feature?
37224cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37225ac_sed_extra="$ac_vpsub
37226$extrasub
37227_ACEOF
37228cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37229:t
37230/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37231s|@configure_input@|$ac_sed_conf_input|;t t
37232s&@top_builddir@&$ac_top_builddir_sub&;t t
37233s&@top_build_prefix@&$ac_top_build_prefix&;t t
37234s&@srcdir@&$ac_srcdir&;t t
37235s&@abs_srcdir@&$ac_abs_srcdir&;t t
37236s&@top_srcdir@&$ac_top_srcdir&;t t
37237s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37238s&@builddir@&$ac_builddir&;t t
37239s&@abs_builddir@&$ac_abs_builddir&;t t
37240s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37241$ac_datarootdir_hack
37242"
37243eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37244  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37245
37246test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37247  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37248  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
37249      "$ac_tmp/out"`; test -z "$ac_out"; } &&
37250  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37251which seems to be undefined.  Please make sure it is defined" >&5
37252$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37253which seems to be undefined.  Please make sure it is defined" >&2;}
37254
37255  rm -f "$ac_tmp/stdin"
37256  case $ac_file in
37257  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37258  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37259  esac \
37260  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37261 ;;
37262  :H)
37263  #
37264  # CONFIG_HEADER
37265  #
37266  if test x"$ac_file" != x-; then
37267    {
37268      $as_echo "/* $configure_input  */" \
37269      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37270    } >"$ac_tmp/config.h" \
37271      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37272    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37273      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37274$as_echo "$as_me: $ac_file is unchanged" >&6;}
37275    else
37276      rm -f "$ac_file"
37277      mv "$ac_tmp/config.h" "$ac_file" \
37278	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
37279    fi
37280  else
37281    $as_echo "/* $configure_input  */" \
37282      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37283      || as_fn_error $? "could not create -" "$LINENO" 5
37284  fi
37285 ;;
37286
37287
37288  esac
37289
37290done # for ac_tag
37291
37292
37293as_fn_exit 0
37294_ACEOF
37295ac_clean_files=$ac_clean_files_save
37296
37297test $ac_write_fail = 0 ||
37298  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37299
37300
37301# configure is writing to config.log, and then calls config.status.
37302# config.status does its own redirection, appending to config.log.
37303# Unfortunately, on DOS this fails, as config.log is still kept open
37304# by configure, so config.status won't be able to write to it; its
37305# output is simply discarded.  So we exec the FD to /dev/null,
37306# effectively closing config.log, so it can be properly (re)opened and
37307# appended to by config.status.  When coming back to configure, we
37308# need to make the FD available again.
37309if test "$no_create" != yes; then
37310  ac_cs_success=:
37311  ac_config_status_args=
37312  test "$silent" = yes &&
37313    ac_config_status_args="$ac_config_status_args --quiet"
37314  exec 5>/dev/null
37315  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37316  exec 5>>config.log
37317  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37318  # would make configure fail if this is the last instruction.
37319  $ac_cs_success || as_fn_exit 1
37320fi
37321if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37322  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37323$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37324fi
37325
37326
37327# Try to move the config.log file to the output directory.
37328if test -e ./config.log; then
37329  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37330fi
37331
37332# Make the compare script executable
37333$CHMOD +x $OUTPUT_ROOT/compare.sh
37334
37335# Finally output some useful information to the user
37336
37337  # Finally output some useful information to the user
37338
37339  if test "x$CCACHE_FOUND" != x; then
37340    if  test "x$HAS_GOOD_CCACHE" = x; then
37341      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37342      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37343    else
37344      CCACHE_STATUS="installed and in use"
37345    fi
37346  else
37347    if test "x$GCC" = xyes; then
37348      CCACHE_STATUS="not installed (consider installing)"
37349      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37350    else
37351      CCACHE_STATUS="not available for your system"
37352    fi
37353  fi
37354
37355  printf "\n"
37356  printf "====================================================\n"
37357  printf "A new configuration has been successfully created in\n"
37358  printf "$OUTPUT_ROOT\n"
37359  if test "x$CONFIGURE_COMMAND_LINE" != x; then
37360    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37361  else
37362    printf "using default settings.\n"
37363  fi
37364
37365  printf "\n"
37366  printf "Configuration summary:\n"
37367  printf "* Debug level:    $DEBUG_LEVEL\n"
37368  printf "* JDK variant:    $JDK_VARIANT\n"
37369  printf "* JVM variants:   $with_jvm_variants\n"
37370  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37371
37372  printf "\n"
37373  printf "Tools summary:\n"
37374  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37375    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37376  fi
37377  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37378  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37379  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37380
37381  printf "\n"
37382  printf "Build performance summary:\n"
37383  printf "* Cores to use:   $JOBS\n"
37384  printf "* Memory limit:   $MEMORY_SIZE MB\n"
37385  printf "* ccache status:  $CCACHE_STATUS\n"
37386  printf "\n"
37387
37388  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37389    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37390    printf "$CCACHE_HELP_MSG\n"
37391
37392  # Print a helpful message on how to acquire the necessary build dependency.
37393  # ccache is the help tag: freetype, cups, pulse, alsa etc
37394  MISSING_DEPENDENCY=ccache
37395
37396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37397    cygwin_help $MISSING_DEPENDENCY
37398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37399    msys_help $MISSING_DEPENDENCY
37400  else
37401    PKGHANDLER_COMMAND=
37402
37403    case $PKGHANDLER in
37404      apt-get)
37405        apt_help     $MISSING_DEPENDENCY ;;
37406      yum)
37407        yum_help     $MISSING_DEPENDENCY ;;
37408      port)
37409        port_help    $MISSING_DEPENDENCY ;;
37410      pkgutil)
37411        pkgutil_help $MISSING_DEPENDENCY ;;
37412      pkgadd)
37413        pkgadd_help  $MISSING_DEPENDENCY ;;
37414      * )
37415        break ;;
37416    esac
37417
37418    if test "x$PKGHANDLER_COMMAND" != x; then
37419      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37420    fi
37421  fi
37422
37423    printf "$HELP_MSG\n"
37424    printf "\n"
37425  fi
37426
37427  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37428    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37429    printf "will result in longer build times.\n"
37430    printf "\n"
37431  fi
37432
37433  if test "x$FOUND_ALT_VARIABLES" != "x"; then
37434    printf "WARNING: You have old-style ALT_ environment variables set.\n"
37435    printf "These are not respected, and will be ignored. It is recommended\n"
37436    printf "that you clean your environment. The following variables are set:\n"
37437    printf "$FOUND_ALT_VARIABLES\n"
37438    printf "\n"
37439  fi
37440
37441  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37442    printf "WARNING: Your build output directory is not on a local disk.\n"
37443    printf "This will severely degrade build performance!\n"
37444    printf "It is recommended that you create an output directory on a local disk,\n"
37445    printf "and run the configure script again from that directory.\n"
37446    printf "\n"
37447  fi
37448
37449  if test "x$IS_RECONFIGURE" = "xyes"; then
37450    printf "WARNING: The result of this configuration has overridden an older\n"
37451    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37452    printf "proper build. Failure to do so might result in strange build problems.\n"
37453    printf "\n"
37454  fi
37455
37456